Commit 29ca9e6c authored by Marek Vasut's avatar Marek Vasut Committed by Kalle Valo

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: default avatarMarek Vasut <marex@denx.de>
Cc: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Cc: Angus Ainslie <angus@akkea.ca>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Karun Eagalapati <karun256@gmail.com>
Cc: Martin Kepplinger <martink@posteo.de>
Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Cc: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Cc: Siva Rebbagondla <siva8118@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210507213149.140192-1-marex@denx.de
parent b1c3a248
......@@ -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))) {
......
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