aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAarthi Thiruvengadam <athiruve@qca.qualcomm.com>2012-02-28 12:17:04 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-01 01:37:32 -0500
commit080eec4fb478f10c6f171875634fc3174da1a1c3 (patch)
tree98822bd9143851f4537adddc06037447c1a3811c /drivers
parente5348a1e3341dca3e53a6db568c2d4d48929dd95 (diff)
ath6kl: Clear the IE in firmware if not set
Remove check so that IE in firmware is cleared if not set. Without this fix, any previously set IE will be used incorrectly in the next frame. For example, consider the scenario where a P2P device scan is followed by a regular station scan. The P2P IE set by the P2P scan needs to be cleared, otherwise the station scan will contain the P2P IE. kvalo: indentation fixes Signed-off-by: Aarthi Thiruvengadam <athiruve@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.c64
1 files changed, 29 insertions, 35 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 50b76d0a4c6a..0becddd8b585 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -885,19 +885,14 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
885 request->ssids[i].ssid); 885 request->ssids[i].ssid);
886 } 886 }
887 887
888 /* 888 /* this also clears IE in fw if it's not set */
889 * FIXME: we should clear the IE in fw if it's not set so just 889 ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
890 * remove the check altogether 890 WMI_FRAME_PROBE_REQ,
891 */ 891 request->ie, request->ie_len);
892 if (request->ie) { 892 if (ret) {
893 ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, 893 ath6kl_err("failed to set Probe Request appie for "
894 WMI_FRAME_PROBE_REQ, 894 "scan");
895 request->ie, request->ie_len); 895 return ret;
896 if (ret) {
897 ath6kl_err("failed to set Probe Request appie for "
898 "scan");
899 return ret;
900 }
901 } 896 }
902 897
903 /* 898 /*
@@ -2301,28 +2296,27 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
2301 if (vif->next_mode != AP_NETWORK) 2296 if (vif->next_mode != AP_NETWORK)
2302 return -EOPNOTSUPP; 2297 return -EOPNOTSUPP;
2303 2298
2304 if (info->beacon_ies) { 2299 /* this also clears IE in fw if it's not set */
2305 res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, 2300 res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
2306 WMI_FRAME_BEACON, 2301 WMI_FRAME_BEACON,
2307 info->beacon_ies, 2302 info->beacon_ies,
2308 info->beacon_ies_len); 2303 info->beacon_ies_len);
2309 if (res) 2304 if (res)
2310 return res; 2305 return res;
2311 } 2306
2312 if (info->proberesp_ies) { 2307 /* this also clears IE in fw if it's not set */
2313 res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies, 2308 res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
2314 info->proberesp_ies_len); 2309 info->proberesp_ies_len);
2315 if (res) 2310 if (res)
2316 return res; 2311 return res;
2317 } 2312
2318 if (info->assocresp_ies) { 2313 /* this also clears IE in fw if it's not set */
2319 res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, 2314 res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
2320 WMI_FRAME_ASSOC_RESP, 2315 WMI_FRAME_ASSOC_RESP,
2321 info->assocresp_ies, 2316 info->assocresp_ies,
2322 info->assocresp_ies_len); 2317 info->assocresp_ies_len);
2323 if (res) 2318 if (res)
2324 return res; 2319 return res;
2325 }
2326 2320
2327 if (!add) 2321 if (!add)
2328 return 0; 2322 return 0;