staging: vt6656: Remove unused 5GHz support
cover staging: vt6656: Remove unused 5GHz support
vt6655 (PCI) and vt6656 (USB) do only support 2.4GHz band and not 5GHz band. Both drivers do allow only one vendor id and device id.
So no other devices are covered by those drivers.
Because of this the following priv->rf_type cannot occure:RF_AIROHA7230RF_VT3342A0
---
Tested with vt6656 on mini PCIe card (connected over USB) which is using rf_type: RF_VT3226D0 (2.4GHz only) Tested with vt6656 as USB Plugin Module
which is using rf_type: RF_AL2230S (2.4GHz only)
In order to combine vt665x infrastructure it is important that vt6655 is also not using this code. (Patch already provided) vt6655 on mini PCI Module is usingrf_type: RF_AIROHA (2.4GHz only)
Philipp Hortmann (5):
staging: vt6656: Remove unused rf_type in channel.c
staging: vt6656: Remove unused rf_type in baseband.c
staging: vt6656: Remove unused rf_type in rf.c; top level
staging: vt6656: Remove unused rf_type in rf.c; unused variables
staging: vt6656: Remove unused rf_type in card.c
drivers/staging/vt6656/baseband.c | 16 +- drivers/staging/vt6656/card.c | 16 -- drivers/staging/vt6656/channel.c | 96 +------ drivers/staging/vt6656/rf.c | 413 +----------------------------- 4 files changed, 10 insertions(+), 531 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/5 staging: vt6656: Remove unused rf_type in channel.c
Remove rf_type that supports 5GHz band.
--- drivers/staging/vt6656/channel.c | 96 ++------------------------------ 1 file changed, 6 insertions(+), 90 deletions(-)
drivers/staging/vt6656/channel.c +6 -90
@@ -38,17 +38,6 @@ static struct ieee80211_rate vnt_rates_bg[] = { { .bitrate = 540, .hw_value = RATE_54M }, }; -static struct ieee80211_rate vnt_rates_a[] = { - { .bitrate =60 , .hw_value =RATE_6M }, - { .bitrate =90 , .hw_value =RATE_9M }, - { .bitrate =120 , .hw_value =RATE_12M }, - { .bitrate =180 , .hw_value =RATE_18M }, - { .bitrate =240 , .hw_value =RATE_24M }, - { .bitrate =360 , .hw_value =RATE_36M }, - { .bitrate =480 , .hw_value =RATE_48M }, - { .bitrate =540 , .hw_value =RATE_54M }, -}; -static struct ieee80211_channel vnt_channels_2ghz[] = { { .center_freq =2412 , .hw_value =1 }, { .center_freq = 2417, .hw_value = 2 },
@@ -66,50 +55,6 @@ static struct ieee80211_channel vnt_channels_2ghz[] = { { .center_freq = 2484, .hw_value = 14 } }; -static struct ieee80211_channel vnt_channels_5ghz[] = { - { .center_freq =4915 , .hw_value =15 }, - { .center_freq =4920 , .hw_value =16 }, - { .center_freq =4925 , .hw_value =17 }, - { .center_freq =4935 , .hw_value =18 }, - { .center_freq =4940 , .hw_value =19 }, - { .center_freq =4945 , .hw_value =20 }, - { .center_freq =4960 , .hw_value =21 }, - { .center_freq =4980 , .hw_value =22 }, - { .center_freq =5035 , .hw_value =23 }, - { .center_freq =5040 , .hw_value =24 }, - { .center_freq =5045 , .hw_value =25 }, - { .center_freq =5055 , .hw_value =26 }, - { .center_freq =5060 , .hw_value =27 }, - { .center_freq =5080 , .hw_value =28 }, - { .center_freq =5170 , .hw_value =29 }, - { .center_freq =5180 , .hw_value =30 }, - { .center_freq =5190 , .hw_value =31 }, - { .center_freq =5200 , .hw_value =32 }, - { .center_freq =5210 , .hw_value =33 }, - { .center_freq =5220 , .hw_value =34 }, - { .center_freq =5230 , .hw_value =35 }, - { .center_freq =5240 , .hw_value =36 }, - { .center_freq =5260 , .hw_value =37 }, - { .center_freq =5280 , .hw_value =38 }, - { .center_freq =5300 , .hw_value =39 }, - { .center_freq =5320 , .hw_value =40 }, - { .center_freq =5500 , .hw_value =41 }, - { .center_freq =5520 , .hw_value =42 }, - { .center_freq =5540 , .hw_value =43 }, - { .center_freq =5560 , .hw_value =44 }, - { .center_freq =5580 , .hw_value =45 }, - { .center_freq =5600 , .hw_value =46 }, - { .center_freq =5620 , .hw_value =47 }, - { .center_freq =5640 , .hw_value =48 }, - { .center_freq =5660 , .hw_value =49 }, - { .center_freq =5680 , .hw_value =50 }, - { .center_freq =5700 , .hw_value =51 }, - { .center_freq =5745 , .hw_value =52 }, - { .center_freq =5765 , .hw_value =53 }, - { .center_freq =5785 , .hw_value =54 }, - { .center_freq =5805 , .hw_value =55 }, - { .center_freq =5825 , .hw_value =56 } -};static struct ieee80211_supported_band vnt_supported_2ghz_band = { .channels = vnt_channels_2ghz,
@@ -118,45 +63,16 @@ static struct ieee80211_supported_band vnt_supported_2ghz_band = { .n_bitrates = ARRAY_SIZE(vnt_rates_bg), }; -static struct ieee80211_supported_band vnt_supported_5ghz_band = { - .channels = vnt_channels_5ghz, - .n_channels =ARRAY_SIZE (vnt_channels_5ghz), - .bitrates = vnt_rates_a, - .n_bitrates =ARRAY_SIZE (vnt_rates_a), -}; -void vnt_init_bands (struct vnt_private *priv) {struct ieee80211_channel *ch;int i; -switch (priv->rf_type) { -case RF_AIROHA7230 : -case RF_VT3342A0 : -default : - ch = vnt_channels_5ghz; - -for (i =0 ; i <ARRAY_SIZE (vnt_channels_5ghz); i++) { - ch[i].max_power =VNT_RF_MAX_POWER ; - ch[i].flags =IEEE80211_CHAN_NO_HT40 ; - } - - priv->hw->wiphy->bands[NL80211_BAND_5GHZ ] = - &vnt_supported_5ghz_band; - fallthrough; -case RF_AL2230 : -case RF_AL2230S : -case RF_VT3226 : -case RF_VT3226D0 : - ch = vnt_channels_2ghz; - -for (i =0 ; i <ARRAY_SIZE (vnt_channels_2ghz); i++) { - ch[i].max_power =VNT_RF_MAX_POWER ; - ch[i].flags =IEEE80211_CHAN_NO_HT40 ; - } - - priv->hw->wiphy->bands[NL80211_BAND_2GHZ ] = - &vnt_supported_2ghz_band; -break ; + ch = vnt_channels_2ghz; +for (i =0 ; i <ARRAY_SIZE (vnt_channels_2ghz); i++) { + ch[i].max_power =VNT_RF_MAX_POWER ; + ch[i].flags =IEEE80211_CHAN_NO_HT40 ; } + priv->hw->wiphy->bands[NL80211_BAND_2GHZ ] = + &vnt_supported_2ghz_band; }
Signature · 1 line
2.25.1
PATCH 2/5 staging: vt6656: Remove unused rf_type in baseband.c
In reply to Philipp HortmannRemove rf_type that supports 5GHz band.
--- drivers/staging/vt6656/baseband.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/staging/vt6656/baseband.c +2 -14
@@ -255,23 +255,18 @@ int vnt_vt3184_init(struct vnt_private *priv)dev_dbg (&priv->usb->dev,"RF Type %d\n" , priv->rf_type);if ((priv->rf_type ==RF_AL2230 ) || - (priv->rf_type ==RF_AL2230S ) || - (priv->rf_type ==RF_AIROHA7230 )) { + (priv->rf_type ==RF_AL2230S )) { priv->bb_rx_conf = vnt_vt3184_al2230[10 ]; length =sizeof (vnt_vt3184_al2230); addr = vnt_vt3184_al2230; -if (priv->rf_type ==RF_AIROHA7230 ) - addr[0xd7 ] =0x06 ; - priv->bb_vga[0 ] =0x1c ; priv->bb_vga[1 ] =0x10 ; priv->bb_vga[2 ] =0x0 ; priv->bb_vga[3 ] =0x0 ; }else if ((priv->rf_type ==RF_VT3226 ) || - (priv->rf_type ==RF_VT3226D0 ) || - (priv->rf_type ==RF_VT3342A0 )) { + (priv->rf_type ==RF_VT3226D0 )) { priv->bb_rx_conf = vnt_vt3184_vt3226d0[10 ]; length =sizeof (vnt_vt3184_vt3226d0); c_addr = vnt_vt3184_vt3226d0;
@@ -305,7 +300,6 @@ int vnt_vt3184_init(struct vnt_private *priv) goto end;if ((priv->rf_type ==RF_VT3226 ) || - (priv->rf_type ==RF_VT3342A0 ) || (priv->rf_type ==RF_VT3226D0 )) { data = (priv->rf_type ==RF_VT3226D0 ) ?0x11 :0x23 ;
@@ -446,7 +440,6 @@ int vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)switch (priv->rf_type) {case RF_AL2230 :case RF_AL2230S : -case RF_AIROHA7230 : threshold = al2230_vnt_threshold; length =ARRAY_SIZE (al2230_vnt_threshold);break ;
@@ -456,11 +449,6 @@ int vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning) threshold = vt3226_vnt_threshold; length =ARRAY_SIZE (vt3226_vnt_threshold);break ; - -case RF_VT3342A0 : - threshold = vt3342_vnt_threshold; - length =ARRAY_SIZE (vt3342_vnt_threshold); -break ; }if (!threshold)
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH 2/5] staging: vt6656: Remove unused rf_type in baseband.c
Thank you for the patch! Perhaps something to improve:
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Philipp-Hortmann/staging-vt6656-Remove-unused-5GHz-support/20220311-025658 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git b25c7dc13fb8842e8634bd846a7a96f2176f0244 config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220311/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/747c899152efe7f0dbbcdd5399f1b1de3a7ba51d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-vt6656-Remove-unused-5GHz-support/20220311-025658
git checkout 747c899152efe7f0dbbcdd5399f1b1de3a7ba51d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/bluetooth/ drivers/staging/vt6656/
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/staging/vt6656/baseband.c:170:35: warning: unused variable 'vt3342_vnt_threshold' [-Wunused-const-variable]
static const struct vnt_threshold vt3342_vnt_threshold[] = {
^1 warning generated.
vim +/vt3342_vnt_threshold +170 drivers/staging/vt6656/baseband.c
69a809e1569312 Oscar Carter 2020-03-28 169
69a809e1569312 Oscar Carter 2020-03-28 @170 static const struct vnt_threshold vt3342_vnt_threshold[] = {
69a809e1569312 Oscar Carter 2020-03-28 171 {0, 0x00, 0x38}, /* Max sensitivity */
69a809e1569312 Oscar Carter 2020-03-28 172 {66, 0x00, 0x43},
69a809e1569312 Oscar Carter 2020-03-28 173 {65, 0x00, 0x52},
69a809e1569312 Oscar Carter 2020-03-28 174 {64, 0x00, 0x68},
69a809e1569312 Oscar Carter 2020-03-28 175 {63, 0x00, 0x80},
69a809e1569312 Oscar Carter 2020-03-28 176 {62, 0x00, 0x9c},
69a809e1569312 Oscar Carter 2020-03-28 177 {61, 0x00, 0xc0},
69a809e1569312 Oscar Carter 2020-03-28 178 {60, 0x00, 0xea},
69a809e1569312 Oscar Carter 2020-03-28 179 {59, 0x01, 0x30},
69a809e1569312 Oscar Carter 2020-03-28 180 {58, 0x01, 0x70},
69a809e1569312 Oscar Carter 2020-03-28 181 {57, 0x01, 0xb0},
69a809e1569312 Oscar Carter 2020-03-28 182 {56, 0x02, 0x30},
69a809e1569312 Oscar Carter 2020-03-28 183 {55, 0x02, 0xc0},
69a809e1569312 Oscar Carter 2020-03-28 184 {53, 0x04, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 185 {51, 0x07, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 186 {49, 0x0a, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 187 {47, 0x11, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 188 {45, 0x18, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 189 {43, 0x26, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 190 {42, 0x36, 0x00},
69a809e1569312 Oscar Carter 2020-03-28 191 {41, 0xff, 0x00}
69a809e1569312 Oscar Carter 2020-03-28 192 };69a809e1569312 Oscar Carter 2020-03-28 193
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/[email protected]
PATCH 3/5 staging: vt6656: Remove unused rf_type in rf.c; top level
In reply to Philipp HortmannRemove rf_type that supports 5GHz band.
To keep a better overview this is only the first part of the patch. Compiler Warings about unused variables will be removed with the following patch.
--- drivers/staging/vt6656/rf.c | 65 ++----------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-)
drivers/staging/vt6656/rf.c +2 -63
@@ -528,10 +528,6 @@ static const struct vnt_table_info vnt_table_seq[][3] = { {&al2230_init_table[0][0], CB_AL2230_INIT_SEQ * 3}, {&al2230_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3}, {&al2230_channel_table1[0][0], CB_MAX_CHANNEL_24G * 3} - }, { /* RF_AIROHA7230 init table, channel table 0 and 1 */ - {&al7230_init_table[0][0], CB_AL7230_INIT_SEQ * 3}, - {&al7230_channel_table0[0][0], CB_MAX_CHANNEL * 3}, - {&al7230_channel_table1[0][0], CB_MAX_CHANNEL * 3} }, { /* RF_VT3226 init table, channel table 0 and 1 */ {&vt3226_init_table[0][0], CB_VT3226_INIT_SEQ * 3}, {&vt3226_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3},
@@ -540,14 +536,6 @@ static const struct vnt_table_info vnt_table_seq[][3] = { {&vt3226d0_init_table[0][0], CB_VT3226_INIT_SEQ * 3}, {&vt3226_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3}, {&vt3226_channel_table1[0][0], CB_MAX_CHANNEL_24G * 3} - }, { /* RF_VT3342A0 init table, channel table 0 and 1 */ - {&vt3342a0_init_table[0][0], CB_VT3342_INIT_SEQ * 3}, - {&vt3342_channel_table0[0][0], CB_MAX_CHANNEL * 3}, - {&vt3342_channel_table1[0][0], CB_MAX_CHANNEL * 3} - }, { /* RF_AIROHA7230 init table 2 and channel table 2 */ - {&al7230_init_table_amode[0][0], CB_AL7230_INIT_SEQ * 3}, - {&al7230_channel_table2[0][0], CB_MAX_CHANNEL * 3}, - {NULL, 0} } };
@@ -641,24 +629,6 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power,break ; -case RF_AIROHA7230 : -if (ch->flags &IEEE80211_CHAN_NO_OFDM ) - ret =vnt_rf_write_embedded (priv,0x111bb900 ); -else - ret =vnt_rf_write_embedded (priv,0x221bb900 ); - -if (ret) -return ret; - -/* -* 0x080F1B00 for 3 wire control TxGain(D10) -* and 0x31 as TX Gain value -*/ - power_setting =0x080c0b00 | (power <<12 ); - - ret =vnt_rf_write_embedded (priv, power_setting); -break ; -case RF_VT3226 : power_setting = ((0x3f - power) <<20 ) | (0x17 <<8 );
@@ -714,11 +684,6 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power,break ; -case RF_VT3342A0 : - power_setting = ((0x3f - power) <<20 ) | (0x27 <<8 ); - - ret =vnt_rf_write_embedded (priv, power_setting); -break ;default :break ; }
@@ -766,10 +731,8 @@ void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 rssi, long *dbm)switch (priv->rf_type) {case RF_AL2230 :case RF_AL2230S : -case RF_AIROHA7230 :case RF_VT3226 :case RF_VT3226D0 : -case RF_VT3342A0 : a = airoharf[idx];break ;default :
@@ -790,17 +753,11 @@ int vnt_rf_table_download(struct vnt_private *priv)case RF_AL2230S : idx =0 ;break ; -case RF_AIROHA7230 : - idx =1 ; -break ;case RF_VT3226 : - idx =2 ; + idx =1 ;break ;case RF_VT3226D0 : - idx =3 ; -break ; -case RF_VT3342A0 : - idx =4 ; + idx =2 ;break ; }
@@ -831,23 +788,5 @@ int vnt_rf_table_download(struct vnt_private *priv) table_seq[VNT_TABLE_1 ].length, table_seq[VNT_TABLE_1].addr); -if (priv->rf_type ==RF_AIROHA7230 ) { - table_seq = &vnt_table_seq[5 ][0 ]; - -/* Init Table 2 */ - ret =vnt_control_out (priv,MESSAGE_TYPE_WRITE ,0 , -MESSAGE_REQUEST_RF_INIT2 , - table_seq[VNT_TABLE_INIT_2 ].length, - table_seq[VNT_TABLE_INIT_2 ].addr); -if (ret) -return ret; - -/* Channel Table 2 */ - ret =vnt_control_out_blocks (priv,VNT_REG_BLOCK_SIZE , -MESSAGE_REQUEST_RF_CH2 , - table_seq[VNT_TABLE_2 ].length, - table_seq[VNT_TABLE_2 ].addr); - } -return ret; }
Signature · 1 line
2.25.1
PATCH 4/5 staging: vt6656: Remove unused rf_type in rf.c; unused variables
In reply to Philipp HortmannRemove rf_type that supports 5GHz band.
Follow up of previous patch. Remove unused tables.
--- drivers/staging/vt6656/rf.c | 348 ------------------------------------ 1 file changed, 348 deletions(-)
drivers/staging/vt6656/rf.c +0 -348
@@ -82,220 +82,6 @@ static u8 al2230_channel_table1[CB_MAX_CHANNEL_24G][3] = { {0x06, 0x66, 0x61} }; -static u8 al7230_init_table[CB_AL7230_INIT_SEQ ][3 ] = { - {0x20 ,0x37 ,0x90 }, - {0x13 ,0x33 ,0x31 }, - {0x84 ,0x1f ,0xf2 }, - {0x3f ,0xdf ,0xa3 }, - {0x7f ,0xd7 ,0x84 }, - {0x80 ,0x2b ,0x55 }, - {0x56 ,0xaf ,0x36 }, - {0xce ,0x02 ,0x07 }, - {0x6e ,0xbc ,0x98 }, - {0x22 ,0x1b ,0xb9 }, - {0xe0 ,0x00 ,0x0a }, - {0x08 ,0x03 ,0x1b }, - {0x00 ,0x0a ,0x3c }, - {0xff ,0xff ,0xfd }, - {0x00 ,0x00 ,0x0e }, - {0x1a ,0xba ,0x8f } -}; - -static u8 al7230_init_table_amode[CB_AL7230_INIT_SEQ ][3 ] = { - {0x2f ,0xf5 ,0x20 }, - {0x00 ,0x00 ,0x01 }, - {0x45 ,0x1f ,0xe2 }, - {0x5f ,0xdf ,0xa3 }, - {0x6f ,0xd7 ,0x84 }, - {0x85 ,0x3f ,0x55 }, - {0x56 ,0xaf ,0x36 }, - {0xce ,0x02 ,0x07 }, - {0x6e ,0xbc ,0x98 }, - {0x22 ,0x1b ,0xb9 }, - {0xe0 ,0x60 ,0x0a }, - {0x08 ,0x03 ,0x1b }, - {0x00 ,0x14 ,0x7c }, - {0xff ,0xff ,0xfd }, - {0x00 ,0x00 ,0x0e }, - {0x12 ,0xba ,0xcf } -}; - -static u8 al7230_channel_table0[CB_MAX_CHANNEL ][3 ] = { - {0x20 ,0x37 ,0x90 }, - {0x20 ,0x37 ,0x90 }, - {0x20 ,0x37 ,0x90 }, - {0x20 ,0x37 ,0x90 }, - {0x20 ,0x37 ,0xa0 }, - {0x20 ,0x37 ,0xa0 }, - {0x20 ,0x37 ,0xa0 }, - {0x20 ,0x37 ,0xa0 }, - {0x20 ,0x37 ,0xb0 }, - {0x20 ,0x37 ,0xb0 }, - {0x20 ,0x37 ,0xb0 }, - {0x20 ,0x37 ,0xb0 }, - {0x20 ,0x37 ,0xc0 }, - {0x20 ,0x37 ,0xc0 }, - {0x0f ,0xf5 ,0x20 },/* channel 15 Tf = 4915MHz */ - {0x2f ,0xf5 ,0x20 }, - {0x0f ,0xf5 ,0x20 }, - {0x0f ,0xf5 ,0x20 }, - {0x2f ,0xf5 ,0x20 }, - {0x0f ,0xf5 ,0x20 }, - {0x2f ,0xf5 ,0x30 }, - {0x2f ,0xf5 ,0x30 }, - {0x0f ,0xf5 ,0x40 }, - {0x2f ,0xf5 ,0x40 }, - {0x0f ,0xf5 ,0x40 }, - {0x0f ,0xf5 ,0x40 }, - {0x2f ,0xf5 ,0x40 }, - {0x2f ,0xf5 ,0x50 }, - {0x2f ,0xf5 ,0x60 }, - {0x2f ,0xf5 ,0x60 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x70 }, - {0x2f ,0xf5 ,0x80 }, - {0x2f ,0xf5 ,0x80 }, - {0x2f ,0xf5 ,0x80 }, - {0x2f ,0xf5 ,0x90 }, - {0x2f ,0xf5 ,0xc0 }, - {0x2f ,0xf5 ,0xc0 }, - {0x2f ,0xf5 ,0xc0 }, - {0x2f ,0xf5 ,0xd0 }, - {0x2f ,0xf5 ,0xd0 }, - {0x2f ,0xf5 ,0xd0 }, - {0x2f ,0xf5 ,0xe0 }, - {0x2f ,0xf5 ,0xe0 }, - {0x2f ,0xf5 ,0xe0 }, - {0x2f ,0xf5 ,0xf0 }, - {0x2f ,0xf5 ,0xf0 }, - {0x2f ,0xf6 ,0x00 }, - {0x2f ,0xf6 ,0x00 }, - {0x2f ,0xf6 ,0x00 }, - {0x2f ,0xf6 ,0x10 }, - {0x2f ,0xf6 ,0x10 } -}; - -static u8 al7230_channel_table1[CB_MAX_CHANNEL ][3 ] = { - {0x13 ,0x33 ,0x31 }, - {0x1b ,0x33 ,0x31 }, - {0x03 ,0x33 ,0x31 }, - {0x0b ,0x33 ,0x31 }, - {0x13 ,0x33 ,0x31 }, - {0x1b ,0x33 ,0x31 }, - {0x03 ,0x33 ,0x31 }, - {0x0b ,0x33 ,0x31 }, - {0x13 ,0x33 ,0x31 }, - {0x1b ,0x33 ,0x31 }, - {0x03 ,0x33 ,0x31 }, - {0x0b ,0x33 ,0x31 }, - {0x13 ,0x33 ,0x31 }, - {0x06 ,0x66 ,0x61 }, - {0x1d ,0x55 ,0x51 },/* channel = 15, Tf = 4915MHz */ - {0x00 ,0x00 ,0x01 }, - {0x02 ,0xaa ,0xa1 }, - {0x08 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x0d ,0x55 ,0x51 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x1d ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x02 ,0xaa ,0xa1 }, - {0x08 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x05 ,0x55 ,0x51 }, - {0x0a ,0xaa ,0xa1 }, - {0x10 ,0x00 ,0x01 }, - {0x15 ,0x55 ,0x51 }, - {0x1a ,0xaa ,0xa1 }, - {0x00 ,0x00 ,0x01 }, - {0x05 ,0x55 ,0x51 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x0a ,0xaa ,0xa1 }, - {0x15 ,0x55 ,0x51 }, - {0x00 ,0x00 ,0x01 }, - {0x18 ,0x00 ,0x01 }, - {0x02 ,0xaa ,0xa1 }, - {0x0d ,0x55 ,0x51 }, - {0x18 ,0x00 ,0x01 }, - {0x02 ,0xaa ,0xb1 } -}; - -static u8 al7230_channel_table2[CB_MAX_CHANNEL ][3 ] = { - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 },/* channel = 15 Tf = 4915MHz */ - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x6f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 }, - {0x7f ,0xd7 ,0x84 } -};static u8 vt3226_init_table[CB_VT3226_INIT_SEQ ][3 ] = { {0x03 ,0xff ,0x80 },
@@ -376,140 +162,6 @@ static const u32 vt3226d0_lo_current_table[CB_MAX_CHANNEL_24G] = {0x0135c600 }; -static u8 vt3342a0_init_table[CB_VT3342_INIT_SEQ ][3 ] = {/* 11b/g mode */ - {0x03 ,0xff ,0x80 }, - {0x02 ,0x08 ,0x81 }, - {0x00 ,0xc6 ,0x02 }, - {0x03 ,0xc5 ,0x13 }, - {0x00 ,0xee ,0xe4 }, - {0x00 ,0x71 ,0xa5 }, - {0x01 ,0x75 ,0x46 }, - {0x01 ,0x40 ,0x27 }, - {0x01 ,0x54 ,0x08 }, - {0x00 ,0x01 ,0x69 }, - {0x02 ,0x00 ,0xaa }, - {0x00 ,0x08 ,0xcb }, - {0x01 ,0x70 ,0x0c } -}; - -static u8 vt3342_channel_table0[CB_MAX_CHANNEL ][3 ] = { - {0x02 ,0x05 ,0x03 }, - {0x01 ,0x15 ,0x03 }, - {0x03 ,0xc5 ,0x03 }, - {0x02 ,0x65 ,0x03 }, - {0x01 ,0x15 ,0x13 }, - {0x03 ,0xc5 ,0x13 }, - {0x02 ,0x05 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x03 ,0xc5 ,0x13 }, - {0x02 ,0x65 ,0x13 }, - {0x01 ,0x15 ,0x23 }, - {0x03 ,0xc5 ,0x23 }, - {0x02 ,0x05 ,0x23 }, - {0x00 ,0xd5 ,0x23 }, - {0x01 ,0x15 ,0x13 },/* channel = 15 Tf = 4915MHz */ - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x15 ,0x13 }, - {0x01 ,0x55 ,0x63 }, - {0x01 ,0x55 ,0x63 }, - {0x02 ,0xa5 ,0x63 }, - {0x02 ,0xa5 ,0x63 }, - {0x00 ,0x05 ,0x73 }, - {0x00 ,0x05 ,0x73 }, - {0x01 ,0x55 ,0x73 }, - {0x02 ,0xa5 ,0x73 }, - {0x00 ,0x05 ,0x83 }, - {0x01 ,0x55 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x02 ,0xa5 ,0x83 }, - {0x00 ,0x05 ,0xF3 }, - {0x01 ,0x56 ,0x03 }, - {0x02 ,0xa6 ,0x03 }, - {0x00 ,0x06 ,0x03 }, - {0x00 ,0x06 ,0x03 } -}; - -static u8 vt3342_channel_table1[CB_MAX_CHANNEL ][3 ] = { - {0x01 ,0x99 ,0x94 }, - {0x02 ,0x44 ,0x44 }, - {0x02 ,0xee ,0xe4 }, - {0x03 ,0x99 ,0x94 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0xee ,0xe4 }, - {0x01 ,0x99 ,0x94 }, - {0x02 ,0x44 ,0x44 }, - {0x02 ,0xee ,0xe4 }, - {0x03 ,0x99 ,0x94 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0xee ,0xe4 }, - {0x01 ,0x99 ,0x94 }, - {0x03 ,0x33 ,0x34 }, - {0x00 ,0x44 ,0x44 },/* channel = 15 Tf = 4915MHz */ - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x00 ,0x44 ,0x44 }, - {0x01 ,0x55 ,0x54 }, - {0x01 ,0x55 ,0x54 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x00 ,0x00 ,0x04 }, - {0x00 ,0x00 ,0x04 }, - {0x01 ,0x55 ,0x54 }, - {0x02 ,0xaa ,0xa4 }, - {0x00 ,0x00 ,0x04 }, - {0x01 ,0x55 ,0x54 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x02 ,0xaa ,0xa4 }, - {0x03 ,0x00 ,0x04 }, - {0x00 ,0x55 ,0x54 }, - {0x01 ,0xaa ,0xa4 }, - {0x03 ,0x00 ,0x04 }, - {0x03 ,0x00 ,0x04 } -}; -enum {VNT_TABLE_INIT =0 ,VNT_TABLE_INIT_2 =0 ,
Signature · 1 line
2.25.1
PATCH 5/5 staging: vt6656: Remove unused rf_type in card.c
In reply to Philipp HortmannRemove rf_type that supports 5GHz band.
--- drivers/staging/vt6656/card.c | 16 ---------------- 1 file changed, 16 deletions(-)
drivers/staging/vt6656/card.c +0 -16
@@ -369,10 +369,8 @@ int vnt_radio_power_off(struct vnt_private *priv)switch (priv->rf_type) {case RF_AL2230 :case RF_AL2230S : -case RF_AIROHA7230 :case RF_VT3226 :case RF_VT3226D0 : -case RF_VT3342A0 : ret =vnt_mac_reg_bits_off (priv,MAC_REG_SOFTPWRCTL , (SOFTPWRCTL_SWPE2 |SOFTPWRCTL_SWPE3 ));
@@ -423,10 +421,8 @@ int vnt_radio_power_on(struct vnt_private *priv)switch (priv->rf_type) {case RF_AL2230 :case RF_AL2230S : -case RF_AIROHA7230 :case RF_VT3226 :case RF_VT3226D0 : -case RF_VT3342A0 : ret =vnt_mac_reg_bits_on (priv,MAC_REG_SOFTPWRCTL , (SOFTPWRCTL_SWPE2 |SOFTPWRCTL_SWPE3 ));
@@ -445,9 +441,6 @@ int vnt_set_bss_mode(struct vnt_private *priv)unsigned char bb_vga_0 =0x1c ;unsigned char bb_vga_2_3 =0x00 ; -if (priv->rf_type ==RF_AIROHA7230 && priv->bb_type ==BB_TYPE_11A ) - type =BB_TYPE_11G ; - ret =vnt_mac_set_bb_type (priv, type);if (ret)return ret;
@@ -479,15 +472,6 @@ int vnt_set_bss_mode(struct vnt_private *priv)if (ret)return ret; -if (priv->rf_type ==RF_AIROHA7230 ) { - priv->bb_vga[0 ] = bb_vga_0; - - ret =vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG , -0xe7 , priv->bb_vga[0 ]); -if (ret) -return ret; - } - priv->bb_vga[2 ] = bb_vga_2_3; priv->bb_vga[3 ] = bb_vga_2_3;
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH 5/5] staging: vt6656: Remove unused rf_type in card.c
Thank you for the patch! Perhaps something to improve:
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Philipp-Hortmann/staging-vt6656-Remove-unused-5GHz-support/20220311-025658 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git b25c7dc13fb8842e8634bd846a7a96f2176f0244 config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220311/[email protected]/config) compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ddc1ba8087bf857aa6120e70814d4f161aba6cdc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-vt6656-Remove-unused-5GHz-support/20220311-025658 git checkout ddc1ba8087bf857aa6120e70814d4f161aba6cdc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/staging/vt6656/
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
drivers/staging/vt6656/card.c: In function 'vnt_set_bss_mode':
>> drivers/staging/vt6656/card.c:441:23: warning: variable 'bb_vga_0' set but not used [-Wunused-but-set-variable]
441 | unsigned char bb_vga_0 = 0x1c;
| ^~~~~~~~vim +/bb_vga_0 +441 drivers/staging/vt6656/card.c
92b96797118e58 Forest Bond 2009-06-13 435
81969fd8abc104 Oscar Carter 2020-04-25 436 int vnt_set_bss_mode(struct vnt_private *priv)
92b96797118e58 Forest Bond 2009-06-13 437 {
35452e10610617 Oscar Carter 2020-04-29 438 int ret;
91387f5eb9fc22 Oscar Carter 2020-04-29 439 unsigned char type = priv->bb_type;
91387f5eb9fc22 Oscar Carter 2020-04-29 440 unsigned char data = 0;91387f5eb9fc22 Oscar Carter 2020-04-29 @441 unsigned char bb_vga_0 = 0x1c;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Greg Kroah-Hartman
maintainerQuoted 24 lines · Philipp Hortmann
vt6655 (PCI) and vt6656 (USB) do only support 2.4GHz band and not 5GHz band. Both drivers do allow only one vendor id and device id.
So no other devices are covered by those drivers.
Because of this the followingpriv->rf_typecannot occure:RF_AIROHA7230RF_VT3342A0---
Tested with vt6656 on mini PCIe card (connected over USB) which is usingrf_type:RF_VT3226D0(2.4GHz only) Tested with vt6656 as USB Plugin Module
which is usingrf_type:RF_AL2230S(2.4GHz only)
In order to combine vt665x infrastructure it is important that vt6655 is also not using this code. (Patch already provided) vt6655 on mini PCI Module is usingrf_type:RF_AIROHA(2.4GHz only)Philipp Hortmann (5):
staging: vt6656: Remove unusedrf_typeinchannel.c
staging: vt6656: Remove unusedrf_typeinbaseband.c
staging: vt6656: Remove unusedrf_typeinrf.c; top level
staging: vt6656: Remove unusedrf_typeinrf.c; unused variables
staging: vt6656: Remove unusedrf_typeincard.c
Quoted 10 lines
drivers/staging/vt6656/baseband.c | 16 +- drivers/staging/vt6656/card.c | 16 -- drivers/staging/vt6656/channel.c | 96 +------ drivers/staging/vt6656/rf.c | 413 +----------------------------- 4 files changed, 10 insertions(+), 531 deletions(-)Signature · 1 line
2.25.1
If you could send follow-on patchs for the kernel test bot warnings, that would be great.
thanks,
greg k-h