summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw89/mac80211.c
diff options
context:
space:
mode:
authorZong-Zhe Yang <kevin_yang@realtek.com>2022-11-29 16:31:30 +0800
committerKalle Valo <kvalo@kernel.org>2022-12-01 13:04:27 +0200
commit75ee07b03fc6ec0a7ac7407f9ea7b3e981efb28f (patch)
treee59cc0b6a0709808df30ceeed35bfe8be834e116 /drivers/net/wireless/realtek/rtw89/mac80211.c
parentc008c4b011baa26b9545f7be10e746c97409d45b (diff)
wifi: rtw89: link rtw89_vif and chanctx stuffs
First, introduce struct rtw89_sub_entity for chanctx related stuffs. Second, add enum rtw89_sub_entity_idx to rtw89_vif for vif operation to access its/right chanctx stuffs after future multi-channel support. Besides, RTW89_SUB_ENTITY_0 is the default chanctx entry throughout driver, i.e. it's used for things which may not have a target chanctx yet. So, we need to ensure that RTW89_SUB_ENTITY_0 is always working. If there is at least one alive chanctx, then one of them must take RTW89_SUB_ENTITY_0. If no alive chanctx, RTW89_SUB_ENTITY_0 will be filled by rtw89_config_default_chandef(). Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221129083130.45708-7-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/mac80211.c')
-rw-r--r--drivers/net/wireless/realtek/rtw89/mac80211.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index ce980d2f22c4..1a99267d710d 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -131,6 +131,7 @@ static int rtw89_ops_add_interface(struct ieee80211_hw *hw,
rtwvif->bcn_hit_cond = 0;
rtwvif->mac_idx = RTW89_MAC_0;
rtwvif->phy_idx = RTW89_PHY_0;
+ rtwvif->sub_entity_idx = RTW89_SUB_ENTITY_0;
rtwvif->hit_rule = 0;
ether_addr_copy(rtwvif->mac_addr, vif->addr);