mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
wifi: rtw89: chan: re-config default chandef only when none is registered
Previously, default chandef is configured if no chanctx is active, i.e. no chanctx is assigned to some vif. For normal cases, it's fine. However, for impending CSA support, need to consider that one chanctx may be added, or called registered, ahead without being assigned immediately. Then, it will keep inactive, and might be covered by the default one when re-calculating chanctxs happens in certain sequences. So now, don't re-config the default chandef unless no chanctx is registered. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250605114207.12381-3-pkshih@realtek.com
This commit is contained in:
parent
6cd93f85af
commit
6c661eec29
|
|
@ -269,6 +269,8 @@ static void rtw89_entity_calculate_weight(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_vif *rtwvif;
|
||||
int idx;
|
||||
|
||||
w->registered_chanctxs = bitmap_weight(hal->entity_map, NUM_OF_RTW89_CHANCTX);
|
||||
|
||||
for_each_set_bit(idx, hal->entity_map, NUM_OF_RTW89_CHANCTX) {
|
||||
cfg = hal->chanctx[idx].cfg;
|
||||
if (!cfg) {
|
||||
|
|
@ -477,7 +479,8 @@ enum rtw89_entity_mode rtw89_entity_recalc(struct rtw89_dev *rtwdev)
|
|||
bitmap_zero(recalc_map, NUM_OF_RTW89_CHANCTX);
|
||||
fallthrough;
|
||||
case 0:
|
||||
rtw89_config_default_chandef(rtwdev);
|
||||
if (!w.registered_chanctxs)
|
||||
rtw89_config_default_chandef(rtwdev);
|
||||
set_bit(RTW89_CHANCTX_0, recalc_map);
|
||||
fallthrough;
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct rtw89_chanctx_cb_parm {
|
|||
};
|
||||
|
||||
struct rtw89_entity_weight {
|
||||
unsigned int registered_chanctxs;
|
||||
unsigned int active_chanctxs;
|
||||
unsigned int active_roles;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user