Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171721
b: refs/heads/master
c: f2b38cb
h: refs/heads/master
i:
  171719: 0acdd5d
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and John W. Linville committed Nov 11, 2009
1 parent 66c14b4 commit b41c76b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 726984b61e744c1fef72d20e56eadd0864ecb240
refs/heads/master: f2b38cbfd98eb36799f45178c73b2ed81402abd8
24 changes: 14 additions & 10 deletions trunk/drivers/net/wireless/rt2x00/rt2800pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ static const struct rf_channel rf_vals[] = {

static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct rt2x00_chip *chip = &rt2x00dev->chip;
struct hw_mode_spec *spec = &rt2x00dev->spec;
struct channel_info *info;
char *tx_power1;
Expand All @@ -1204,7 +1205,9 @@ static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_PS_NULLFUNC_STACK;
rt2x00dev->hw->extra_tx_headroom = TXWI_DESC_SIZE;

if (rt2x00_intf_is_pci(rt2x00dev))
rt2x00dev->hw->extra_tx_headroom = TXWI_DESC_SIZE;

SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
Expand All @@ -1219,17 +1222,18 @@ static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
spec->supported_bands = SUPPORT_BAND_2GHZ;
spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM;

if (rt2x00_rf(&rt2x00dev->chip, RF2820) ||
rt2x00_rf(&rt2x00dev->chip, RF2720) ||
rt2x00_rf(&rt2x00dev->chip, RF3020) ||
rt2x00_rf(&rt2x00dev->chip, RF3021) ||
rt2x00_rf(&rt2x00dev->chip, RF3022) ||
rt2x00_rf(&rt2x00dev->chip, RF2020) ||
rt2x00_rf(&rt2x00dev->chip, RF3052)) {
if (rt2x00_rf(chip, RF2820) ||
rt2x00_rf(chip, RF2720) ||
(rt2x00_intf_is_pci(rt2x00dev) &&
(rt2x00_rf(chip, RF3020) ||
rt2x00_rf(chip, RF3021) ||
rt2x00_rf(chip, RF3022) ||
rt2x00_rf(chip, RF2020) ||
rt2x00_rf(chip, RF3052)))) {
spec->num_channels = 14;
spec->channels = rf_vals;
} else if (rt2x00_rf(&rt2x00dev->chip, RF2850) ||
rt2x00_rf(&rt2x00dev->chip, RF2750)) {
} else if (rt2x00_rf(chip, RF2850) ||
rt2x00_rf(chip, RF2750)) {
spec->supported_bands |= SUPPORT_BAND_5GHZ;
spec->num_channels = ARRAY_SIZE(rf_vals);
spec->channels = rf_vals;
Expand Down
19 changes: 12 additions & 7 deletions trunk/drivers/net/wireless/rt2x00/rt2800usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ static const struct rf_channel rf_vals_3070[] = {

static int rt2800usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct rt2x00_chip *chip = &rt2x00dev->chip;
struct hw_mode_spec *spec = &rt2x00dev->spec;
struct channel_info *info;
char *tx_power1;
Expand All @@ -785,7 +786,10 @@ static int rt2800usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_PS_NULLFUNC_STACK;
rt2x00dev->hw->extra_tx_headroom = TXINFO_DESC_SIZE + TXWI_DESC_SIZE;

if (rt2x00_intf_is_usb(rt2x00dev))
rt2x00dev->hw->extra_tx_headroom =
TXINFO_DESC_SIZE + TXWI_DESC_SIZE;

SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
Expand All @@ -800,17 +804,18 @@ static int rt2800usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
spec->supported_bands = SUPPORT_BAND_2GHZ;
spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM;

if (rt2x00_rf(&rt2x00dev->chip, RF2820) ||
rt2x00_rf(&rt2x00dev->chip, RF2720)) {
if (rt2x00_rf(chip, RF2820) ||
rt2x00_rf(chip, RF2720)) {
spec->num_channels = 14;
spec->channels = rf_vals;
} else if (rt2x00_rf(&rt2x00dev->chip, RF2850) ||
rt2x00_rf(&rt2x00dev->chip, RF2750)) {
} else if (rt2x00_rf(chip, RF2850) ||
rt2x00_rf(chip, RF2750)) {
spec->supported_bands |= SUPPORT_BAND_5GHZ;
spec->num_channels = ARRAY_SIZE(rf_vals);
spec->channels = rf_vals;
} else if (rt2x00_rf(&rt2x00dev->chip, RF3020) ||
rt2x00_rf(&rt2x00dev->chip, RF2020)) {
} else if (rt2x00_intf_is_usb(rt2x00dev) &&
(rt2x00_rf(chip, RF3020) ||
rt2x00_rf(chip, RF2020))) {
spec->num_channels = ARRAY_SIZE(rf_vals_3070);
spec->channels = rf_vals_3070;
}
Expand Down

0 comments on commit b41c76b

Please sign in to comment.