aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBala Shanmugam <bkamatch@qca.qualcomm.com>2012-03-07 06:57:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:19:34 -0400
commit4486ea987efdaa546bdda569e3dfacdc14a9fb13 (patch)
tree2d9a0bb6580772d483f7480469e6ce06f8f87bb3 /net
parentbff2ec2b916cc85628f3025e08660c0350f03650 (diff)
cfg80211: Add background scan period attribute.
Receive background scan period as part of connect command and pass the same to the driver. Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c8
-rw-r--r--net/wireless/wext-sme.c3
2 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 39dbdf2adb12..4c1eb9472ddb 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -205,6 +205,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
205 }, 205 },
206 [NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 }, 206 [NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 },
207 [NL80211_ATTR_INACTIVITY_TIMEOUT] = { .type = NLA_U16 }, 207 [NL80211_ATTR_INACTIVITY_TIMEOUT] = { .type = NLA_U16 },
208 [NL80211_ATTR_BG_SCAN_PERIOD] = { .type = NLA_U16 },
208}; 209};
209 210
210/* policy for the key attributes */ 211/* policy for the key attributes */
@@ -5116,6 +5117,13 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
5116 5117
5117 wiphy = &rdev->wiphy; 5118 wiphy = &rdev->wiphy;
5118 5119
5120 connect.bg_scan_period = -1;
5121 if (info->attrs[NL80211_ATTR_BG_SCAN_PERIOD] &&
5122 (wiphy->flags & WIPHY_FLAG_SUPPORTS_FW_ROAM)) {
5123 connect.bg_scan_period =
5124 nla_get_u16(info->attrs[NL80211_ATTR_BG_SCAN_PERIOD]);
5125 }
5126
5119 if (info->attrs[NL80211_ATTR_MAC]) 5127 if (info->attrs[NL80211_ATTR_MAC])
5120 connect.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); 5128 connect.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]);
5121 connect.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]); 5129 connect.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index 326750b99151..7c01c2f3b6cf 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -30,6 +30,9 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
30 wdev->wext.connect.ie = wdev->wext.ie; 30 wdev->wext.connect.ie = wdev->wext.ie;
31 wdev->wext.connect.ie_len = wdev->wext.ie_len; 31 wdev->wext.connect.ie_len = wdev->wext.ie_len;
32 32
33 /* Use default background scan period */
34 wdev->wext.connect.bg_scan_period = -1;
35
33 if (wdev->wext.keys) { 36 if (wdev->wext.keys) {
34 wdev->wext.keys->def = wdev->wext.default_key; 37 wdev->wext.keys->def = wdev->wext.default_key;
35 wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; 38 wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;