* [PATCH] ath6kl: Clear the IE in firmware if not set
@ 2012-02-28 17:17 Aarthi Thiruvengadam
2012-03-01 6:38 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Aarthi Thiruvengadam @ 2012-02-28 17:17 UTC (permalink / raw)
To: kvalo; +Cc: ath6kl-devel, linux-wireless, Aarthi Thiruvengadam
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.
Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 64 +++++++++++++---------------
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 a91f521..73848c0 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -877,19 +877,14 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
request->ssids[i].ssid);
}
- /*
- * FIXME: we should clear the IE in fw if it's not set so just
- * remove the check altogether
- */
- if (request->ie) {
- ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
- WMI_FRAME_PROBE_REQ,
- request->ie, request->ie_len);
- if (ret) {
- ath6kl_err("failed to set Probe Request appie for "
- "scan");
- return ret;
- }
+ /* this also clears IE in fw if it's not set */
+ ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
+ WMI_FRAME_PROBE_REQ,
+ request->ie, request->ie_len);
+ if (ret) {
+ ath6kl_err("failed to set Probe Request appie for "
+ "scan");
+ return ret;
}
/*
@@ -2290,28 +2285,27 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
if (vif->next_mode != AP_NETWORK)
return -EOPNOTSUPP;
- if (info->beacon_ies) {
- res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
- WMI_FRAME_BEACON,
- info->beacon_ies,
- info->beacon_ies_len);
- if (res)
- return res;
- }
- if (info->proberesp_ies) {
- res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
- info->proberesp_ies_len);
- if (res)
- return res;
- }
- if (info->assocresp_ies) {
- res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
- WMI_FRAME_ASSOC_RESP,
- info->assocresp_ies,
- info->assocresp_ies_len);
- if (res)
- return res;
- }
+ /* this also clears IE in fw if it's not set */
+ res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
+ WMI_FRAME_BEACON,
+ info->beacon_ies,
+ info->beacon_ies_len);
+ if (res)
+ return res;
+
+ /* this also clears IE in fw if it's not set */
+ res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
+ info->proberesp_ies_len);
+ if (res)
+ return res;
+
+ /* this also clears IE in fw if it's not set */
+ res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
+ WMI_FRAME_ASSOC_RESP,
+ info->assocresp_ies,
+ info->assocresp_ies_len);
+ if (res)
+ return res;
if (!add)
return 0;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ath6kl: Clear the IE in firmware if not set
2012-02-28 17:17 [PATCH] ath6kl: Clear the IE in firmware if not set Aarthi Thiruvengadam
@ 2012-03-01 6:38 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-03-01 6:38 UTC (permalink / raw)
To: Aarthi Thiruvengadam; +Cc: ath6kl-devel, linux-wireless
On 02/28/2012 07:17 PM, Aarthi Thiruvengadam wrote:
> 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.
>
> Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Thanks, applied.
Kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-01 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28 17:17 [PATCH] ath6kl: Clear the IE in firmware if not set Aarthi Thiruvengadam
2012-03-01 6:38 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).