Message ID | 20240412115729.8316-6-pkshih@realtek.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ping-Ke Shih |
Headers | show |
Series | wifi: rtw89: configure 5.9 and 6 GHz channels and power type by BIOS settings | expand |
diff --git a/drivers/net/wireless/realtek/rtw89/regd.c b/drivers/net/wireless/realtek/rtw89/regd.c index d0857ef60ea6..85a7f902ccf9 100644 --- a/drivers/net/wireless/realtek/rtw89/regd.c +++ b/drivers/net/wireless/realtek/rtw89/regd.c @@ -572,10 +572,8 @@ static void rtw89_regd_apply_policy_6ghz(struct rtw89_dev *rtwdev, int i; index = rtw89_regd_get_index(regd); - if (index == RTW89_REGD_MAX_COUNTRY_NUM) - return; - - if (!test_bit(index, regulatory->block_6ghz)) + if (index != RTW89_REGD_MAX_COUNTRY_NUM && + !test_bit(index, regulatory->block_6ghz)) return; rtw89_debug(rtwdev, RTW89_DBG_REGD, "%c%c 6 GHz is blocked by policy\n",