mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 11:26:43 +07:00
wl12xx: avoid bail out when probe-resp is not set by mac80211
During reconfig we can get the BSS_CHANGED_AP_PROBE_RESP indication even if a probe-resp has not been set in the first place. Therefore ignore the error when not getting a probe-resp from mac80211. Resort to the legacy probe-resp in this case. Also take this opportunity to add a vif argument to the set_probe_resp function. Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
97127e6721
commit
341f2c11b5
@ -3299,14 +3299,15 @@ static void wl12xx_remove_vendor_ie(struct sk_buff *skb,
|
|||||||
skb_trim(skb, skb->len - len);
|
skb_trim(skb, skb->len - len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wl1271_ap_set_probe_resp_tmpl(struct wl1271 *wl, u32 rates)
|
static int wl1271_ap_set_probe_resp_tmpl(struct wl1271 *wl, u32 rates,
|
||||||
|
struct ieee80211_vif *vif)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
skb = ieee80211_proberesp_get(wl->hw, wl->vif);
|
skb = ieee80211_proberesp_get(wl->hw, vif);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
return -EINVAL;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
ret = wl1271_cmd_template_set(wl,
|
ret = wl1271_cmd_template_set(wl,
|
||||||
CMD_TEMPL_AP_PROBE_RESPONSE,
|
CMD_TEMPL_AP_PROBE_RESPONSE,
|
||||||
@ -3437,12 +3438,10 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl,
|
|||||||
|
|
||||||
if ((changed & BSS_CHANGED_AP_PROBE_RESP) && is_ap) {
|
if ((changed & BSS_CHANGED_AP_PROBE_RESP) && is_ap) {
|
||||||
u32 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
u32 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
||||||
ret = wl1271_ap_set_probe_resp_tmpl(wl, rate);
|
if (!wl1271_ap_set_probe_resp_tmpl(wl, rate, vif)) {
|
||||||
if (ret < 0)
|
wl1271_debug(DEBUG_AP, "probe response updated");
|
||||||
goto out;
|
set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags);
|
||||||
|
}
|
||||||
wl1271_debug(DEBUG_AP, "probe response updated");
|
|
||||||
set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((changed & BSS_CHANGED_BEACON)) {
|
if ((changed & BSS_CHANGED_BEACON)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user