|
@@ -683,7 +683,7 @@ static void rt61pci_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
|
|
|
|
|
|
rt2x00_set_field8(&r3, BBP_R3_SMART_MODE, rt2x00_rf(rt2x00dev, RF2529));
|
|
rt2x00_set_field8(&r3, BBP_R3_SMART_MODE, rt2x00_rf(rt2x00dev, RF2529));
|
|
rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END,
|
|
rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END,
|
|
- !test_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags));
|
|
|
|
|
|
+ !test_bit(CAPABILITY_FRAME_TYPE, &rt2x00dev->cap_flags));
|
|
|
|
|
|
/*
|
|
/*
|
|
* Configure the RX antenna.
|
|
* Configure the RX antenna.
|
|
@@ -811,10 +811,10 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev,
|
|
|
|
|
|
if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
|
|
if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
|
|
sel = antenna_sel_a;
|
|
sel = antenna_sel_a;
|
|
- lna = test_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags);
|
|
|
|
|
|
+ lna = test_bit(CAPABILITY_EXTERNAL_LNA_A, &rt2x00dev->cap_flags);
|
|
} else {
|
|
} else {
|
|
sel = antenna_sel_bg;
|
|
sel = antenna_sel_bg;
|
|
- lna = test_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags);
|
|
|
|
|
|
+ lna = test_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags);
|
|
}
|
|
}
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(antenna_sel_a); i++)
|
|
for (i = 0; i < ARRAY_SIZE(antenna_sel_a); i++)
|
|
@@ -834,7 +834,7 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev,
|
|
else if (rt2x00_rf(rt2x00dev, RF2527))
|
|
else if (rt2x00_rf(rt2x00dev, RF2527))
|
|
rt61pci_config_antenna_2x(rt2x00dev, ant);
|
|
rt61pci_config_antenna_2x(rt2x00dev, ant);
|
|
else if (rt2x00_rf(rt2x00dev, RF2529)) {
|
|
else if (rt2x00_rf(rt2x00dev, RF2529)) {
|
|
- if (test_bit(CONFIG_DOUBLE_ANTENNA, &rt2x00dev->flags))
|
|
|
|
|
|
+ if (test_bit(CAPABILITY_DOUBLE_ANTENNA, &rt2x00dev->cap_flags))
|
|
rt61pci_config_antenna_2x(rt2x00dev, ant);
|
|
rt61pci_config_antenna_2x(rt2x00dev, ant);
|
|
else
|
|
else
|
|
rt61pci_config_antenna_2529(rt2x00dev, ant);
|
|
rt61pci_config_antenna_2529(rt2x00dev, ant);
|
|
@@ -848,13 +848,13 @@ static void rt61pci_config_lna_gain(struct rt2x00_dev *rt2x00dev,
|
|
short lna_gain = 0;
|
|
short lna_gain = 0;
|
|
|
|
|
|
if (libconf->conf->channel->band == IEEE80211_BAND_2GHZ) {
|
|
if (libconf->conf->channel->band == IEEE80211_BAND_2GHZ) {
|
|
- if (test_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags))
|
|
|
|
|
|
+ if (test_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags))
|
|
lna_gain += 14;
|
|
lna_gain += 14;
|
|
|
|
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &eeprom);
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &eeprom);
|
|
lna_gain -= rt2x00_get_field16(eeprom, EEPROM_RSSI_OFFSET_BG_1);
|
|
lna_gain -= rt2x00_get_field16(eeprom, EEPROM_RSSI_OFFSET_BG_1);
|
|
} else {
|
|
} else {
|
|
- if (test_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags))
|
|
|
|
|
|
+ if (test_bit(CAPABILITY_EXTERNAL_LNA_A, &rt2x00dev->cap_flags))
|
|
lna_gain += 14;
|
|
lna_gain += 14;
|
|
|
|
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_A, &eeprom);
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_A, &eeprom);
|
|
@@ -1050,14 +1050,14 @@ static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev,
|
|
if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
|
|
if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
|
|
low_bound = 0x28;
|
|
low_bound = 0x28;
|
|
up_bound = 0x48;
|
|
up_bound = 0x48;
|
|
- if (test_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags)) {
|
|
|
|
|
|
+ if (test_bit(CAPABILITY_EXTERNAL_LNA_A, &rt2x00dev->cap_flags)) {
|
|
low_bound += 0x10;
|
|
low_bound += 0x10;
|
|
up_bound += 0x10;
|
|
up_bound += 0x10;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
low_bound = 0x20;
|
|
low_bound = 0x20;
|
|
up_bound = 0x40;
|
|
up_bound = 0x40;
|
|
- if (test_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags)) {
|
|
|
|
|
|
+ if (test_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags)) {
|
|
low_bound += 0x10;
|
|
low_bound += 0x10;
|
|
up_bound += 0x10;
|
|
up_bound += 0x10;
|
|
}
|
|
}
|
|
@@ -2537,7 +2537,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
|
* Determine number of antennas.
|
|
* Determine number of antennas.
|
|
*/
|
|
*/
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_NUM) == 2)
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_NUM) == 2)
|
|
- __set_bit(CONFIG_DOUBLE_ANTENNA, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_DOUBLE_ANTENNA, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Identify default antenna configuration.
|
|
* Identify default antenna configuration.
|
|
@@ -2551,20 +2551,20 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
|
* Read the Frame type.
|
|
* Read the Frame type.
|
|
*/
|
|
*/
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_FRAME_TYPE))
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_FRAME_TYPE))
|
|
- __set_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_FRAME_TYPE, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Detect if this device has a hardware controlled radio.
|
|
* Detect if this device has a hardware controlled radio.
|
|
*/
|
|
*/
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO))
|
|
if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO))
|
|
- __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_HW_BUTTON, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Read frequency offset and RF programming sequence.
|
|
* Read frequency offset and RF programming sequence.
|
|
*/
|
|
*/
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &eeprom);
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &eeprom);
|
|
if (rt2x00_get_field16(eeprom, EEPROM_FREQ_SEQ))
|
|
if (rt2x00_get_field16(eeprom, EEPROM_FREQ_SEQ))
|
|
- __set_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_RF_SEQUENCE, &rt2x00dev->cap_flags);
|
|
|
|
|
|
rt2x00dev->freq_offset = rt2x00_get_field16(eeprom, EEPROM_FREQ_OFFSET);
|
|
rt2x00dev->freq_offset = rt2x00_get_field16(eeprom, EEPROM_FREQ_OFFSET);
|
|
|
|
|
|
@@ -2574,9 +2574,9 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
|
|
rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
|
|
|
|
|
|
if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_A))
|
|
if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_A))
|
|
- __set_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_EXTERNAL_LNA_A, &rt2x00dev->cap_flags);
|
|
if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_BG))
|
|
if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_BG))
|
|
- __set_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* When working with a RF2529 chip without double antenna,
|
|
* When working with a RF2529 chip without double antenna,
|
|
@@ -2584,7 +2584,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
|
* eeprom word.
|
|
* eeprom word.
|
|
*/
|
|
*/
|
|
if (rt2x00_rf(rt2x00dev, RF2529) &&
|
|
if (rt2x00_rf(rt2x00dev, RF2529) &&
|
|
- !test_bit(CONFIG_DOUBLE_ANTENNA, &rt2x00dev->flags)) {
|
|
|
|
|
|
+ !test_bit(CAPABILITY_DOUBLE_ANTENNA, &rt2x00dev->cap_flags)) {
|
|
rt2x00dev->default_ant.rx =
|
|
rt2x00dev->default_ant.rx =
|
|
ANTENNA_A + rt2x00_get_field16(eeprom, EEPROM_NIC_RX_FIXED);
|
|
ANTENNA_A + rt2x00_get_field16(eeprom, EEPROM_NIC_RX_FIXED);
|
|
rt2x00dev->default_ant.tx =
|
|
rt2x00dev->default_ant.tx =
|
|
@@ -2799,7 +2799,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|
spec->supported_bands = SUPPORT_BAND_2GHZ;
|
|
spec->supported_bands = SUPPORT_BAND_2GHZ;
|
|
spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM;
|
|
spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM;
|
|
|
|
|
|
- if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags)) {
|
|
|
|
|
|
+ if (!test_bit(CAPABILITY_RF_SEQUENCE, &rt2x00dev->cap_flags)) {
|
|
spec->num_channels = 14;
|
|
spec->num_channels = 14;
|
|
spec->channels = rf_vals_noseq;
|
|
spec->channels = rf_vals_noseq;
|
|
} else {
|
|
} else {
|
|
@@ -2869,16 +2869,16 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
|
|
* This device has multiple filters for control frames,
|
|
* This device has multiple filters for control frames,
|
|
* but has no a separate filter for PS Poll frames.
|
|
* but has no a separate filter for PS Poll frames.
|
|
*/
|
|
*/
|
|
- __set_bit(DRIVER_SUPPORT_CONTROL_FILTERS, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_CONTROL_FILTERS, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* This device requires firmware and DMA mapped skbs.
|
|
* This device requires firmware and DMA mapped skbs.
|
|
*/
|
|
*/
|
|
- __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
|
|
|
|
- __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(REQUIRE_FIRMWARE, &rt2x00dev->cap_flags);
|
|
|
|
+ __set_bit(REQUIRE_DMA, &rt2x00dev->cap_flags);
|
|
if (!modparam_nohwcrypt)
|
|
if (!modparam_nohwcrypt)
|
|
- __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
|
|
|
|
- __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
|
|
|
|
|
|
+ __set_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags);
|
|
|
|
+ __set_bit(CAPABILITY_LINK_TUNING, &rt2x00dev->cap_flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Set the rssi offset.
|
|
* Set the rssi offset.
|