Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211
@ 2011-11-22 17:52 Arik Nemtsov
  2011-11-22 17:56 ` Arik Nemtsov
  2011-12-01 14:37 ` Luciano Coelho
  0 siblings, 2 replies; 3+ messages in thread
From: Arik Nemtsov @ 2011-11-22 17:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, Arik Nemtsov

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>
---
 drivers/net/wireless/wl12xx/main.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 08b06ee..8c58001 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3299,14 +3299,15 @@ static void wl12xx_remove_vendor_ie(struct sk_buff *skb,
 	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;
 	int ret;
 
-	skb = ieee80211_proberesp_get(wl->hw, wl->vif);
+	skb = ieee80211_proberesp_get(wl->hw, vif);
 	if (!skb)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	ret = wl1271_cmd_template_set(wl,
 				      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) {
 		u32 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
-		ret = wl1271_ap_set_probe_resp_tmpl(wl, rate);
-		if (ret < 0)
-			goto out;
-
-		wl1271_debug(DEBUG_AP, "probe response updated");
-		set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags);
+		if (!wl1271_ap_set_probe_resp_tmpl(wl, rate, vif)) {
+			wl1271_debug(DEBUG_AP, "probe response updated");
+			set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags);
+		}
 	}
 
 	if ((changed & BSS_CHANGED_BEACON)) {
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211
  2011-11-22 17:52 [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211 Arik Nemtsov
@ 2011-11-22 17:56 ` Arik Nemtsov
  2011-12-01 14:37 ` Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Arik Nemtsov @ 2011-11-22 17:56 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless

On Tue, Nov 22, 2011 at 19:52, Arik Nemtsov <arik@wizery.com> wrote:
> 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.

Luca - This patch should be applied on top of the wl12xx probe
response patches (currently still not in your tree, but sent to the
list):

b07e95e wl12xx: indicate probe-resp offloading support
d804317 wl12xx: configure probe-resp template according to notification

Arik

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211
  2011-11-22 17:52 [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211 Arik Nemtsov
  2011-11-22 17:56 ` Arik Nemtsov
@ 2011-12-01 14:37 ` Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-12-01 14:37 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless

On Tue, 2011-11-22 at 19:52 +0200, Arik Nemtsov wrote: 
> 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>
> ---

Applied.  Thanks!

-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-01 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 17:52 [PATCH] wl12xx: avoid bail out when probe-resp is not set by mac80211 Arik Nemtsov
2011-11-22 17:56 ` Arik Nemtsov
2011-12-01 14:37 ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox