aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-05-09 15:14:51 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-05-11 04:51:08 -0400
commit8ab5415d6c701a59dd6fc2bc93cf476ecc03ada5 (patch)
tree661b774678d7698b71b2a2526a5292dc06df9200 /drivers
parentf3740572512075839e1a7ebde970081106fed3f0 (diff)
ath6kl: Use correct max-scan-SSIDs limit
The currently used firmware images support 16 SSIDs in the scan request (indexes 0..15), so update the host driver to use the same limit to allow some more SSIDs to be scanned per request. In addition, change the max-index to max-SSIDs to make it easier to understand the implementation and fix couple of off-by-one checks that could limit the maximum number of entries too strictly. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c8
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c2
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index b869a358ce43..a6bebc20fd18 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -888,7 +888,7 @@ static int ath6kl_set_probed_ssids(struct ath6kl *ar,
888{ 888{
889 u8 i; 889 u8 i;
890 890
891 if (n_ssids > MAX_PROBED_SSID_INDEX) 891 if (n_ssids > MAX_PROBED_SSIDS)
892 return -EINVAL; 892 return -EINVAL;
893 893
894 for (i = 0; i < n_ssids; i++) { 894 for (i = 0; i < n_ssids; i++) {
@@ -900,7 +900,7 @@ static int ath6kl_set_probed_ssids(struct ath6kl *ar,
900 } 900 }
901 901
902 /* Make sure no old entries are left behind */ 902 /* Make sure no old entries are left behind */
903 for (i = n_ssids; i < MAX_PROBED_SSID_INDEX; i++) { 903 for (i = n_ssids; i < MAX_PROBED_SSIDS; i++) {
904 ath6kl_wmi_probedssid_cmd(ar->wmi, vif->fw_vif_idx, i, 904 ath6kl_wmi_probedssid_cmd(ar->wmi, vif->fw_vif_idx, i,
905 DISABLE_SSID_FLAG, 0, NULL); 905 DISABLE_SSID_FLAG, 0, NULL);
906 } 906 }
@@ -3470,7 +3470,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3470 } 3470 }
3471 3471
3472 /* max num of ssids that can be probed during scanning */ 3472 /* max num of ssids that can be probed during scanning */
3473 wiphy->max_scan_ssids = MAX_PROBED_SSID_INDEX; 3473 wiphy->max_scan_ssids = MAX_PROBED_SSIDS;
3474 wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */ 3474 wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */
3475 switch (ar->hw.cap) { 3475 switch (ar->hw.cap) {
3476 case WMI_11AN_CAP: 3476 case WMI_11AN_CAP:
@@ -3527,7 +3527,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3527 wiphy->wowlan.pattern_min_len = 1; 3527 wiphy->wowlan.pattern_min_len = 1;
3528 wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE; 3528 wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE;
3529 3529
3530 wiphy->max_sched_scan_ssids = MAX_PROBED_SSID_INDEX; 3530 wiphy->max_sched_scan_ssids = MAX_PROBED_SSIDS;
3531 3531
3532 ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM | 3532 ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM |
3533 WIPHY_FLAG_HAVE_AP_SME | 3533 WIPHY_FLAG_HAVE_AP_SME |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index ee8ec2394c2c..bdd3b2c55637 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1995,7 +1995,7 @@ int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag,
1995 struct wmi_probed_ssid_cmd *cmd; 1995 struct wmi_probed_ssid_cmd *cmd;
1996 int ret; 1996 int ret;
1997 1997
1998 if (index > MAX_PROBED_SSID_INDEX) 1998 if (index >= MAX_PROBED_SSIDS)
1999 return -EINVAL; 1999 return -EINVAL;
2000 2000
2001 if (ssid_len > sizeof(cmd->ssid)) 2001 if (ssid_len > sizeof(cmd->ssid))
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 9076bec3a2ba..3518550e3504 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -978,7 +978,7 @@ struct wmi_bss_filter_cmd {
978} __packed; 978} __packed;
979 979
980/* WMI_SET_PROBED_SSID_CMDID */ 980/* WMI_SET_PROBED_SSID_CMDID */
981#define MAX_PROBED_SSID_INDEX 9 981#define MAX_PROBED_SSIDS 16
982 982
983enum wmi_ssid_flag { 983enum wmi_ssid_flag {
984 /* disables entry */ 984 /* disables entry */
@@ -992,7 +992,7 @@ enum wmi_ssid_flag {
992}; 992};
993 993
994struct wmi_probed_ssid_cmd { 994struct wmi_probed_ssid_cmd {
995 /* 0 to MAX_PROBED_SSID_INDEX */ 995 /* 0 to MAX_PROBED_SSIDS - 1 */
996 u8 entry_index; 996 u8 entry_index;
997 997
998 /* see, enum wmi_ssid_flg */ 998 /* see, enum wmi_ssid_flg */