Skip to content

Commit 1137847

Browse files
LorenzoBianconinbd168
authored andcommitted
mt76x0: remove mt76x0_set_country_reg routine
Remove mt76x0_set_country_reg routine for the moment since it is partial and it is not actually used Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent 443569a commit 1137847

File tree

3 files changed

+0
-42
lines changed

3 files changed

+0
-42
lines changed

drivers/net/wireless/mediatek/mt76/mt76x0/debugfs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ mt76x0_eeprom_param_read(struct seq_file *file, void *data)
117117
val = mt76x02_eeprom_get(&dev->mt76, MT_EE_NIC_CONF_0);
118118
seq_printf(file, "Power Amplifier type %lx\n",
119119
val & MT_EE_NIC_CONF_0_PA_TYPE);
120-
seq_printf(file, "Reg channels: %hhu-%hhu\n", dev->ee->reg.start,
121-
dev->ee->reg.start + dev->ee->reg.num - 1);
122120

123121
seq_puts(file, "Per channel power:\n");
124122
for (i = 0; i < 58; i++)

drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -103,43 +103,6 @@ mt76x0_set_temp_offset(struct mt76x0_dev *dev, u8 *eeprom)
103103
dev->ee->temp_off = -10;
104104
}
105105

106-
static void
107-
mt76x0_set_country_reg(struct mt76x0_dev *dev, u8 *eeprom)
108-
{
109-
/* Note: - region 31 is not valid for mt76x0 (see rtmp_init.c)
110-
* - comments in rtmp_def.h are incorrect (see rt_channel.c)
111-
*/
112-
static const struct reg_channel_bounds chan_bounds[] = {
113-
/* EEPROM country regions 0 - 7 */
114-
{ 1, 11 }, { 1, 13 }, { 10, 2 }, { 10, 4 },
115-
{ 14, 1 }, { 1, 14 }, { 3, 7 }, { 5, 9 },
116-
/* EEPROM country regions 32 - 33 */
117-
{ 1, 11 }, { 1, 14 }
118-
};
119-
u8 val = eeprom[MT_EE_COUNTRY_REGION_2GHZ];
120-
int idx = -1;
121-
122-
dev_dbg(dev->mt76.dev, "REG 2GHZ %u REG 5GHZ %u\n", val, eeprom[MT_EE_COUNTRY_REGION_5GHZ]);
123-
if (val < 8)
124-
idx = val;
125-
if (val > 31 && val < 33)
126-
idx = val - 32 + 8;
127-
128-
if (idx != -1)
129-
dev_info(dev->mt76.dev,
130-
"EEPROM country region %02hhx (channels %hhd-%hhd)\n",
131-
val, chan_bounds[idx].start,
132-
chan_bounds[idx].start + chan_bounds[idx].num - 1);
133-
else
134-
idx = 5; /* channels 1 - 14 */
135-
136-
dev->ee->reg = chan_bounds[idx];
137-
138-
/* TODO: country region 33 is special - phy should be set to B-mode
139-
* before entering channel 14 (see sta/connect.c)
140-
*/
141-
}
142-
143106
static void
144107
mt76x0_set_rf_freq_off(struct mt76x0_dev *dev, u8 *eeprom)
145108
{
@@ -353,7 +316,6 @@ mt76x0_eeprom_init(struct mt76x0_dev *dev)
353316

354317
mt76x02_mac_setaddr(&dev->mt76, eeprom + MT_EE_MAC_ADDR);
355318
mt76x0_set_chip_cap(dev, eeprom);
356-
mt76x0_set_country_reg(dev, eeprom);
357319
mt76x0_set_rf_freq_off(dev, eeprom);
358320
mt76x0_set_temp_offset(dev, eeprom);
359321
mt76x0_set_lna_gain(dev, eeprom);

drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ struct mt76x0_eeprom_params {
4141
u32 tx_pwr_cfg_5g[5][2];
4242

4343
u8 tx_pwr_per_chan[58];
44-
45-
struct reg_channel_bounds reg;
4644
};
4745

4846
int mt76x0_eeprom_init(struct mt76x0_dev *dev);

0 commit comments

Comments
 (0)