mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 04:29:11 -04:00
wifi: rtw89: mcc: enlarge GO NoA duration to cover channel switching time
MCC require time to switch channel when changing timeslot. If GC TX nulldata 0 while GO is switching channel, GO can't receive it. Therefore, enlarge the GO NoA duration to cover the channel switching time. However, the enlarged NoA duration might cause GC's timeslot less than minimum of RX beacon time. Therefore, adjust strict and anchor pattern condition to avoid it. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250710042423.73617-4-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
9126020ab0
commit
025e39032d
@@ -1116,7 +1116,7 @@ static int __rtw89_mcc_calc_pattern_strict(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_mcc_role *ref = &mcc->role_ref;
|
||||
struct rtw89_mcc_role *aux = &mcc->role_aux;
|
||||
struct rtw89_mcc_config *config = &mcc->config;
|
||||
u16 min_tob = RTW89_MCC_EARLY_RX_BCN_TIME;
|
||||
u16 min_tob = RTW89_MCC_EARLY_RX_BCN_TIME + RTW89_MCC_SWITCH_CH_TIME;
|
||||
u16 min_toa = RTW89_MCC_MIN_RX_BCN_TIME;
|
||||
u16 bcn_ofst = config->beacon_offset;
|
||||
s16 upper_toa_ref, lower_toa_ref;
|
||||
@@ -1272,11 +1272,11 @@ static int __rtw89_mcc_calc_pattern_anchor(struct rtw89_dev *rtwdev,
|
||||
u16 bcn_ofst = config->beacon_offset;
|
||||
bool small_bcn_ofst;
|
||||
|
||||
if (bcn_ofst < RTW89_MCC_MIN_RX_BCN_TIME)
|
||||
if (bcn_ofst < RTW89_MCC_MIN_RX_BCN_WITH_SWITCH_CH_TIME)
|
||||
small_bcn_ofst = true;
|
||||
else if (bcn_ofst < aux->duration - aux->limit.max_toa)
|
||||
small_bcn_ofst = true;
|
||||
else if (mcc_intvl - bcn_ofst < RTW89_MCC_MIN_RX_BCN_TIME)
|
||||
else if (mcc_intvl - bcn_ofst < RTW89_MCC_MIN_RX_BCN_WITH_SWITCH_CH_TIME)
|
||||
small_bcn_ofst = false;
|
||||
else
|
||||
return -EPERM;
|
||||
@@ -2171,6 +2171,7 @@ static void rtw89_mcc_handle_beacon_noa(struct rtw89_dev *rtwdev, bool enable)
|
||||
rtw89_p2p_noa_renew(rtwvif_go);
|
||||
|
||||
if (enable) {
|
||||
duration += RTW89_MCC_SWITCH_CH_TIME;
|
||||
noa_desc.start_time = cpu_to_le32(start_time);
|
||||
noa_desc.interval = cpu_to_le32(ieee80211_tu_to_usec(interval));
|
||||
noa_desc.duration = cpu_to_le32(ieee80211_tu_to_usec(duration));
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define RTW89_MCC_EARLY_RX_BCN_TIME 5
|
||||
#define RTW89_MCC_MIN_RX_BCN_TIME 10
|
||||
#define RTW89_MCC_DFLT_BCN_OFST_TIME 40
|
||||
#define RTW89_MCC_SWITCH_CH_TIME 3
|
||||
|
||||
#define RTW89_MCC_PROBE_TIMEOUT 100
|
||||
#define RTW89_MCC_PROBE_MAX_TRIES 3
|
||||
@@ -28,6 +29,9 @@
|
||||
#define RTW89_MCC_MIN_STA_DURATION \
|
||||
(RTW89_MCC_EARLY_RX_BCN_TIME + RTW89_MCC_MIN_RX_BCN_TIME)
|
||||
|
||||
#define RTW89_MCC_MIN_RX_BCN_WITH_SWITCH_CH_TIME \
|
||||
(RTW89_MCC_MIN_RX_BCN_TIME + RTW89_MCC_SWITCH_CH_TIME)
|
||||
|
||||
#define RTW89_MCC_DFLT_GROUP 0
|
||||
#define RTW89_MCC_NEXT_GROUP(cur) (((cur) + 1) % 4)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user