Search Linux Wireless

[PATCH 09/12] mac80211: consolidate generic IE calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I removed the prism2 ioctl to set the generic IE,
I left a function that only has a single caller that is
a trivial wrapper. Make just a single function.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

---
 net/mac80211/ieee80211_ioctl.c |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c	2007-08-28 17:53:24.094622115 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c	2007-08-28 17:53:25.054622115 +0200
@@ -707,7 +707,9 @@ static int ieee80211_ioctl_set_sta_vlan(
 }
 
 
-static int ieee80211_set_gen_ie(struct net_device *dev, u8 *ie, size_t len)
+static int ieee80211_ioctl_siwgenie(struct net_device *dev,
+				    struct iw_request_info *info,
+				    struct iw_point *data, char *extra)
 {
 	struct ieee80211_sub_if_data *sdata;
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
@@ -718,7 +720,7 @@ static int ieee80211_set_gen_ie(struct n
 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	if (sdata->type == IEEE80211_IF_TYPE_STA ||
 	    sdata->type == IEEE80211_IF_TYPE_IBSS) {
-		int ret = ieee80211_sta_set_extra_ie(dev, ie, len);
+		int ret = ieee80211_sta_set_extra_ie(dev, extra, data->length);
 		if (ret)
 			return ret;
 		sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
@@ -728,11 +730,11 @@ static int ieee80211_set_gen_ie(struct n
 
 	if (sdata->type == IEEE80211_IF_TYPE_AP) {
 		kfree(sdata->u.ap.generic_elem);
-		sdata->u.ap.generic_elem = kmalloc(len, GFP_KERNEL);
+		sdata->u.ap.generic_elem = kmalloc(data->length, GFP_KERNEL);
 		if (!sdata->u.ap.generic_elem)
 			return -ENOMEM;
-		memcpy(sdata->u.ap.generic_elem, ie, len);
-		sdata->u.ap.generic_elem_len = len;
+		memcpy(sdata->u.ap.generic_elem, extra, data->length);
+		sdata->u.ap.generic_elem_len = data->length;
 		return ieee80211_if_config(dev);
 	}
 	return -EOPNOTSUPP;
@@ -1944,14 +1946,6 @@ static int ieee80211_ioctl_giwencode(str
 }
 
 
-static int ieee80211_ioctl_siwgenie(struct net_device *dev,
-				    struct iw_request_info *info,
-				    struct iw_point *data, char *extra)
-{
-	return ieee80211_set_gen_ie(dev, extra, data->length);
-}
-
-
 static int ieee80211_ioctl_siwauth(struct net_device *dev,
 				   struct iw_request_info *info,
 				   struct iw_param *data, char *extra)

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux