diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 11 |
7 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 887f9ac434c2..dfd81debc32e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -130,7 +130,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
130 | iwlagn_mod_params.num_of_queues; | 130 | iwlagn_mod_params.num_of_queues; |
131 | 131 | ||
132 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; | 132 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
133 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; | ||
134 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 133 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
135 | 134 | ||
136 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; | 135 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index db889581c0e5..09a6b8e86b8f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -127,7 +127,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv) | |||
127 | iwlagn_mod_params.num_of_queues; | 127 | iwlagn_mod_params.num_of_queues; |
128 | 128 | ||
129 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; | 129 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
130 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; | ||
131 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 130 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
132 | 131 | ||
133 | hw_params(priv).max_data_size = IWL60_RTC_DATA_SIZE; | 132 | hw_params(priv).max_data_size = IWL60_RTC_DATA_SIZE; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 290701620f03..14b4c5ac751a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -158,7 +158,6 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | |||
158 | iwlagn_mod_params.num_of_queues; | 158 | iwlagn_mod_params.num_of_queues; |
159 | 159 | ||
160 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; | 160 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
161 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; | ||
162 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 161 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
163 | 162 | ||
164 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; | 163 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; |
@@ -195,7 +194,6 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) | |||
195 | iwlagn_mod_params.num_of_queues; | 194 | iwlagn_mod_params.num_of_queues; |
196 | 195 | ||
197 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; | 196 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
198 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; | ||
199 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 197 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
200 | 198 | ||
201 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; | 199 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 37837f7b6990..d81c87dff804 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -147,7 +147,6 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
147 | iwlagn_mod_params.num_of_queues; | 147 | iwlagn_mod_params.num_of_queues; |
148 | 148 | ||
149 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; | 149 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
150 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; | ||
151 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 150 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
152 | 151 | ||
153 | hw_params(priv).max_data_size = IWL60_RTC_DATA_SIZE; | 152 | hw_params(priv).max_data_size = IWL60_RTC_DATA_SIZE; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index ea1452cf9c90..a1670e3f8bfa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -349,7 +349,6 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, | |||
349 | struct iwl_priv *priv = file->private_data; | 349 | struct iwl_priv *priv = file->private_data; |
350 | struct iwl_station_entry *station; | 350 | struct iwl_station_entry *station; |
351 | struct iwl_tid_data *tid_data; | 351 | struct iwl_tid_data *tid_data; |
352 | int max_sta = hw_params(priv).max_stations; | ||
353 | char *buf; | 352 | char *buf; |
354 | int i, j, pos = 0; | 353 | int i, j, pos = 0; |
355 | ssize_t ret; | 354 | ssize_t ret; |
@@ -363,7 +362,7 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, | |||
363 | pos += scnprintf(buf + pos, bufsz - pos, "num of stations: %d\n\n", | 362 | pos += scnprintf(buf + pos, bufsz - pos, "num of stations: %d\n\n", |
364 | priv->num_stations); | 363 | priv->num_stations); |
365 | 364 | ||
366 | for (i = 0; i < max_sta; i++) { | 365 | for (i = 0; i < IWLAGN_STATION_COUNT; i++) { |
367 | station = &priv->stations[i]; | 366 | station = &priv->stations[i]; |
368 | if (!station->used) | 367 | if (!station->used) |
369 | continue; | 368 | continue; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 3a24b477b8fb..1f7a93c67c45 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -165,7 +165,6 @@ struct iwl_mod_params { | |||
165 | * @rx_chains_num: Number of RX chains | 165 | * @rx_chains_num: Number of RX chains |
166 | * @valid_tx_ant: usable antennas for TX | 166 | * @valid_tx_ant: usable antennas for TX |
167 | * @valid_rx_ant: usable antennas for RX | 167 | * @valid_rx_ant: usable antennas for RX |
168 | * @max_stations: the maximal number of stations | ||
169 | * @ht40_channel: is 40MHz width possible: BIT(IEEE80211_BAND_XXX) | 168 | * @ht40_channel: is 40MHz width possible: BIT(IEEE80211_BAND_XXX) |
170 | * @sku: sku read from EEPROM | 169 | * @sku: sku read from EEPROM |
171 | * @rx_page_order: Rx buffer page order | 170 | * @rx_page_order: Rx buffer page order |
@@ -186,7 +185,6 @@ struct iwl_hw_params { | |||
186 | u8 rx_chains_num; | 185 | u8 rx_chains_num; |
187 | u8 valid_tx_ant; | 186 | u8 valid_tx_ant; |
188 | u8 valid_rx_ant; | 187 | u8 valid_rx_ant; |
189 | u8 max_stations; | ||
190 | u8 ht40_channel; | 188 | u8 ht40_channel; |
191 | bool shadow_reg_enable; | 189 | bool shadow_reg_enable; |
192 | u16 sku; | 190 | u16 sku; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 30bfdd36e42c..23a936417621 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -248,8 +248,7 @@ u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
248 | else if (is_broadcast_ether_addr(addr)) | 248 | else if (is_broadcast_ether_addr(addr)) |
249 | sta_id = ctx->bcast_sta_id; | 249 | sta_id = ctx->bcast_sta_id; |
250 | else | 250 | else |
251 | for (i = IWL_STA_ID; | 251 | for (i = IWL_STA_ID; i < IWLAGN_STATION_COUNT; i++) { |
252 | i < hw_params(priv).max_stations; i++) { | ||
253 | if (!compare_ether_addr(priv->stations[i].sta.sta.addr, | 252 | if (!compare_ether_addr(priv->stations[i].sta.sta.addr, |
254 | addr)) { | 253 | addr)) { |
255 | sta_id = i; | 254 | sta_id = i; |
@@ -535,7 +534,7 @@ void iwl_clear_ucode_stations(struct iwl_priv *priv, | |||
535 | IWL_DEBUG_INFO(priv, "Clearing ucode stations in driver\n"); | 534 | IWL_DEBUG_INFO(priv, "Clearing ucode stations in driver\n"); |
536 | 535 | ||
537 | spin_lock_irqsave(&priv->shrd->sta_lock, flags_spin); | 536 | spin_lock_irqsave(&priv->shrd->sta_lock, flags_spin); |
538 | for (i = 0; i < hw_params(priv).max_stations; i++) { | 537 | for (i = 0; i < IWLAGN_STATION_COUNT; i++) { |
539 | if (ctx && ctx->ctxid != priv->stations[i].ctxid) | 538 | if (ctx && ctx->ctxid != priv->stations[i].ctxid) |
540 | continue; | 539 | continue; |
541 | 540 | ||
@@ -576,7 +575,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
576 | 575 | ||
577 | IWL_DEBUG_ASSOC(priv, "Restoring all known stations ... start.\n"); | 576 | IWL_DEBUG_ASSOC(priv, "Restoring all known stations ... start.\n"); |
578 | spin_lock_irqsave(&priv->shrd->sta_lock, flags_spin); | 577 | spin_lock_irqsave(&priv->shrd->sta_lock, flags_spin); |
579 | for (i = 0; i < hw_params(priv).max_stations; i++) { | 578 | for (i = 0; i < IWLAGN_STATION_COUNT; i++) { |
580 | if (ctx->ctxid != priv->stations[i].ctxid) | 579 | if (ctx->ctxid != priv->stations[i].ctxid) |
581 | continue; | 580 | continue; |
582 | if ((priv->stations[i].used & IWL_STA_DRIVER_ACTIVE) && | 581 | if ((priv->stations[i].used & IWL_STA_DRIVER_ACTIVE) && |
@@ -589,7 +588,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
589 | } | 588 | } |
590 | } | 589 | } |
591 | 590 | ||
592 | for (i = 0; i < hw_params(priv).max_stations; i++) { | 591 | for (i = 0; i < IWLAGN_STATION_COUNT; i++) { |
593 | if ((priv->stations[i].used & IWL_STA_UCODE_INPROGRESS)) { | 592 | if ((priv->stations[i].used & IWL_STA_UCODE_INPROGRESS)) { |
594 | memcpy(&sta_cmd, &priv->stations[i].sta, | 593 | memcpy(&sta_cmd, &priv->stations[i].sta, |
595 | sizeof(struct iwl_addsta_cmd)); | 594 | sizeof(struct iwl_addsta_cmd)); |
@@ -692,7 +691,7 @@ void iwl_dealloc_bcast_stations(struct iwl_priv *priv) | |||
692 | int i; | 691 | int i; |
693 | 692 | ||
694 | spin_lock_irqsave(&priv->shrd->sta_lock, flags); | 693 | spin_lock_irqsave(&priv->shrd->sta_lock, flags); |
695 | for (i = 0; i < hw_params(priv).max_stations; i++) { | 694 | for (i = 0; i < IWLAGN_STATION_COUNT; i++) { |
696 | if (!(priv->stations[i].used & IWL_STA_BCAST)) | 695 | if (!(priv->stations[i].used & IWL_STA_BCAST)) |
697 | continue; | 696 | continue; |
698 | 697 | ||