aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-08 15:46:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-08 15:46:17 -0400
commita8679be2073392cf22a910bc25da0c7d36459845 (patch)
tree0d25750ea4ba3a85fe683f285261083d77080976 /drivers/net/wireless/iwlwifi
parent22f6dacdfcfdc792d068e9c41234808860498d04 (diff)
parent9dfd6ba353b993d648dcda72480c7ce92cd27c7e (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c31
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c24
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c168
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c69
7 files changed, 125 insertions, 179 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index f63a9c5ba262..814afaf6d10b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -683,11 +683,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
683 if (sta) 683 if (sta)
684 rate_mask = sta->supp_rates[sband->band]; 684 rate_mask = sta->supp_rates[sband->band];
685 685
686 /* Send management frames and broadcast/multicast data using lowest 686 /* Send management frames and NO_ACK data using lowest rate. */
687 * rate. */
688 fc = le16_to_cpu(hdr->frame_control); 687 fc = le16_to_cpu(hdr->frame_control);
689 if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || 688 if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
690 is_multicast_ether_addr(hdr->addr1) || 689 info->flags & IEEE80211_TX_CTL_NO_ACK ||
691 !sta || !priv_sta) { 690 !sta || !priv_sta) {
692 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); 691 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
693 if (!rate_mask) 692 if (!rate_mask)
@@ -696,6 +695,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
696 else 695 else
697 info->control.rates[0].idx = 696 info->control.rates[0].idx =
698 rate_lowest_index(sband, sta); 697 rate_lowest_index(sband, sta);
698 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
699 info->control.rates[0].count = 1;
699 return; 700 return;
700 } 701 }
701 702
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 3504279c7586..0a71bb55d0ee 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -172,7 +172,7 @@ struct iwl_lq_sta {
172}; 172};
173 173
174static void rs_rate_scale_perform(struct iwl_priv *priv, 174static void rs_rate_scale_perform(struct iwl_priv *priv,
175 struct ieee80211_hdr *hdr, 175 struct sk_buff *skb,
176 struct ieee80211_sta *sta, 176 struct ieee80211_sta *sta,
177 struct iwl_lq_sta *lq_sta); 177 struct iwl_lq_sta *lq_sta);
178static void rs_fill_link_cmd(const struct iwl_priv *priv, 178static void rs_fill_link_cmd(const struct iwl_priv *priv,
@@ -829,7 +829,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
829 IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n"); 829 IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n");
830 830
831 if (!ieee80211_is_data(hdr->frame_control) || 831 if (!ieee80211_is_data(hdr->frame_control) ||
832 is_multicast_ether_addr(hdr->addr1)) 832 info->flags & IEEE80211_TX_CTL_NO_ACK)
833 return; 833 return;
834 834
835 /* This packet was aggregated but doesn't carry rate scale info */ 835 /* This packet was aggregated but doesn't carry rate scale info */
@@ -995,7 +995,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
995 995
996 /* See if there's a better rate or modulation mode to try. */ 996 /* See if there's a better rate or modulation mode to try. */
997 if (sta && sta->supp_rates[sband->band]) 997 if (sta && sta->supp_rates[sband->band])
998 rs_rate_scale_perform(priv, hdr, sta, lq_sta); 998 rs_rate_scale_perform(priv, skb, sta, lq_sta);
999out: 999out:
1000 return; 1000 return;
1001} 1001}
@@ -1207,8 +1207,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
1207 tbl->action = 0; 1207 tbl->action = 0;
1208 rate_mask = lq_sta->active_mimo2_rate; 1208 rate_mask = lq_sta->active_mimo2_rate;
1209 1209
1210 if (priv->current_ht_config.supported_chan_width 1210 if (iwl_is_fat_tx_allowed(priv, &sta->ht_cap))
1211 == IWL_CHANNEL_WIDTH_40MHZ)
1212 tbl->is_fat = 1; 1211 tbl->is_fat = 1;
1213 else 1212 else
1214 tbl->is_fat = 0; 1213 tbl->is_fat = 0;
@@ -1273,8 +1272,7 @@ static int rs_switch_to_mimo3(struct iwl_priv *priv,
1273 tbl->action = 0; 1272 tbl->action = 0;
1274 rate_mask = lq_sta->active_mimo3_rate; 1273 rate_mask = lq_sta->active_mimo3_rate;
1275 1274
1276 if (priv->current_ht_config.supported_chan_width 1275 if (iwl_is_fat_tx_allowed(priv, &sta->ht_cap))
1277 == IWL_CHANNEL_WIDTH_40MHZ)
1278 tbl->is_fat = 1; 1276 tbl->is_fat = 1;
1279 else 1277 else
1280 tbl->is_fat = 0; 1278 tbl->is_fat = 0;
@@ -1332,8 +1330,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1332 tbl->action = 0; 1330 tbl->action = 0;
1333 rate_mask = lq_sta->active_siso_rate; 1331 rate_mask = lq_sta->active_siso_rate;
1334 1332
1335 if (priv->current_ht_config.supported_chan_width 1333 if (iwl_is_fat_tx_allowed(priv, &sta->ht_cap))
1336 == IWL_CHANNEL_WIDTH_40MHZ)
1337 tbl->is_fat = 1; 1334 tbl->is_fat = 1;
1338 else 1335 else
1339 tbl->is_fat = 0; 1336 tbl->is_fat = 0;
@@ -1975,12 +1972,14 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta)
1975 * Do rate scaling and search for new modulation mode. 1972 * Do rate scaling and search for new modulation mode.
1976 */ 1973 */
1977static void rs_rate_scale_perform(struct iwl_priv *priv, 1974static void rs_rate_scale_perform(struct iwl_priv *priv,
1978 struct ieee80211_hdr *hdr, 1975 struct sk_buff *skb,
1979 struct ieee80211_sta *sta, 1976 struct ieee80211_sta *sta,
1980 struct iwl_lq_sta *lq_sta) 1977 struct iwl_lq_sta *lq_sta)
1981{ 1978{
1982 struct ieee80211_hw *hw = priv->hw; 1979 struct ieee80211_hw *hw = priv->hw;
1983 struct ieee80211_conf *conf = &hw->conf; 1980 struct ieee80211_conf *conf = &hw->conf;
1981 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1982 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1984 int low = IWL_RATE_INVALID; 1983 int low = IWL_RATE_INVALID;
1985 int high = IWL_RATE_INVALID; 1984 int high = IWL_RATE_INVALID;
1986 int index; 1985 int index;
@@ -2006,11 +2005,10 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2006 2005
2007 IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n"); 2006 IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n");
2008 2007
2009 /* Send management frames and broadcast/multicast data using 2008 /* Send management frames and NO_ACK data using lowest rate. */
2010 * lowest rate. */
2011 /* TODO: this could probably be improved.. */ 2009 /* TODO: this could probably be improved.. */
2012 if (!ieee80211_is_data(hdr->frame_control) || 2010 if (!ieee80211_is_data(hdr->frame_control) ||
2013 is_multicast_ether_addr(hdr->addr1)) 2011 info->flags & IEEE80211_TX_CTL_NO_ACK)
2014 return; 2012 return;
2015 2013
2016 if (!sta || !lq_sta) 2014 if (!sta || !lq_sta)
@@ -2450,16 +2448,17 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2450 if (sta) 2448 if (sta)
2451 mask_bit = sta->supp_rates[sband->band]; 2449 mask_bit = sta->supp_rates[sband->band];
2452 2450
2453 /* Send management frames and broadcast/multicast data using lowest 2451 /* Send management frames and NO_ACK data using lowest rate. */
2454 * rate. */
2455 if (!ieee80211_is_data(hdr->frame_control) || 2452 if (!ieee80211_is_data(hdr->frame_control) ||
2456 is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) { 2453 info->flags & IEEE80211_TX_CTL_NO_ACK || !sta || !lq_sta) {
2457 if (!mask_bit) 2454 if (!mask_bit)
2458 info->control.rates[0].idx = 2455 info->control.rates[0].idx =
2459 rate_lowest_index(sband, NULL); 2456 rate_lowest_index(sband, NULL);
2460 else 2457 else
2461 info->control.rates[0].idx = 2458 info->control.rates[0].idx =
2462 rate_lowest_index(sband, sta); 2459 rate_lowest_index(sband, sta);
2460 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
2461 info->control.rates[0].count = 1;
2463 return; 2462 return;
2464 } 2463 }
2465 2464
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 277dfc57fde9..6cdee0b4b486 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -567,7 +567,8 @@ static void iwl_setup_rxon_timing(struct iwl_priv *priv)
567 beacon_int = iwl_adjust_beacon_interval(priv->beacon_int); 567 beacon_int = iwl_adjust_beacon_interval(priv->beacon_int);
568 priv->rxon_timing.atim_window = 0; 568 priv->rxon_timing.atim_window = 0;
569 } else { 569 } else {
570 beacon_int = iwl_adjust_beacon_interval(conf->beacon_int); 570 beacon_int = iwl_adjust_beacon_interval(
571 priv->vif->bss_conf.beacon_int);
571 572
572 /* TODO: we need to get atim_window from upper stack 573 /* TODO: we need to get atim_window from upper stack
573 * for now we set to 0 */ 574 * for now we set to 0 */
@@ -2267,7 +2268,7 @@ static int iwl_mac_get_stats(struct ieee80211_hw *hw,
2267static ssize_t show_debug_level(struct device *d, 2268static ssize_t show_debug_level(struct device *d,
2268 struct device_attribute *attr, char *buf) 2269 struct device_attribute *attr, char *buf)
2269{ 2270{
2270 struct iwl_priv *priv = d->driver_data; 2271 struct iwl_priv *priv = dev_get_drvdata(d);
2271 2272
2272 return sprintf(buf, "0x%08X\n", priv->debug_level); 2273 return sprintf(buf, "0x%08X\n", priv->debug_level);
2273} 2274}
@@ -2275,7 +2276,7 @@ static ssize_t store_debug_level(struct device *d,
2275 struct device_attribute *attr, 2276 struct device_attribute *attr,
2276 const char *buf, size_t count) 2277 const char *buf, size_t count)
2277{ 2278{
2278 struct iwl_priv *priv = d->driver_data; 2279 struct iwl_priv *priv = dev_get_drvdata(d);
2279 unsigned long val; 2280 unsigned long val;
2280 int ret; 2281 int ret;
2281 2282
@@ -2298,7 +2299,7 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO,
2298static ssize_t show_version(struct device *d, 2299static ssize_t show_version(struct device *d,
2299 struct device_attribute *attr, char *buf) 2300 struct device_attribute *attr, char *buf)
2300{ 2301{
2301 struct iwl_priv *priv = d->driver_data; 2302 struct iwl_priv *priv = dev_get_drvdata(d);
2302 struct iwl_alive_resp *palive = &priv->card_alive; 2303 struct iwl_alive_resp *palive = &priv->card_alive;
2303 ssize_t pos = 0; 2304 ssize_t pos = 0;
2304 u16 eeprom_ver; 2305 u16 eeprom_ver;
@@ -2329,7 +2330,7 @@ static DEVICE_ATTR(version, S_IWUSR | S_IRUGO, show_version, NULL);
2329static ssize_t show_temperature(struct device *d, 2330static ssize_t show_temperature(struct device *d,
2330 struct device_attribute *attr, char *buf) 2331 struct device_attribute *attr, char *buf)
2331{ 2332{
2332 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2333 struct iwl_priv *priv = dev_get_drvdata(d);
2333 2334
2334 if (!iwl_is_alive(priv)) 2335 if (!iwl_is_alive(priv))
2335 return -EAGAIN; 2336 return -EAGAIN;
@@ -2342,7 +2343,7 @@ static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL);
2342static ssize_t show_tx_power(struct device *d, 2343static ssize_t show_tx_power(struct device *d,
2343 struct device_attribute *attr, char *buf) 2344 struct device_attribute *attr, char *buf)
2344{ 2345{
2345 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2346 struct iwl_priv *priv = dev_get_drvdata(d);
2346 2347
2347 if (!iwl_is_ready_rf(priv)) 2348 if (!iwl_is_ready_rf(priv))
2348 return sprintf(buf, "off\n"); 2349 return sprintf(buf, "off\n");
@@ -2354,7 +2355,7 @@ static ssize_t store_tx_power(struct device *d,
2354 struct device_attribute *attr, 2355 struct device_attribute *attr,
2355 const char *buf, size_t count) 2356 const char *buf, size_t count)
2356{ 2357{
2357 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2358 struct iwl_priv *priv = dev_get_drvdata(d);
2358 unsigned long val; 2359 unsigned long val;
2359 int ret; 2360 int ret;
2360 2361
@@ -2372,7 +2373,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
2372static ssize_t show_flags(struct device *d, 2373static ssize_t show_flags(struct device *d,
2373 struct device_attribute *attr, char *buf) 2374 struct device_attribute *attr, char *buf)
2374{ 2375{
2375 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2376 struct iwl_priv *priv = dev_get_drvdata(d);
2376 2377
2377 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); 2378 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags);
2378} 2379}
@@ -2381,7 +2382,7 @@ static ssize_t store_flags(struct device *d,
2381 struct device_attribute *attr, 2382 struct device_attribute *attr,
2382 const char *buf, size_t count) 2383 const char *buf, size_t count)
2383{ 2384{
2384 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2385 struct iwl_priv *priv = dev_get_drvdata(d);
2385 unsigned long val; 2386 unsigned long val;
2386 u32 flags; 2387 u32 flags;
2387 int ret = strict_strtoul(buf, 0, &val); 2388 int ret = strict_strtoul(buf, 0, &val);
@@ -2410,7 +2411,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags);
2410static ssize_t show_filter_flags(struct device *d, 2411static ssize_t show_filter_flags(struct device *d,
2411 struct device_attribute *attr, char *buf) 2412 struct device_attribute *attr, char *buf)
2412{ 2413{
2413 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2414 struct iwl_priv *priv = dev_get_drvdata(d);
2414 2415
2415 return sprintf(buf, "0x%04X\n", 2416 return sprintf(buf, "0x%04X\n",
2416 le32_to_cpu(priv->active_rxon.filter_flags)); 2417 le32_to_cpu(priv->active_rxon.filter_flags));
@@ -2420,7 +2421,7 @@ static ssize_t store_filter_flags(struct device *d,
2420 struct device_attribute *attr, 2421 struct device_attribute *attr,
2421 const char *buf, size_t count) 2422 const char *buf, size_t count)
2422{ 2423{
2423 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 2424 struct iwl_priv *priv = dev_get_drvdata(d);
2424 unsigned long val; 2425 unsigned long val;
2425 u32 filter_flags; 2426 u32 filter_flags;
2426 int ret = strict_strtoul(buf, 0, &val); 2427 int ret = strict_strtoul(buf, 0, &val);
@@ -2622,7 +2623,6 @@ static struct ieee80211_ops iwl_hw_ops = {
2622 .add_interface = iwl_mac_add_interface, 2623 .add_interface = iwl_mac_add_interface,
2623 .remove_interface = iwl_mac_remove_interface, 2624 .remove_interface = iwl_mac_remove_interface,
2624 .config = iwl_mac_config, 2625 .config = iwl_mac_config,
2625 .config_interface = iwl_mac_config_interface,
2626 .configure_filter = iwl_configure_filter, 2626 .configure_filter = iwl_configure_filter,
2627 .set_key = iwl_mac_set_key, 2627 .set_key = iwl_mac_set_key,
2628 .update_tkip_key = iwl_mac_update_tkip_key, 2628 .update_tkip_key = iwl_mac_update_tkip_key,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 3dec2d25fa3d..1366222bb50a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1298,8 +1298,7 @@ int iwl_setup_mac(struct iwl_priv *priv)
1298 hw->flags = IEEE80211_HW_SIGNAL_DBM | 1298 hw->flags = IEEE80211_HW_SIGNAL_DBM |
1299 IEEE80211_HW_NOISE_DBM | 1299 IEEE80211_HW_NOISE_DBM |
1300 IEEE80211_HW_AMPDU_AGGREGATION | 1300 IEEE80211_HW_AMPDU_AGGREGATION |
1301 IEEE80211_HW_SPECTRUM_MGMT | 1301 IEEE80211_HW_SPECTRUM_MGMT;
1302 IEEE80211_HW_SUPPORTS_PS;
1303 hw->wiphy->interface_modes = 1302 hw->wiphy->interface_modes =
1304 BIT(NL80211_IFTYPE_STATION) | 1303 BIT(NL80211_IFTYPE_STATION) |
1305 BIT(NL80211_IFTYPE_ADHOC); 1304 BIT(NL80211_IFTYPE_ADHOC);
@@ -1313,7 +1312,6 @@ int iwl_setup_mac(struct iwl_priv *priv)
1313 /* Default value; 4 EDCA QOS priorities */ 1312 /* Default value; 4 EDCA QOS priorities */
1314 hw->queues = 4; 1313 hw->queues = 4;
1315 1314
1316 hw->conf.beacon_int = 100;
1317 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; 1315 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL;
1318 1316
1319 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels) 1317 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
@@ -2239,15 +2237,69 @@ static void iwl_ht_conf(struct iwl_priv *priv,
2239 2237
2240#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) 2238#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
2241void iwl_bss_info_changed(struct ieee80211_hw *hw, 2239void iwl_bss_info_changed(struct ieee80211_hw *hw,
2242 struct ieee80211_vif *vif, 2240 struct ieee80211_vif *vif,
2243 struct ieee80211_bss_conf *bss_conf, 2241 struct ieee80211_bss_conf *bss_conf,
2244 u32 changes) 2242 u32 changes)
2245{ 2243{
2246 struct iwl_priv *priv = hw->priv; 2244 struct iwl_priv *priv = hw->priv;
2247 int ret; 2245 int ret;
2248 2246
2249 IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); 2247 IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes);
2250 2248
2249 if (!iwl_is_alive(priv))
2250 return;
2251
2252 mutex_lock(&priv->mutex);
2253
2254 if (changes & BSS_CHANGED_BEACON &&
2255 priv->iw_mode == NL80211_IFTYPE_AP) {
2256 dev_kfree_skb(priv->ibss_beacon);
2257 priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
2258 }
2259
2260 if ((changes & BSS_CHANGED_BSSID) && !iwl_is_rfkill(priv)) {
2261 /* If there is currently a HW scan going on in the background
2262 * then we need to cancel it else the RXON below will fail. */
2263 if (iwl_scan_cancel_timeout(priv, 100)) {
2264 IWL_WARN(priv, "Aborted scan still in progress "
2265 "after 100ms\n");
2266 IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n");
2267 mutex_unlock(&priv->mutex);
2268 return;
2269 }
2270 memcpy(priv->staging_rxon.bssid_addr,
2271 bss_conf->bssid, ETH_ALEN);
2272
2273 /* TODO: Audit driver for usage of these members and see
2274 * if mac80211 deprecates them (priv->bssid looks like it
2275 * shouldn't be there, but I haven't scanned the IBSS code
2276 * to verify) - jpk */
2277 memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN);
2278
2279 if (priv->iw_mode == NL80211_IFTYPE_AP)
2280 iwlcore_config_ap(priv);
2281 else {
2282 int rc = iwlcore_commit_rxon(priv);
2283 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
2284 iwl_rxon_add_station(
2285 priv, priv->active_rxon.bssid_addr, 1);
2286 }
2287 } else if (!iwl_is_rfkill(priv)) {
2288 iwl_scan_cancel_timeout(priv, 100);
2289 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
2290 iwlcore_commit_rxon(priv);
2291 }
2292
2293 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
2294 changes & BSS_CHANGED_BEACON) {
2295 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
2296
2297 if (beacon)
2298 iwl_mac_beacon_update(hw, beacon);
2299 }
2300
2301 mutex_unlock(&priv->mutex);
2302
2251 if (changes & BSS_CHANGED_ERP_PREAMBLE) { 2303 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
2252 IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", 2304 IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n",
2253 bss_conf->use_short_preamble); 2305 bss_conf->use_short_preamble);
@@ -2306,7 +2358,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2306 &priv->staging_rxon, 2358 &priv->staging_rxon,
2307 sizeof(struct iwl_rxon_cmd)); 2359 sizeof(struct iwl_rxon_cmd));
2308 } 2360 }
2309 2361 IWL_DEBUG_MAC80211(priv, "leave\n");
2310} 2362}
2311EXPORT_SYMBOL(iwl_bss_info_changed); 2363EXPORT_SYMBOL(iwl_bss_info_changed);
2312 2364
@@ -2590,106 +2642,6 @@ out:
2590} 2642}
2591EXPORT_SYMBOL(iwl_mac_config); 2643EXPORT_SYMBOL(iwl_mac_config);
2592 2644
2593int iwl_mac_config_interface(struct ieee80211_hw *hw,
2594 struct ieee80211_vif *vif,
2595 struct ieee80211_if_conf *conf)
2596{
2597 struct iwl_priv *priv = hw->priv;
2598 int rc;
2599
2600 if (conf == NULL)
2601 return -EIO;
2602
2603 if (priv->vif != vif) {
2604 IWL_DEBUG_MAC80211(priv, "leave - priv->vif != vif\n");
2605 return 0;
2606 }
2607
2608 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
2609 conf->changed & IEEE80211_IFCC_BEACON) {
2610 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
2611 if (!beacon)
2612 return -ENOMEM;
2613 mutex_lock(&priv->mutex);
2614 rc = iwl_mac_beacon_update(hw, beacon);
2615 mutex_unlock(&priv->mutex);
2616 if (rc)
2617 return rc;
2618 }
2619
2620 if (!iwl_is_alive(priv))
2621 return -EAGAIN;
2622
2623 mutex_lock(&priv->mutex);
2624
2625 if (conf->bssid)
2626 IWL_DEBUG_MAC80211(priv, "bssid: %pM\n", conf->bssid);
2627
2628/*
2629 * very dubious code was here; the probe filtering flag is never set:
2630 *
2631 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) &&
2632 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
2633 */
2634
2635 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2636 if (!conf->bssid) {
2637 conf->bssid = priv->mac_addr;
2638 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
2639 IWL_DEBUG_MAC80211(priv, "bssid was set to: %pM\n",
2640 conf->bssid);
2641 }
2642 if (priv->ibss_beacon)
2643 dev_kfree_skb(priv->ibss_beacon);
2644
2645 priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
2646 }
2647
2648 if (iwl_is_rfkill(priv))
2649 goto done;
2650
2651 if (conf->bssid && !is_zero_ether_addr(conf->bssid) &&
2652 !is_multicast_ether_addr(conf->bssid)) {
2653 /* If there is currently a HW scan going on in the background
2654 * then we need to cancel it else the RXON below will fail. */
2655 if (iwl_scan_cancel_timeout(priv, 100)) {
2656 IWL_WARN(priv, "Aborted scan still in progress "
2657 "after 100ms\n");
2658 IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n");
2659 mutex_unlock(&priv->mutex);
2660 return -EAGAIN;
2661 }
2662 memcpy(priv->staging_rxon.bssid_addr, conf->bssid, ETH_ALEN);
2663
2664 /* TODO: Audit driver for usage of these members and see
2665 * if mac80211 deprecates them (priv->bssid looks like it
2666 * shouldn't be there, but I haven't scanned the IBSS code
2667 * to verify) - jpk */
2668 memcpy(priv->bssid, conf->bssid, ETH_ALEN);
2669
2670 if (priv->iw_mode == NL80211_IFTYPE_AP)
2671 iwlcore_config_ap(priv);
2672 else {
2673 rc = iwlcore_commit_rxon(priv);
2674 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
2675 iwl_rxon_add_station(
2676 priv, priv->active_rxon.bssid_addr, 1);
2677 }
2678
2679 } else {
2680 iwl_scan_cancel_timeout(priv, 100);
2681 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
2682 iwlcore_commit_rxon(priv);
2683 }
2684
2685 done:
2686 IWL_DEBUG_MAC80211(priv, "leave\n");
2687 mutex_unlock(&priv->mutex);
2688
2689 return 0;
2690}
2691EXPORT_SYMBOL(iwl_mac_config_interface);
2692
2693int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, 2645int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
2694 struct ieee80211_tx_queue_stats *stats) 2646 struct ieee80211_tx_queue_stats *stats)
2695{ 2647{
@@ -2751,7 +2703,7 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
2751 2703
2752 priv->ibss_beacon = NULL; 2704 priv->ibss_beacon = NULL;
2753 2705
2754 priv->beacon_int = priv->hw->conf.beacon_int; 2706 priv->beacon_int = priv->vif->bss_conf.beacon_int;
2755 priv->timestamp = 0; 2707 priv->timestamp = 0;
2756 if ((priv->iw_mode == NL80211_IFTYPE_STATION)) 2708 if ((priv->iw_mode == NL80211_IFTYPE_STATION))
2757 priv->beacon_int = 0; 2709 priv->beacon_int = 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index d4c60afa2891..bd7f9d9616bc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -281,9 +281,6 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
281 struct ieee80211_if_init_conf *conf); 281 struct ieee80211_if_init_conf *conf);
282int iwl_mac_config(struct ieee80211_hw *hw, u32 changed); 282int iwl_mac_config(struct ieee80211_hw *hw, u32 changed);
283void iwl_config_ap(struct iwl_priv *priv); 283void iwl_config_ap(struct iwl_priv *priv);
284int iwl_mac_config_interface(struct ieee80211_hw *hw,
285 struct ieee80211_vif *vif,
286 struct ieee80211_if_conf *conf);
287int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, 284int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
288 struct ieee80211_tx_queue_stats *stats); 285 struct ieee80211_tx_queue_stats *stats);
289void iwl_mac_reset_tsf(struct ieee80211_hw *hw); 286void iwl_mac_reset_tsf(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 0072ea2c5361..0eb939c40ac1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -490,7 +490,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
490 /* keep track of static keys */ 490 /* keep track of static keys */
491 for (i = 0; i < WEP_KEYS_MAX ; i++) { 491 for (i = 0; i < WEP_KEYS_MAX ; i++) {
492 if (priv->wep_keys[i].key_size) 492 if (priv->wep_keys[i].key_size)
493 test_and_set_bit(i, &priv->ucode_key_table); 493 set_bit(i, &priv->ucode_key_table);
494 } 494 }
495 495
496 spin_unlock_irqrestore(&priv->sta_lock, flags); 496 spin_unlock_irqrestore(&priv->sta_lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6b42ea2a1f1d..f6c1489a0c4a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -551,7 +551,8 @@ static void iwl3945_setup_rxon_timing(struct iwl_priv *priv)
551 priv->rxon_timing.atim_window = 0; 551 priv->rxon_timing.atim_window = 0;
552 } else { 552 } else {
553 priv->rxon_timing.beacon_interval = 553 priv->rxon_timing.beacon_interval =
554 iwl3945_adjust_beacon_interval(conf->beacon_int); 554 iwl3945_adjust_beacon_interval(
555 priv->vif->bss_conf.beacon_int);
555 /* TODO: we need to get atim_window from upper stack 556 /* TODO: we need to get atim_window from upper stack
556 * for now we set to 0 */ 557 * for now we set to 0 */
557 priv->rxon_timing.atim_window = 0; 558 priv->rxon_timing.atim_window = 0;
@@ -1343,15 +1344,24 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv)
1343 struct list_head *element; 1344 struct list_head *element;
1344 struct iwl_rx_mem_buffer *rxb; 1345 struct iwl_rx_mem_buffer *rxb;
1345 unsigned long flags; 1346 unsigned long flags;
1346 spin_lock_irqsave(&rxq->lock, flags); 1347
1347 while (!list_empty(&rxq->rx_used)) { 1348 while (1) {
1349 spin_lock_irqsave(&rxq->lock, flags);
1350
1351 if (list_empty(&rxq->rx_used)) {
1352 spin_unlock_irqrestore(&rxq->lock, flags);
1353 return;
1354 }
1355
1348 element = rxq->rx_used.next; 1356 element = rxq->rx_used.next;
1349 rxb = list_entry(element, struct iwl_rx_mem_buffer, list); 1357 rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
1358 list_del(element);
1359 spin_unlock_irqrestore(&rxq->lock, flags);
1350 1360
1351 /* Alloc a new receive buffer */ 1361 /* Alloc a new receive buffer */
1352 rxb->skb = 1362 rxb->skb =
1353 alloc_skb(priv->hw_params.rx_buf_size, 1363 alloc_skb(priv->hw_params.rx_buf_size,
1354 __GFP_NOWARN | GFP_ATOMIC); 1364 GFP_KERNEL);
1355 if (!rxb->skb) { 1365 if (!rxb->skb) {
1356 if (net_ratelimit()) 1366 if (net_ratelimit())
1357 IWL_CRIT(priv, ": Can not allocate SKB buffers\n"); 1367 IWL_CRIT(priv, ": Can not allocate SKB buffers\n");
@@ -1369,18 +1379,18 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv)
1369 */ 1379 */
1370 skb_reserve(rxb->skb, 4); 1380 skb_reserve(rxb->skb, 4);
1371 1381
1372 priv->alloc_rxb_skb++;
1373 list_del(element);
1374
1375 /* Get physical address of RB/SKB */ 1382 /* Get physical address of RB/SKB */
1376 rxb->real_dma_addr = pci_map_single(priv->pci_dev, 1383 rxb->real_dma_addr = pci_map_single(priv->pci_dev,
1377 rxb->skb->data, 1384 rxb->skb->data,
1378 priv->hw_params.rx_buf_size, 1385 priv->hw_params.rx_buf_size,
1379 PCI_DMA_FROMDEVICE); 1386 PCI_DMA_FROMDEVICE);
1387
1388 spin_lock_irqsave(&rxq->lock, flags);
1380 list_add_tail(&rxb->list, &rxq->rx_free); 1389 list_add_tail(&rxb->list, &rxq->rx_free);
1390 priv->alloc_rxb_skb++;
1381 rxq->free_count++; 1391 rxq->free_count++;
1392 spin_unlock_irqrestore(&rxq->lock, flags);
1382 } 1393 }
1383 spin_unlock_irqrestore(&rxq->lock, flags);
1384} 1394}
1385 1395
1386void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) 1396void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
@@ -1413,18 +1423,6 @@ void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
1413 spin_unlock_irqrestore(&rxq->lock, flags); 1423 spin_unlock_irqrestore(&rxq->lock, flags);
1414} 1424}
1415 1425
1416/*
1417 * this should be called while priv->lock is locked
1418 */
1419static void __iwl3945_rx_replenish(void *data)
1420{
1421 struct iwl_priv *priv = data;
1422
1423 iwl3945_rx_allocate(priv);
1424 iwl3945_rx_queue_restock(priv);
1425}
1426
1427
1428void iwl3945_rx_replenish(void *data) 1426void iwl3945_rx_replenish(void *data)
1429{ 1427{
1430 struct iwl_priv *priv = data; 1428 struct iwl_priv *priv = data;
@@ -1642,7 +1640,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
1642 count++; 1640 count++;
1643 if (count >= 8) { 1641 if (count >= 8) {
1644 priv->rxq.read = i; 1642 priv->rxq.read = i;
1645 __iwl3945_rx_replenish(priv); 1643 iwl3945_rx_queue_restock(priv);
1646 count = 0; 1644 count = 0;
1647 } 1645 }
1648 } 1646 }
@@ -3596,7 +3594,7 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3596static ssize_t show_debug_level(struct device *d, 3594static ssize_t show_debug_level(struct device *d,
3597 struct device_attribute *attr, char *buf) 3595 struct device_attribute *attr, char *buf)
3598{ 3596{
3599 struct iwl_priv *priv = d->driver_data; 3597 struct iwl_priv *priv = dev_get_drvdata(d);
3600 3598
3601 return sprintf(buf, "0x%08X\n", priv->debug_level); 3599 return sprintf(buf, "0x%08X\n", priv->debug_level);
3602} 3600}
@@ -3604,7 +3602,7 @@ static ssize_t store_debug_level(struct device *d,
3604 struct device_attribute *attr, 3602 struct device_attribute *attr,
3605 const char *buf, size_t count) 3603 const char *buf, size_t count)
3606{ 3604{
3607 struct iwl_priv *priv = d->driver_data; 3605 struct iwl_priv *priv = dev_get_drvdata(d);
3608 unsigned long val; 3606 unsigned long val;
3609 int ret; 3607 int ret;
3610 3608
@@ -3625,7 +3623,7 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO,
3625static ssize_t show_temperature(struct device *d, 3623static ssize_t show_temperature(struct device *d,
3626 struct device_attribute *attr, char *buf) 3624 struct device_attribute *attr, char *buf)
3627{ 3625{
3628 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3626 struct iwl_priv *priv = dev_get_drvdata(d);
3629 3627
3630 if (!iwl_is_alive(priv)) 3628 if (!iwl_is_alive(priv))
3631 return -EAGAIN; 3629 return -EAGAIN;
@@ -3638,7 +3636,7 @@ static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL);
3638static ssize_t show_tx_power(struct device *d, 3636static ssize_t show_tx_power(struct device *d,
3639 struct device_attribute *attr, char *buf) 3637 struct device_attribute *attr, char *buf)
3640{ 3638{
3641 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3639 struct iwl_priv *priv = dev_get_drvdata(d);
3642 return sprintf(buf, "%d\n", priv->tx_power_user_lmt); 3640 return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
3643} 3641}
3644 3642
@@ -3646,7 +3644,7 @@ static ssize_t store_tx_power(struct device *d,
3646 struct device_attribute *attr, 3644 struct device_attribute *attr,
3647 const char *buf, size_t count) 3645 const char *buf, size_t count)
3648{ 3646{
3649 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3647 struct iwl_priv *priv = dev_get_drvdata(d);
3650 char *p = (char *)buf; 3648 char *p = (char *)buf;
3651 u32 val; 3649 u32 val;
3652 3650
@@ -3664,7 +3662,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
3664static ssize_t show_flags(struct device *d, 3662static ssize_t show_flags(struct device *d,
3665 struct device_attribute *attr, char *buf) 3663 struct device_attribute *attr, char *buf)
3666{ 3664{
3667 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3665 struct iwl_priv *priv = dev_get_drvdata(d);
3668 3666
3669 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); 3667 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags);
3670} 3668}
@@ -3673,7 +3671,7 @@ static ssize_t store_flags(struct device *d,
3673 struct device_attribute *attr, 3671 struct device_attribute *attr,
3674 const char *buf, size_t count) 3672 const char *buf, size_t count)
3675{ 3673{
3676 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3674 struct iwl_priv *priv = dev_get_drvdata(d);
3677 u32 flags = simple_strtoul(buf, NULL, 0); 3675 u32 flags = simple_strtoul(buf, NULL, 0);
3678 3676
3679 mutex_lock(&priv->mutex); 3677 mutex_lock(&priv->mutex);
@@ -3698,7 +3696,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags);
3698static ssize_t show_filter_flags(struct device *d, 3696static ssize_t show_filter_flags(struct device *d,
3699 struct device_attribute *attr, char *buf) 3697 struct device_attribute *attr, char *buf)
3700{ 3698{
3701 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3699 struct iwl_priv *priv = dev_get_drvdata(d);
3702 3700
3703 return sprintf(buf, "0x%04X\n", 3701 return sprintf(buf, "0x%04X\n",
3704 le32_to_cpu(priv->active_rxon.filter_flags)); 3702 le32_to_cpu(priv->active_rxon.filter_flags));
@@ -3708,7 +3706,7 @@ static ssize_t store_filter_flags(struct device *d,
3708 struct device_attribute *attr, 3706 struct device_attribute *attr,
3709 const char *buf, size_t count) 3707 const char *buf, size_t count)
3710{ 3708{
3711 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3709 struct iwl_priv *priv = dev_get_drvdata(d);
3712 u32 filter_flags = simple_strtoul(buf, NULL, 0); 3710 u32 filter_flags = simple_strtoul(buf, NULL, 0);
3713 3711
3714 mutex_lock(&priv->mutex); 3712 mutex_lock(&priv->mutex);
@@ -3993,7 +3991,7 @@ static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, show_antenna, store_antenna);
3993static ssize_t show_status(struct device *d, 3991static ssize_t show_status(struct device *d,
3994 struct device_attribute *attr, char *buf) 3992 struct device_attribute *attr, char *buf)
3995{ 3993{
3996 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; 3994 struct iwl_priv *priv = dev_get_drvdata(d);
3997 if (!iwl_is_alive(priv)) 3995 if (!iwl_is_alive(priv))
3998 return -EAGAIN; 3996 return -EAGAIN;
3999 return sprintf(buf, "0x%08x\n", (int)priv->status); 3997 return sprintf(buf, "0x%08x\n", (int)priv->status);
@@ -4005,10 +4003,11 @@ static ssize_t dump_error_log(struct device *d,
4005 struct device_attribute *attr, 4003 struct device_attribute *attr,
4006 const char *buf, size_t count) 4004 const char *buf, size_t count)
4007{ 4005{
4006 struct iwl_priv *priv = dev_get_drvdata(d);
4008 char *p = (char *)buf; 4007 char *p = (char *)buf;
4009 4008
4010 if (p[0] == '1') 4009 if (p[0] == '1')
4011 iwl3945_dump_nic_error_log((struct iwl_priv *)d->driver_data); 4010 iwl3945_dump_nic_error_log(priv);
4012 4011
4013 return strnlen(buf, count); 4012 return strnlen(buf, count);
4014} 4013}
@@ -4019,10 +4018,11 @@ static ssize_t dump_event_log(struct device *d,
4019 struct device_attribute *attr, 4018 struct device_attribute *attr,
4020 const char *buf, size_t count) 4019 const char *buf, size_t count)
4021{ 4020{
4021 struct iwl_priv *priv = dev_get_drvdata(d);
4022 char *p = (char *)buf; 4022 char *p = (char *)buf;
4023 4023
4024 if (p[0] == '1') 4024 if (p[0] == '1')
4025 iwl3945_dump_nic_event_log((struct iwl_priv *)d->driver_data); 4025 iwl3945_dump_nic_event_log(priv);
4026 4026
4027 return strnlen(buf, count); 4027 return strnlen(buf, count);
4028} 4028}
@@ -4104,7 +4104,6 @@ static struct ieee80211_ops iwl3945_hw_ops = {
4104 .add_interface = iwl_mac_add_interface, 4104 .add_interface = iwl_mac_add_interface,
4105 .remove_interface = iwl_mac_remove_interface, 4105 .remove_interface = iwl_mac_remove_interface,
4106 .config = iwl_mac_config, 4106 .config = iwl_mac_config,
4107 .config_interface = iwl_mac_config_interface,
4108 .configure_filter = iwl_configure_filter, 4107 .configure_filter = iwl_configure_filter,
4109 .set_key = iwl3945_mac_set_key, 4108 .set_key = iwl3945_mac_set_key,
4110 .get_tx_stats = iwl_mac_get_tx_stats, 4109 .get_tx_stats = iwl_mac_get_tx_stats,
@@ -4210,8 +4209,6 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
4210 /* Default value; 4 EDCA QOS priorities */ 4209 /* Default value; 4 EDCA QOS priorities */
4211 hw->queues = 4; 4210 hw->queues = 4;
4212 4211
4213 hw->conf.beacon_int = 100;
4214
4215 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels) 4212 if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
4216 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 4213 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
4217 &priv->bands[IEEE80211_BAND_2GHZ]; 4214 &priv->bands[IEEE80211_BAND_2GHZ];