@@ -293,19 +293,58 @@ static void rtw89_get_channel_params(struct cfg80211_chan_def *chandef,
break;
}
- switch (center_chan) {
+ switch (band) {
default:
- case 1 ... 14:
- subband = RTW89_CH_2G;
- break;
- case 36 ... 64:
- subband = RTW89_CH_5G_BAND_1;
+ case RTW89_BAND_2G:
+ switch (center_chan) {
+ default:
+ case 1 ... 14:
+ subband = RTW89_CH_2G;
+ break;
+ }
break;
- case 100 ... 144:
- subband = RTW89_CH_5G_BAND_3;
+ case RTW89_BAND_5G:
+ switch (center_chan) {
+ default:
+ case 36 ... 64:
+ subband = RTW89_CH_5G_BAND_1;
+ break;
+ case 100 ... 144:
+ subband = RTW89_CH_5G_BAND_3;
+ break;
+ case 149 ... 177:
+ subband = RTW89_CH_5G_BAND_4;
+ break;
+ }
break;
- case 149 ... 177:
- subband = RTW89_CH_5G_BAND_4;
+ case RTW89_BAND_6G:
+ switch (center_chan) {
+ default:
+ case 1 ... 29:
+ subband = RTW89_CH_6G_BAND_IDX0;
+ break;
+ case 33 ... 61:
+ subband = RTW89_CH_6G_BAND_IDX1;
+ break;
+ case 65 ... 93:
+ subband = RTW89_CH_6G_BAND_IDX2;
+ break;
+ case 97 ... 125:
+ subband = RTW89_CH_6G_BAND_IDX3;
+ break;
+ case 129 ... 157:
+ subband = RTW89_CH_6G_BAND_IDX4;
+ break;
+ case 161 ... 189:
+ subband = RTW89_CH_6G_BAND_IDX5;
+ break;
+ case 193 ... 221:
+ subband = RTW89_CH_6G_BAND_IDX6;
+ break;
+ case 225 ... 253:
+ subband = RTW89_CH_6G_BAND_IDX7;
+ break;
+ }
break;
}
@@ -61,6 +61,15 @@ enum rtw89_subband {
RTW89_CH_5G_BAND_3 = 3,
RTW89_CH_5G_BAND_4 = 4,
+ RTW89_CH_6G_BAND_IDX0, /* Low */
+ RTW89_CH_6G_BAND_IDX1, /* Low */
+ RTW89_CH_6G_BAND_IDX2, /* Mid */
+ RTW89_CH_6G_BAND_IDX3, /* Mid */
+ RTW89_CH_6G_BAND_IDX4, /* High */
+ RTW89_CH_6G_BAND_IDX5, /* High */
+ RTW89_CH_6G_BAND_IDX6, /* Ultra-high */
+ RTW89_CH_6G_BAND_IDX7, /* Ultra-high */
+
RTW89_SUBBAND_NR,
};
@@ -2917,6 +2917,7 @@ static void _tssi_set_tmeter_tbl(struct rtw89_dev *rtwdev, enum rtw89_phy_idx ph
u8 i, j;
switch (subband) {
+ default:
case RTW89_CH_2G:
thm_up_a = rtw89_8852a_trk_cfg.delta_swingidx_2ga_p;
thm_down_a = rtw89_8852a_trk_cfg.delta_swingidx_2ga_n;
@@ -3101,6 +3102,7 @@ static void _tssi_pak(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
u8 subband = rtwdev->hal.current_subband;
switch (subband) {
+ default:
case RTW89_CH_2G:
rtw89_rfk_parser_by_cond(rtwdev, path == RF_PATH_A,
&rtw8852a_tssi_pak_defs_a_2g_tbl,