All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wlcore: reconfigure sta rates on authorization
@ 2016-06-19 14:08 Guy Mishol
  2016-06-29 16:03 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Guy Mishol @ 2016-06-19 14:08 UTC (permalink / raw)
  To: linux-wireless; +Cc: Guy Mishol

Since stations can now be added before association
(NL80211_FEATURE_FULL_AP_CLIENT_STATE support),
no supported rates are set when the station is added
to the fw, resulting in fw recovery.

Fix it by first configuring the AP basic rates as
the station configured rates (when the station is
first added to the driver), and after the station
was authorized re-configure it, now with the actual
supported rates.

Signed-off-by: Guy Mishol <guym@ti.com>
---
 drivers/net/wireless/ti/wlcore/cmd.c  | 7 +++++++
 drivers/net/wireless/ti/wlcore/main.c | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 3315356..5f360ce 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -1566,6 +1566,13 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
 							wlvif->band));
 
+	if (!cmd->supported_rates) {
+		wl1271_debug(DEBUG_CMD,
+			     "peer has no supported rates yet, configuring basic rates: 0x%x",
+			     wlvif->basic_rate_set);
+		cmd->supported_rates = cpu_to_le32(wlvif->basic_rate_set);
+	}
+
 	wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x",
 		     cmd->supported_rates, sta->uapsd_queues);
 
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 10fd24c..a53033d 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5091,6 +5091,11 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,
 		if (ret < 0)
 			return ret;
 
+		/* reconfigure rates */
+		ret = wl12xx_cmd_add_peer(wl, wlvif, sta, wl_sta->hlid);
+		if (ret < 0)
+			return ret;
+
 		ret = wl1271_acx_set_ht_capabilities(wl, &sta->ht_cap, true,
 						     wl_sta->hlid);
 		if (ret)
-- 
2.6.4


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

* Re: wlcore: reconfigure sta rates on authorization
  2016-06-19 14:08 [PATCH] wlcore: reconfigure sta rates on authorization Guy Mishol
@ 2016-06-29 16:03 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-06-29 16:03 UTC (permalink / raw)
  To: Guy Mishol; +Cc: linux-wireless, Guy Mishol

Guy Mishol <guym@ti.com> wrote:
> Since stations can now be added before association
> (NL80211_FEATURE_FULL_AP_CLIENT_STATE support),
> no supported rates are set when the station is added
> to the fw, resulting in fw recovery.
> 
> Fix it by first configuring the AP basic rates as
> the station configured rates (when the station is
> first added to the driver), and after the station
> was authorized re-configure it, now with the actual
> supported rates.
> 
> Signed-off-by: Guy Mishol <guym@ti.com>

Thanks, 1 patch applied to wireless-drivers-next.git:

535633a5ba4e wlcore: reconfigure sta rates on authorization

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9186155/


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

end of thread, other threads:[~2016-06-29 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-19 14:08 [PATCH] wlcore: reconfigure sta rates on authorization Guy Mishol
2016-06-29 16:03 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.