aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-09-19 12:15:06 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-22 03:07:59 -0400
commit551185ca0a97a11917edc3ad8e11d68912795902 (patch)
tree819e0e5473c144fbd95832f003dcb53b3361eecd
parent82e14f56f7408cb13c47eef9fd6922f22e88109a (diff)
ath6kl: Update BSS information after connection
Since we may end up using a dummy BSS entry when roaming, allow one Beacon frame -based bssinfo from the current BSS to be processed prior to starting to filter all bssinfo events. This allows cfg80211 BSS table to be filled with proper data in the roaming case where the full Beacon data may not have been present at the time of roamed event. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c2
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c10
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c6
4 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index b32843779c5f..0bdd837d6121 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -360,6 +360,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
360 } 360 }
361 361
362 if (!ar->usr_bss_filter) { 362 if (!ar->usr_bss_filter) {
363 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag);
363 if (ath6kl_wmi_bssfilter_cmd(ar->wmi, ALL_BSS_FILTER, 0) != 0) { 364 if (ath6kl_wmi_bssfilter_cmd(ar->wmi, ALL_BSS_FILTER, 0) != 0) {
364 ath6kl_err("couldn't set bss filtering\n"); 365 ath6kl_err("couldn't set bss filtering\n");
365 up(&ar->sem); 366 up(&ar->sem);
@@ -638,6 +639,7 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
638 return -EIO; 639 return -EIO;
639 640
640 if (!ar->usr_bss_filter) { 641 if (!ar->usr_bss_filter) {
642 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag);
641 ret = ath6kl_wmi_bssfilter_cmd( 643 ret = ath6kl_wmi_bssfilter_cmd(
642 ar->wmi, 644 ar->wmi,
643 (test_bit(CONNECTED, &ar->flag) ? 645 (test_bit(CONNECTED, &ar->flag) ?
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 9e6abb85fc50..c14bb75d3614 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -394,6 +394,7 @@ struct ath6kl_req_key {
394#define SKIP_SCAN 11 394#define SKIP_SCAN 11
395#define WLAN_ENABLED 12 395#define WLAN_ENABLED 12
396#define TESTMODE 13 396#define TESTMODE 13
397#define CLEAR_BSSFILTER_ON_BEACON 14
397 398
398struct ath6kl { 399struct ath6kl {
399 struct device *dev; 400 struct device *dev;
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 55d3331bed85..30b5a53db9ed 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -1011,8 +1011,10 @@ void ath6kl_scan_complete_evt(struct ath6kl *ar, int status)
1011{ 1011{
1012 ath6kl_cfg80211_scan_complete_event(ar, status); 1012 ath6kl_cfg80211_scan_complete_event(ar, status);
1013 1013
1014 if (!ar->usr_bss_filter) 1014 if (!ar->usr_bss_filter) {
1015 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag);
1015 ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); 1016 ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0);
1017 }
1016 1018
1017 ath6kl_dbg(ATH6KL_DBG_WLAN_SCAN, "scan complete: %d\n", status); 1019 ath6kl_dbg(ATH6KL_DBG_WLAN_SCAN, "scan complete: %d\n", status);
1018} 1020}
@@ -1056,8 +1058,10 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid,
1056 ar->next_ep_id = ENDPOINT_2; 1058 ar->next_ep_id = ENDPOINT_2;
1057 } 1059 }
1058 1060
1059 if (!ar->usr_bss_filter) 1061 if (!ar->usr_bss_filter) {
1060 ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); 1062 set_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag);
1063 ath6kl_wmi_bssfilter_cmd(ar->wmi, CURRENT_BSS_FILTER, 0);
1064 }
1061} 1065}
1062 1066
1063void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) 1067void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 72cf78c1ca6a..f7dcb56ab354 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -917,6 +917,12 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
917 bih->frame_type != PROBERESP_FTYPE) 917 bih->frame_type != PROBERESP_FTYPE)
918 return 0; /* Only update BSS table for now */ 918 return 0; /* Only update BSS table for now */
919 919
920 if (bih->frame_type == BEACON_FTYPE &&
921 test_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag)) {
922 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &ar->flag);
923 ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0);
924 }
925
920 channel = ieee80211_get_channel(ar->wdev->wiphy, le16_to_cpu(bih->ch)); 926 channel = ieee80211_get_channel(ar->wdev->wiphy, le16_to_cpu(bih->ch));
921 if (channel == NULL) 927 if (channel == NULL)
922 return -EINVAL; 928 return -EINVAL;