diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-01-12 07:48:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 14:21:14 -0500 |
commit | 4eae9edd38c0a9ce34e39100ccc69ff520bc1224 (patch) | |
tree | f696ebe62638e88b5bf8a790be5e2daf842a4f64 /drivers/net/wireless/mwl8k.c | |
parent | 1349ad2f06f86f41415cf7ffa9e068fd4f89be87 (diff) |
mwl8k: add 5 GHz band channels and rates
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index a17111f40266..13dded49323e 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -144,6 +144,9 @@ struct mwl8k_priv { | |||
144 | struct ieee80211_supported_band band_24; | 144 | struct ieee80211_supported_band band_24; |
145 | struct ieee80211_channel channels_24[14]; | 145 | struct ieee80211_channel channels_24[14]; |
146 | struct ieee80211_rate rates_24[14]; | 146 | struct ieee80211_rate rates_24[14]; |
147 | struct ieee80211_supported_band band_50; | ||
148 | struct ieee80211_channel channels_50[4]; | ||
149 | struct ieee80211_rate rates_50[9]; | ||
147 | 150 | ||
148 | /* firmware access */ | 151 | /* firmware access */ |
149 | struct mutex fw_mutex; | 152 | struct mutex fw_mutex; |
@@ -252,6 +255,25 @@ static const struct ieee80211_rate mwl8k_rates_24[] = { | |||
252 | { .bitrate = 720, .hw_value = 144, }, | 255 | { .bitrate = 720, .hw_value = 144, }, |
253 | }; | 256 | }; |
254 | 257 | ||
258 | static const struct ieee80211_channel mwl8k_channels_50[] = { | ||
259 | { .center_freq = 5180, .hw_value = 36, }, | ||
260 | { .center_freq = 5200, .hw_value = 40, }, | ||
261 | { .center_freq = 5220, .hw_value = 44, }, | ||
262 | { .center_freq = 5240, .hw_value = 48, }, | ||
263 | }; | ||
264 | |||
265 | static const struct ieee80211_rate mwl8k_rates_50[] = { | ||
266 | { .bitrate = 60, .hw_value = 12, }, | ||
267 | { .bitrate = 90, .hw_value = 18, }, | ||
268 | { .bitrate = 120, .hw_value = 24, }, | ||
269 | { .bitrate = 180, .hw_value = 36, }, | ||
270 | { .bitrate = 240, .hw_value = 48, }, | ||
271 | { .bitrate = 360, .hw_value = 72, }, | ||
272 | { .bitrate = 480, .hw_value = 96, }, | ||
273 | { .bitrate = 540, .hw_value = 108, }, | ||
274 | { .bitrate = 720, .hw_value = 144, }, | ||
275 | }; | ||
276 | |||
255 | /* Set or get info from Firmware */ | 277 | /* Set or get info from Firmware */ |
256 | #define MWL8K_CMD_SET 0x0001 | 278 | #define MWL8K_CMD_SET 0x0001 |
257 | #define MWL8K_CMD_GET 0x0000 | 279 | #define MWL8K_CMD_GET 0x0000 |
@@ -1579,6 +1601,25 @@ static void mwl8k_setup_2ghz_band(struct ieee80211_hw *hw) | |||
1579 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band_24; | 1601 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band_24; |
1580 | } | 1602 | } |
1581 | 1603 | ||
1604 | static void mwl8k_setup_5ghz_band(struct ieee80211_hw *hw) | ||
1605 | { | ||
1606 | struct mwl8k_priv *priv = hw->priv; | ||
1607 | |||
1608 | BUILD_BUG_ON(sizeof(priv->channels_50) != sizeof(mwl8k_channels_50)); | ||
1609 | memcpy(priv->channels_50, mwl8k_channels_50, sizeof(mwl8k_channels_50)); | ||
1610 | |||
1611 | BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl8k_rates_50)); | ||
1612 | memcpy(priv->rates_50, mwl8k_rates_50, sizeof(mwl8k_rates_50)); | ||
1613 | |||
1614 | priv->band_50.band = IEEE80211_BAND_5GHZ; | ||
1615 | priv->band_50.channels = priv->channels_50; | ||
1616 | priv->band_50.n_channels = ARRAY_SIZE(mwl8k_channels_50); | ||
1617 | priv->band_50.bitrates = priv->rates_50; | ||
1618 | priv->band_50.n_bitrates = ARRAY_SIZE(mwl8k_rates_50); | ||
1619 | |||
1620 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->band_50; | ||
1621 | } | ||
1622 | |||
1582 | /* | 1623 | /* |
1583 | * CMD_GET_HW_SPEC (STA version). | 1624 | * CMD_GET_HW_SPEC (STA version). |
1584 | */ | 1625 | */ |