Skip to content

Commit ee9a0fc

Browse files
Philipp Hortmanngregkh
authored andcommitted
staging: vt6656: Remove unused rf_type in rf.c; top level
Remove 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. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/e111923dffc4781cf9d4e7966c9f365beb93c5ee.1646935331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 10c8968 commit ee9a0fc

File tree

1 file changed

+2
-63
lines changed
  • drivers/staging/vt6656

1 file changed

+2
-63
lines changed

drivers/staging/vt6656/rf.c

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,6 @@ static const struct vnt_table_info vnt_table_seq[][3] = {
528528
{&al2230_init_table[0][0], CB_AL2230_INIT_SEQ * 3},
529529
{&al2230_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3},
530530
{&al2230_channel_table1[0][0], CB_MAX_CHANNEL_24G * 3}
531-
}, { /* RF_AIROHA7230 init table, channel table 0 and 1 */
532-
{&al7230_init_table[0][0], CB_AL7230_INIT_SEQ * 3},
533-
{&al7230_channel_table0[0][0], CB_MAX_CHANNEL * 3},
534-
{&al7230_channel_table1[0][0], CB_MAX_CHANNEL * 3}
535531
}, { /* RF_VT3226 init table, channel table 0 and 1 */
536532
{&vt3226_init_table[0][0], CB_VT3226_INIT_SEQ * 3},
537533
{&vt3226_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3},
@@ -540,14 +536,6 @@ static const struct vnt_table_info vnt_table_seq[][3] = {
540536
{&vt3226d0_init_table[0][0], CB_VT3226_INIT_SEQ * 3},
541537
{&vt3226_channel_table0[0][0], CB_MAX_CHANNEL_24G * 3},
542538
{&vt3226_channel_table1[0][0], CB_MAX_CHANNEL_24G * 3}
543-
}, { /* RF_VT3342A0 init table, channel table 0 and 1 */
544-
{&vt3342a0_init_table[0][0], CB_VT3342_INIT_SEQ * 3},
545-
{&vt3342_channel_table0[0][0], CB_MAX_CHANNEL * 3},
546-
{&vt3342_channel_table1[0][0], CB_MAX_CHANNEL * 3}
547-
}, { /* RF_AIROHA7230 init table 2 and channel table 2 */
548-
{&al7230_init_table_amode[0][0], CB_AL7230_INIT_SEQ * 3},
549-
{&al7230_channel_table2[0][0], CB_MAX_CHANNEL * 3},
550-
{NULL, 0}
551539
}
552540
};
553541

@@ -641,24 +629,6 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power,
641629

642630
break;
643631

644-
case RF_AIROHA7230:
645-
if (ch->flags & IEEE80211_CHAN_NO_OFDM)
646-
ret = vnt_rf_write_embedded(priv, 0x111bb900);
647-
else
648-
ret = vnt_rf_write_embedded(priv, 0x221bb900);
649-
650-
if (ret)
651-
return ret;
652-
653-
/*
654-
* 0x080F1B00 for 3 wire control TxGain(D10)
655-
* and 0x31 as TX Gain value
656-
*/
657-
power_setting = 0x080c0b00 | (power << 12);
658-
659-
ret = vnt_rf_write_embedded(priv, power_setting);
660-
break;
661-
662632
case RF_VT3226:
663633
power_setting = ((0x3f - power) << 20) | (0x17 << 8);
664634

@@ -714,11 +684,6 @@ static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power,
714684

715685
break;
716686

717-
case RF_VT3342A0:
718-
power_setting = ((0x3f - power) << 20) | (0x27 << 8);
719-
720-
ret = vnt_rf_write_embedded(priv, power_setting);
721-
break;
722687
default:
723688
break;
724689
}
@@ -766,10 +731,8 @@ void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 rssi, long *dbm)
766731
switch (priv->rf_type) {
767732
case RF_AL2230:
768733
case RF_AL2230S:
769-
case RF_AIROHA7230:
770734
case RF_VT3226:
771735
case RF_VT3226D0:
772-
case RF_VT3342A0:
773736
a = airoharf[idx];
774737
break;
775738
default:
@@ -790,17 +753,11 @@ int vnt_rf_table_download(struct vnt_private *priv)
790753
case RF_AL2230S:
791754
idx = 0;
792755
break;
793-
case RF_AIROHA7230:
794-
idx = 1;
795-
break;
796756
case RF_VT3226:
797-
idx = 2;
757+
idx = 1;
798758
break;
799759
case RF_VT3226D0:
800-
idx = 3;
801-
break;
802-
case RF_VT3342A0:
803-
idx = 4;
760+
idx = 2;
804761
break;
805762
}
806763

@@ -831,23 +788,5 @@ int vnt_rf_table_download(struct vnt_private *priv)
831788
table_seq[VNT_TABLE_1].length,
832789
table_seq[VNT_TABLE_1].addr);
833790

834-
if (priv->rf_type == RF_AIROHA7230) {
835-
table_seq = &vnt_table_seq[5][0];
836-
837-
/* Init Table 2 */
838-
ret = vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
839-
MESSAGE_REQUEST_RF_INIT2,
840-
table_seq[VNT_TABLE_INIT_2].length,
841-
table_seq[VNT_TABLE_INIT_2].addr);
842-
if (ret)
843-
return ret;
844-
845-
/* Channel Table 2 */
846-
ret = vnt_control_out_blocks(priv, VNT_REG_BLOCK_SIZE,
847-
MESSAGE_REQUEST_RF_CH2,
848-
table_seq[VNT_TABLE_2].length,
849-
table_seq[VNT_TABLE_2].addr);
850-
}
851-
852791
return ret;
853792
}

0 commit comments

Comments
 (0)