Commit 28f7e85a authored by Vipin Mehta's avatar Vipin Mehta Committed by Greg Kroah-Hartman

staging: ath6kl: Fixing accidental overwriting of probed ssid list in the hardware

Fixing the code to avoid overwriting of the first index in the probed ssid
list maintained by the hardware. This index is used to store broadcast SSID.
Signed-off-by: default avatarVipin Mehta <vmehta@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 98b6d238
...@@ -765,12 +765,12 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -765,12 +765,12 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
request->ssids[0].ssid_len) { request->ssids[0].ssid_len) {
u8 i; u8 i;
if(request->n_ssids > MAX_PROBED_SSID_INDEX) { if(request->n_ssids > (MAX_PROBED_SSID_INDEX - 1)) {
request->n_ssids = MAX_PROBED_SSID_INDEX; request->n_ssids = MAX_PROBED_SSID_INDEX - 1;
} }
for (i = 0; i < request->n_ssids; i++) { for (i = 0; i < request->n_ssids; i++) {
wmi_probedSsid_cmd(ar->arWmi, i, SPECIFIC_SSID_FLAG, wmi_probedSsid_cmd(ar->arWmi, i+1, SPECIFIC_SSID_FLAG,
request->ssids[i].ssid_len, request->ssids[i].ssid_len,
request->ssids[i].ssid); request->ssids[i].ssid);
} }
...@@ -810,7 +810,7 @@ ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status) ...@@ -810,7 +810,7 @@ ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status)
u8 i; u8 i;
for (i = 0; i < ar->scan_request->n_ssids; i++) { for (i = 0; i < ar->scan_request->n_ssids; i++) {
wmi_probedSsid_cmd(ar->arWmi, i, DISABLE_SSID_FLAG, wmi_probedSsid_cmd(ar->arWmi, i+1, DISABLE_SSID_FLAG,
0, NULL); 0, NULL);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment