Thread (24 messages) 24 messages, 2 authors, 2006-08-24
STALE7239d

[PATCH 20/21] d80211: fix interface removal

From: Jiri Benc <hidden>
Date: 2006-08-23 19:24:29
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: David Kimdon <redacted>

Calls to ieee80211_if_remove() should use the ieee80211 interface types.
Convert interface type from hostapd to ieee80211 format.

Signed-off-by: David Kimdon <redacted>
Signed-off-by: Jiri Benc <redacted>

---

 net/d80211/ieee80211_ioctl.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

6014cc141587c2c7e73abb985f7741dc7e24c105
diff --git a/net/d80211/ieee80211_ioctl.c b/net/d80211/ieee80211_ioctl.c
index 53b7841..89a58e3 100644
--- a/net/d80211/ieee80211_ioctl.c
+++ b/net/d80211/ieee80211_ioctl.c
@@ -1070,14 +1070,21 @@ #endif
 static int ieee80211_ioctl_remove_if(struct net_device *dev,
 				     struct prism2_hostapd_param *param)
 {
-	if (param->u.if_info.type != HOSTAP_IF_WDS &&
-	    param->u.if_info.type != HOSTAP_IF_VLAN &&
-	    param->u.if_info.type != HOSTAP_IF_BSS &&
-	    param->u.if_info.type != HOSTAP_IF_STA) {
-                return -EINVAL;
+	unsigned int type;
+
+	if (param->u.if_info.type == HOSTAP_IF_WDS) {
+		type = IEEE80211_IF_TYPE_WDS;
+	} else if (param->u.if_info.type == HOSTAP_IF_VLAN) {
+		type = IEEE80211_IF_TYPE_VLAN;
+	} else if (param->u.if_info.type == HOSTAP_IF_BSS) {
+		type = IEEE80211_IF_TYPE_AP;
+	} else if (param->u.if_info.type == HOSTAP_IF_STA) {
+		type = IEEE80211_IF_TYPE_STA;
+	} else {
+		return -EINVAL;
 	}
-	return ieee80211_if_remove(dev, param->u.if_info.name,
-				   param->u.if_info.type);
+
+	return ieee80211_if_remove(dev, param->u.if_info.name, type);
 }
 
 
-- 
1.3.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help