Commit 080eec4f authored by Aarthi Thiruvengadam's avatar Aarthi Thiruvengadam Committed by Kalle Valo

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: default avatarAarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent e5348a1e
...@@ -885,19 +885,14 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -885,19 +885,14 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
request->ssids[i].ssid); request->ssids[i].ssid);
} }
/* /* this also clears IE in fw if it's not set */
* FIXME: we should clear the IE in fw if it's not set so just ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
* remove the check altogether WMI_FRAME_PROBE_REQ,
*/ request->ie, request->ie_len);
if (request->ie) { if (ret) {
ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, ath6kl_err("failed to set Probe Request appie for "
WMI_FRAME_PROBE_REQ, "scan");
request->ie, request->ie_len); return ret;
if (ret) {
ath6kl_err("failed to set Probe Request appie for "
"scan");
return ret;
}
} }
/* /*
...@@ -2301,28 +2296,27 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, ...@@ -2301,28 +2296,27 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
if (vif->next_mode != AP_NETWORK) if (vif->next_mode != AP_NETWORK)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (info->beacon_ies) { /* this also clears IE in fw if it's not set */
res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
WMI_FRAME_BEACON, WMI_FRAME_BEACON,
info->beacon_ies, info->beacon_ies,
info->beacon_ies_len); info->beacon_ies_len);
if (res) if (res)
return res; return res;
}
if (info->proberesp_ies) { /* this also clears IE in fw if it's not set */
res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies, res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
info->proberesp_ies_len); info->proberesp_ies_len);
if (res) if (res)
return res; return res;
}
if (info->assocresp_ies) { /* this also clears IE in fw if it's not set */
res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
WMI_FRAME_ASSOC_RESP, WMI_FRAME_ASSOC_RESP,
info->assocresp_ies, info->assocresp_ies,
info->assocresp_ies_len); info->assocresp_ies_len);
if (res) if (res)
return res; return res;
}
if (!add) if (!add)
return 0; return 0;
......
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