]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
cfg80211/nl80211: Indicate roaming feature capability to userspace.
authorVivek Natarajan <nataraja@qca.qualcomm.com>
Mon, 29 Aug 2011 08:53:03 +0000 (14:23 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Sep 2011 19:42:31 +0000 (15:42 -0400)
When the rssi of the current AP drops, both wpa_supplicant and the
firmware may do a background scan to find a better AP and try to
associate. Since firmware based roaming is faster, inform
wpa_supplicant to avoid roaming and let the firmware decide to
roam if necessary.

For fullmac drivers like ath6kl, it is just enough to provide the
ESSID and the firmware will decide on the BSSID. Since it is not
possible to do pre-auth during roaming for fullmac drivers, the
wpa_supplicant needs to completely disconnect with the old AP and
reconnect with the new AP. This consumes lot of time and it is
better to leave the roaming decision to the firmware.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/linux/nl80211.h
include/net/cfg80211.h
net/wireless/nl80211.c

index 0343504082a81847de1184d911d9f3b2b2d189b1..f2d75e3ceb43c64dc32d98bab978d0e7667f0159 100644 (file)
@@ -1045,6 +1045,9 @@ enum nl80211_commands {
  * @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration
  *     of the station, see &enum nl80211_sta_wme_attr.
  *
+ * @NL80211_ATTR_ROAM_SUPPORT: Indicates whether the firmware is capable of
+ *     roaming to another AP in the same ESS if the signal lever is low.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1257,6 +1260,8 @@ enum nl80211_attrs {
 
        NL80211_ATTR_STA_WME,
 
+       NL80211_ATTR_ROAM_SUPPORT,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
index eb2659aefd97a07b10eba00b79fe7b73350e8827..53609dec2c9f0d820a9c05d7742012874f1a9e97 100644 (file)
@@ -1619,6 +1619,8 @@ struct cfg80211_ops {
  * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing
  *     auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH.
  * @WIPHY_FLAG_SUPPORTS_SCHED_SCAN: The device supports scheduled scans.
+ * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the
+ *     firmware.
  */
 enum wiphy_flags {
        WIPHY_FLAG_CUSTOM_REGULATORY            = BIT(0),
@@ -1633,6 +1635,7 @@ enum wiphy_flags {
        WIPHY_FLAG_MESH_AUTH                    = BIT(10),
        WIPHY_FLAG_SUPPORTS_SCHED_SCAN          = BIT(11),
        WIPHY_FLAG_ENFORCE_COMBINATIONS         = BIT(12),
+       WIPHY_FLAG_SUPPORTS_FW_ROAM             = BIT(13),
 };
 
 /**
index bddb5595c6598bf62d21bf1520fffa578d1eaf68..ad13903c9b89da6f7b2ed891527ec56c83f90b04 100644 (file)
@@ -189,6 +189,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
                                         .len = IEEE80211_MAX_DATA_LEN },
        [NL80211_ATTR_IE_ASSOC_RESP] = { .type = NLA_BINARY,
                                         .len = IEEE80211_MAX_DATA_LEN },
+       [NL80211_ATTR_ROAM_SUPPORT] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -720,6 +721,9 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
        if (dev->wiphy.flags & WIPHY_FLAG_MESH_AUTH)
                NLA_PUT_FLAG(msg, NL80211_ATTR_SUPPORT_MESH_AUTH);
 
+       if (dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM)
+               NLA_PUT_FLAG(msg, NL80211_ATTR_ROAM_SUPPORT);
+
        NLA_PUT(msg, NL80211_ATTR_CIPHER_SUITES,
                sizeof(u32) * dev->wiphy.n_cipher_suites,
                dev->wiphy.cipher_suites);