aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-05-16 12:40:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-19 10:37:18 -0400
commited9d01026f156db2d638cbb045231c7a8fde877d (patch)
tree0c99c25b87973112db1b8464e5ad429cd943786f /drivers
parent79d2b1570bcc31b846ccb2114a34e98ca87bf1d9 (diff)
cfg80211: Use consistent BSS matching between scan and sme
cfg80211 scan code adds separate BSS entries if the same BSS shows up on multiple channels. However, sme implementation does not use the frequency when fetching the BSS entry. Fix this by adding channel information to cfg80211_roamed() and include it in cfg80211_get_bss() calls. Please note that drivers using cfg80211_roamed() need to be modified to fully implement this fix. This commit includes only minimal changes to avoid compilation issues; it maintains the old (broken) behavior for most drivers. ath6kl was the only one that I could test, so I updated it to provide the operating frequency in the roamed event. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/rx.c4
-rw-r--r--drivers/net/wireless/rndis_wlan.c3
-rw-r--r--drivers/staging/ath6kl/os/linux/cfg80211.c2
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c4
-rw-r--r--drivers/staging/wlan-ng/cfg80211.c2
5 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index 5665a1a9b99e..a414768f40f1 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -565,7 +565,7 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
565 if (!test_and_clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status) 565 if (!test_and_clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status)
566 && iwm->conf.mode == UMAC_MODE_BSS) { 566 && iwm->conf.mode == UMAC_MODE_BSS) {
567 cancel_delayed_work(&iwm->disconnect); 567 cancel_delayed_work(&iwm->disconnect);
568 cfg80211_roamed(iwm_to_ndev(iwm), 568 cfg80211_roamed(iwm_to_ndev(iwm), NULL,
569 complete->bssid, 569 complete->bssid,
570 iwm->req_ie, iwm->req_ie_len, 570 iwm->req_ie, iwm->req_ie_len,
571 iwm->resp_ie, iwm->resp_ie_len, 571 iwm->resp_ie, iwm->resp_ie_len,
@@ -586,7 +586,7 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
586 WLAN_STATUS_SUCCESS, 586 WLAN_STATUS_SUCCESS,
587 GFP_KERNEL); 587 GFP_KERNEL);
588 else 588 else
589 cfg80211_roamed(iwm_to_ndev(iwm), 589 cfg80211_roamed(iwm_to_ndev(iwm), NULL,
590 complete->bssid, 590 complete->bssid,
591 iwm->req_ie, iwm->req_ie_len, 591 iwm->req_ie, iwm->req_ie_len,
592 iwm->resp_ie, iwm->resp_ie_len, 592 iwm->resp_ie, iwm->resp_ie_len,
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 518542b4bf9e..29f938930667 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2830,7 +2830,8 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev)
2830 req_ie_len, resp_ie, 2830 req_ie_len, resp_ie,
2831 resp_ie_len, 0, GFP_KERNEL); 2831 resp_ie_len, 0, GFP_KERNEL);
2832 else 2832 else
2833 cfg80211_roamed(usbdev->net, bssid, req_ie, req_ie_len, 2833 cfg80211_roamed(usbdev->net, NULL, bssid,
2834 req_ie, req_ie_len,
2834 resp_ie, resp_ie_len, GFP_KERNEL); 2835 resp_ie, resp_ie_len, GFP_KERNEL);
2835 } else if (priv->infra_mode == NDIS_80211_INFRA_ADHOC) 2836 } else if (priv->infra_mode == NDIS_80211_INFRA_ADHOC)
2836 cfg80211_ibss_joined(usbdev->net, bssid, GFP_KERNEL); 2837 cfg80211_ibss_joined(usbdev->net, bssid, GFP_KERNEL);
diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c
index bcca39418f90..5bda24e26c0e 100644
--- a/drivers/staging/ath6kl/os/linux/cfg80211.c
+++ b/drivers/staging/ath6kl/os/linux/cfg80211.c
@@ -570,7 +570,7 @@ ar6k_cfg80211_connect_event(struct ar6_softc *ar, u16 channel,
570 WLAN_STATUS_SUCCESS, GFP_KERNEL); 570 WLAN_STATUS_SUCCESS, GFP_KERNEL);
571 } else { 571 } else {
572 /* inform roam event to cfg80211 */ 572 /* inform roam event to cfg80211 */
573 cfg80211_roamed(ar->arNetDev, bssid, 573 cfg80211_roamed(ar->arNetDev, ibss_channel, bssid,
574 assocReqIe, assocReqLen, 574 assocReqIe, assocReqLen,
575 assocRespIe, assocRespLen, 575 assocRespIe, assocRespLen,
576 GFP_KERNEL); 576 GFP_KERNEL);
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index 555b056b49b1..7aaf99cc3a7b 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -2630,7 +2630,7 @@ wl_bss_roaming_done(struct wl_priv *wl, struct net_device *ndev,
2630 wl_get_assoc_ies(wl); 2630 wl_get_assoc_ies(wl);
2631 memcpy(&wl->bssid, &e->addr, ETH_ALEN); 2631 memcpy(&wl->bssid, &e->addr, ETH_ALEN);
2632 wl_update_bss_info(wl); 2632 wl_update_bss_info(wl);
2633 cfg80211_roamed(ndev, 2633 cfg80211_roamed(ndev, NULL,
2634 (u8 *)&wl->bssid, 2634 (u8 *)&wl->bssid,
2635 conn_info->req_ie, conn_info->req_ie_len, 2635 conn_info->req_ie, conn_info->req_ie_len,
2636 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); 2636 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
@@ -2663,7 +2663,7 @@ wl_bss_connect_done(struct wl_priv *wl, struct net_device *ndev,
2663 WL_DBG("Report connect result - connection %s\n", 2663 WL_DBG("Report connect result - connection %s\n",
2664 completed ? "succeeded" : "failed"); 2664 completed ? "succeeded" : "failed");
2665 } else { 2665 } else {
2666 cfg80211_roamed(ndev, 2666 cfg80211_roamed(ndev, NULL,
2667 (u8 *)&wl->bssid, 2667 (u8 *)&wl->bssid,
2668 conn_info->req_ie, conn_info->req_ie_len, 2668 conn_info->req_ie, conn_info->req_ie_len,
2669 conn_info->resp_ie, conn_info->resp_ie_len, 2669 conn_info->resp_ie, conn_info->resp_ie_len,
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 6a71f52c59b1..473438893a11 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -695,7 +695,7 @@ void prism2_disconnected(wlandevice_t *wlandev)
695 695
696void prism2_roamed(wlandevice_t *wlandev) 696void prism2_roamed(wlandevice_t *wlandev)
697{ 697{
698 cfg80211_roamed(wlandev->netdev, wlandev->bssid, 698 cfg80211_roamed(wlandev->netdev, NULL, wlandev->bssid,
699 NULL, 0, NULL, 0, GFP_KERNEL); 699 NULL, 0, NULL, 0, GFP_KERNEL);
700} 700}
701 701