[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210507213149.140192-1-marex@denx.de>
Date: Fri, 7 May 2021 23:31:49 +0200
From: Marek Vasut <marex@...x.de>
To: linux-wireless@...r.kernel.org
Cc: Marek Vasut <marex@...x.de>,
Amitkumar Karwar <amit.karwar@...pinesignals.com>,
Angus Ainslie <angus@...ea.ca>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Kalle Valo <kvalo@...eaurora.org>,
Karun Eagalapati <karun256@...il.com>,
Martin Kepplinger <martink@...teo.de>,
Prameela Rani Garnepudi <prameela.j04cs@...il.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>,
Siva Rebbagondla <siva8118@...il.com>, netdev@...r.kernel.org
Subject: [PATCH] rsi: Add support for changing beacon interval
Pick code for changing the beacon interval (e.g. using beacon_int in
hostap config) from the downstream RSI driver.
Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Amitkumar Karwar <amit.karwar@...pinesignals.com>
Cc: Angus Ainslie <angus@...ea.ca>
Cc: David S. Miller <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Kalle Valo <kvalo@...eaurora.org>
Cc: Karun Eagalapati <karun256@...il.com>
Cc: Martin Kepplinger <martink@...teo.de>
Cc: Prameela Rani Garnepudi <prameela.j04cs@...il.com>
Cc: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>
Cc: Siva Rebbagondla <siva8118@...il.com>
Cc: netdev@...r.kernel.org
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 16025300cddb..d9f1e73293aa 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -837,6 +837,23 @@ static void rsi_mac80211_bss_info_changed(struct ieee80211_hw *hw,
common->cqm_info.rssi_hyst);
}
+ if (changed & BSS_CHANGED_BEACON_INT) {
+ rsi_dbg(INFO_ZONE, "%s: Changed Beacon interval: %d\n",
+ __func__, bss_conf->beacon_int);
+ if (common->beacon_interval != bss->beacon_int) {
+ common->beacon_interval = bss->beacon_int;
+ if (vif->type == NL80211_IFTYPE_AP) {
+ struct vif_priv *vif_info = (struct vif_priv *)vif->drv_priv;
+
+ rsi_set_vap_capabilities(common, RSI_OPMODE_AP,
+ vif->addr, vif_info->vap_id,
+ VAP_UPDATE);
+ }
+ }
+ adapter->ps_info.listen_interval =
+ bss->beacon_int * adapter->ps_info.num_bcns_per_lis_int;
+ }
+
if ((changed & BSS_CHANGED_BEACON_ENABLED) &&
((vif->type == NL80211_IFTYPE_AP) ||
(vif->type == NL80211_IFTYPE_P2P_GO))) {
--
2.30.2
Powered by blists - more mailing lists