summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2011-02-12 23:49:38 +0300
committerJohn W. Linville <linville@tuxdriver.com>2011-02-14 23:51:21 +0300
commit192abece7565ab37048dfd5eced966cfb2fda6f5 (patch)
tree7bb7dc73e2c4d7da5d8695dce818bd233744e63b /drivers/net/wireless/p54
parent91f71fa5da00ff50398d8592f304cfec54eed550 (diff)
downloadlinux-192abece7565ab37048dfd5eced966cfb2fda6f5.tar.xz
p54: sort channel list by frequency instead of channel index
Some channel indices of the low 5GHz band clash with those of the 2.4GHz band. Therefore we should go with the channel's center frequency. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/eeprom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index 35b09aa0529b..ec7d4b86bf06 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -93,7 +93,7 @@ static int p54_compare_channels(const void *_a,
const struct p54_channel_entry *a = _a;
const struct p54_channel_entry *b = _b;
- return a->index - b->index;
+ return a->freq - b->freq;
}
static int p54_fill_band_bitrates(struct ieee80211_hw *dev,
@@ -291,7 +291,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
}
}
- /* sort the list by the channel index */
+ /* sort the channel list by frequency */
sort(list->channels, list->entries, sizeof(struct p54_channel_entry),
p54_compare_channels, NULL);