cfg80211: store the ssid into wirless_dev in AP mode
authorAntonio Quartulli <ordex@autistici.org>
Wed, 7 Nov 2012 11:52:19 +0000 (12:52 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 7 Nov 2012 16:57:14 +0000 (17:57 +0100)
Store the configured ssid in wdev->ssid when starting an AP

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/ap.c
net/wireless/nl80211.c

index e143505f05bc1e856720458e71c3ed41de907902..324e8d851dc4ca67fd0ded84a927e782c3647c8c 100644 (file)
@@ -28,6 +28,7 @@ static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
        if (!err) {
                wdev->beacon_interval = 0;
                wdev->channel = NULL;
+               wdev->ssid_len = 0;
        }
 
        return err;
index ba44f98c56d971e1fc1c1c474b555877c14595c4..e521ca09d6a455d7cc96ce500df845aa57548bc7 100644 (file)
@@ -2649,6 +2649,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
                wdev->preset_chantype = params.channel_type;
                wdev->beacon_interval = params.beacon_interval;
                wdev->channel = params.channel;
+               wdev->ssid_len = params.ssid_len;
+               memcpy(wdev->ssid, params.ssid, wdev->ssid_len);
        }
        return err;
 }