Commit 091185d6 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by John W. Linville

wlcore: define number of supported bands internally

Avoid using the IEEE80211_NUM_BANDS constant for arrays sizes etc, as
this can contain bands unsupported by the driver (e.g. 60Ghz). Use an
internal constant to determine the number of bands.
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
parent 4455556d
...@@ -4569,7 +4569,7 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw, ...@@ -4569,7 +4569,7 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw,
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
for (i = 0; i < IEEE80211_NUM_BANDS; i++) for (i = 0; i < WLCORE_NUM_BANDS; i++)
wlvif->bitrate_masks[i] = wlvif->bitrate_masks[i] =
wl1271_tx_enabled_rates_get(wl, wl1271_tx_enabled_rates_get(wl,
mask->control[i].legacy, mask->control[i].legacy,
......
...@@ -304,7 +304,7 @@ struct wl1271 { ...@@ -304,7 +304,7 @@ struct wl1271 {
s8 noise; s8 noise;
/* bands supported by this instance of wl12xx */ /* bands supported by this instance of wl12xx */
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; struct ieee80211_supported_band bands[WLCORE_NUM_BANDS];
/* /*
* wowlan trigger was configured during suspend. * wowlan trigger was configured during suspend.
...@@ -371,7 +371,7 @@ struct wl1271 { ...@@ -371,7 +371,7 @@ struct wl1271 {
u8 hw_min_ht_rate; u8 hw_min_ht_rate;
/* HW HT (11n) capabilities */ /* HW HT (11n) capabilities */
struct ieee80211_sta_ht_cap ht_cap[IEEE80211_NUM_BANDS]; struct ieee80211_sta_ht_cap ht_cap[WLCORE_NUM_BANDS];
/* size of the private FW status data */ /* size of the private FW status data */
size_t fw_status_priv_len; size_t fw_status_priv_len;
......
...@@ -62,6 +62,9 @@ ...@@ -62,6 +62,9 @@
#define WL12XX_INVALID_ROLE_ID 0xff #define WL12XX_INVALID_ROLE_ID 0xff
#define WL12XX_INVALID_LINK_ID 0xff #define WL12XX_INVALID_LINK_ID 0xff
/* the driver supports the 2.4Ghz and 5Ghz bands */
#define WLCORE_NUM_BANDS 2
#define WL12XX_MAX_RATE_POLICIES 16 #define WL12XX_MAX_RATE_POLICIES 16
/* Defined by FW as 0. Will not be freed or allocated. */ /* Defined by FW as 0. Will not be freed or allocated. */
...@@ -360,7 +363,7 @@ struct wl12xx_vif { ...@@ -360,7 +363,7 @@ struct wl12xx_vif {
int channel; int channel;
enum nl80211_channel_type channel_type; enum nl80211_channel_type channel_type;
u32 bitrate_masks[IEEE80211_NUM_BANDS]; u32 bitrate_masks[WLCORE_NUM_BANDS];
u32 basic_rate_set; u32 basic_rate_set;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment