aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
commitf6f223039c0d0683bdea1eabd35b309e10311a60 (patch)
tree890e07acf8c18ddc2994ebc0a0bdcdda38b0dcc6 /drivers/net/wireless/iwlwifi
parentb3b3f04fb587ecb61b5baa6c1c5f0e666fd12d73 (diff)
parent42c4568a4ace0adc27a9d6f02936e2047ba6fc7e (diff)
Merge branch 'master' of ssh://master.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-1000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c25
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c37
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c49
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c1
8 files changed, 65 insertions, 76 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 9d1820676f30..694ceef88590 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -247,6 +247,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
247 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 247 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
248 .support_ct_kill_exit = true, 248 .support_ct_kill_exit = true,
249 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 249 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
250 .chain_noise_scale = 1000,
250}; 251};
251 252
252struct iwl_cfg iwl1000_bg_cfg = { 253struct iwl_cfg iwl1000_bg_cfg = {
@@ -274,6 +275,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
274 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 275 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
275 .support_ct_kill_exit = true, 276 .support_ct_kill_exit = true,
276 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 277 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
278 .chain_noise_scale = 1000,
277}; 279};
278 280
279MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 281MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 6d5988901341..f3d662c8cbcf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -179,14 +179,24 @@ static void iwl5000_gain_computation(struct iwl_priv *priv,
179 data->delta_gain_code[i] = 0; 179 data->delta_gain_code[i] = 0;
180 continue; 180 continue;
181 } 181 }
182 delta_g = (1000 * ((s32)average_noise[default_chain] - 182
183 delta_g = (priv->cfg->chain_noise_scale *
184 ((s32)average_noise[default_chain] -
183 (s32)average_noise[i])) / 1500; 185 (s32)average_noise[i])) / 1500;
186
184 /* bound gain by 2 bits value max, 3rd bit is sign */ 187 /* bound gain by 2 bits value max, 3rd bit is sign */
185 data->delta_gain_code[i] = 188 data->delta_gain_code[i] =
186 min(abs(delta_g), (long) CHAIN_NOISE_MAX_DELTA_GAIN_CODE); 189 min(abs(delta_g), (long) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
187 190
188 if (delta_g < 0) 191 if (delta_g < 0)
189 /* set negative sign */ 192 /*
193 * set negative sign ...
194 * note to Intel developers: This is uCode API format,
195 * not the format of any internal device registers.
196 * Do not change this format for e.g. 6050 or similar
197 * devices. Change format only if more resolution
198 * (i.e. more than 2 bits magnitude) is needed.
199 */
190 data->delta_gain_code[i] |= (1 << 2); 200 data->delta_gain_code[i] |= (1 << 2);
191 } 201 }
192 202
@@ -1587,6 +1597,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
1587 .use_rts_for_ht = true, /* use rts/cts protection */ 1597 .use_rts_for_ht = true, /* use rts/cts protection */
1588 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1598 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1589 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1599 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1600 .chain_noise_scale = 1000,
1590}; 1601};
1591 1602
1592struct iwl_cfg iwl5100_bgn_cfg = { 1603struct iwl_cfg iwl5100_bgn_cfg = {
@@ -1612,6 +1623,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
1612 .use_rts_for_ht = true, /* use rts/cts protection */ 1623 .use_rts_for_ht = true, /* use rts/cts protection */
1613 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1624 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1614 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1625 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1626 .chain_noise_scale = 1000,
1615}; 1627};
1616 1628
1617struct iwl_cfg iwl5100_abg_cfg = { 1629struct iwl_cfg iwl5100_abg_cfg = {
@@ -1635,6 +1647,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
1635 .led_compensation = 51, 1647 .led_compensation = 51,
1636 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1648 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1637 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1649 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1650 .chain_noise_scale = 1000,
1638}; 1651};
1639 1652
1640struct iwl_cfg iwl5100_agn_cfg = { 1653struct iwl_cfg iwl5100_agn_cfg = {
@@ -1660,6 +1673,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
1660 .use_rts_for_ht = true, /* use rts/cts protection */ 1673 .use_rts_for_ht = true, /* use rts/cts protection */
1661 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1674 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1662 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1675 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1676 .chain_noise_scale = 1000,
1663}; 1677};
1664 1678
1665struct iwl_cfg iwl5350_agn_cfg = { 1679struct iwl_cfg iwl5350_agn_cfg = {
@@ -1685,6 +1699,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
1685 .use_rts_for_ht = true, /* use rts/cts protection */ 1699 .use_rts_for_ht = true, /* use rts/cts protection */
1686 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1700 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1687 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1701 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1702 .chain_noise_scale = 1000,
1688}; 1703};
1689 1704
1690struct iwl_cfg iwl5150_agn_cfg = { 1705struct iwl_cfg iwl5150_agn_cfg = {
@@ -1710,6 +1725,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
1710 .use_rts_for_ht = true, /* use rts/cts protection */ 1725 .use_rts_for_ht = true, /* use rts/cts protection */
1711 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1726 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1712 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1727 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1728 .chain_noise_scale = 1000,
1713}; 1729};
1714 1730
1715struct iwl_cfg iwl5150_abg_cfg = { 1731struct iwl_cfg iwl5150_abg_cfg = {
@@ -1733,6 +1749,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
1733 .led_compensation = 51, 1749 .led_compensation = 51,
1734 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 1750 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
1735 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, 1751 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
1752 .chain_noise_scale = 1000,
1736}; 1753};
1737 1754
1738MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); 1755MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index a9f8551e0e40..782e23a26984 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -277,21 +277,6 @@ static const struct iwl_ops iwl6000_ops = {
277 .led = &iwlagn_led_ops, 277 .led = &iwlagn_led_ops,
278}; 278};
279 279
280static struct iwl_hcmd_utils_ops iwl6050_hcmd_utils = {
281 .get_hcmd_size = iwl5000_get_hcmd_size,
282 .build_addsta_hcmd = iwl5000_build_addsta_hcmd,
283 .rts_tx_cmd_flag = iwl5000_rts_tx_cmd_flag,
284 .calc_rssi = iwl5000_calc_rssi,
285};
286
287static const struct iwl_ops iwl6050_ops = {
288 .ucode = &iwl5000_ucode,
289 .lib = &iwl6000_lib,
290 .hcmd = &iwl5000_hcmd,
291 .utils = &iwl6050_hcmd_utils,
292 .led = &iwlagn_led_ops,
293};
294
295/* 280/*
296 * "i": Internal configuration, use internal Power Amplifier 281 * "i": Internal configuration, use internal Power Amplifier
297 */ 282 */
@@ -324,6 +309,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
324 .adv_thermal_throttle = true, 309 .adv_thermal_throttle = true,
325 .support_ct_kill_exit = true, 310 .support_ct_kill_exit = true,
326 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 311 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
312 .chain_noise_scale = 1000,
327}; 313};
328 314
329struct iwl_cfg iwl6000i_2abg_cfg = { 315struct iwl_cfg iwl6000i_2abg_cfg = {
@@ -354,6 +340,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
354 .adv_thermal_throttle = true, 340 .adv_thermal_throttle = true,
355 .support_ct_kill_exit = true, 341 .support_ct_kill_exit = true,
356 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 342 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
343 .chain_noise_scale = 1000,
357}; 344};
358 345
359struct iwl_cfg iwl6000i_2bg_cfg = { 346struct iwl_cfg iwl6000i_2bg_cfg = {
@@ -384,6 +371,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
384 .adv_thermal_throttle = true, 371 .adv_thermal_throttle = true,
385 .support_ct_kill_exit = true, 372 .support_ct_kill_exit = true,
386 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 373 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
374 .chain_noise_scale = 1000,
387}; 375};
388 376
389struct iwl_cfg iwl6050_2agn_cfg = { 377struct iwl_cfg iwl6050_2agn_cfg = {
@@ -392,7 +380,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
392 .ucode_api_max = IWL6050_UCODE_API_MAX, 380 .ucode_api_max = IWL6050_UCODE_API_MAX,
393 .ucode_api_min = IWL6050_UCODE_API_MIN, 381 .ucode_api_min = IWL6050_UCODE_API_MIN,
394 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, 382 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
395 .ops = &iwl6050_ops, 383 .ops = &iwl6000_ops,
396 .eeprom_size = OTP_LOW_IMAGE_SIZE, 384 .eeprom_size = OTP_LOW_IMAGE_SIZE,
397 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 385 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
398 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, 386 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -415,6 +403,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
415 .adv_thermal_throttle = true, 403 .adv_thermal_throttle = true,
416 .support_ct_kill_exit = true, 404 .support_ct_kill_exit = true,
417 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 405 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
406 .chain_noise_scale = 1500,
418}; 407};
419 408
420struct iwl_cfg iwl6050_2abg_cfg = { 409struct iwl_cfg iwl6050_2abg_cfg = {
@@ -423,7 +412,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
423 .ucode_api_max = IWL6050_UCODE_API_MAX, 412 .ucode_api_max = IWL6050_UCODE_API_MAX,
424 .ucode_api_min = IWL6050_UCODE_API_MIN, 413 .ucode_api_min = IWL6050_UCODE_API_MIN,
425 .sku = IWL_SKU_A|IWL_SKU_G, 414 .sku = IWL_SKU_A|IWL_SKU_G,
426 .ops = &iwl6050_ops, 415 .ops = &iwl6000_ops,
427 .eeprom_size = OTP_LOW_IMAGE_SIZE, 416 .eeprom_size = OTP_LOW_IMAGE_SIZE,
428 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 417 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
429 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, 418 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -445,6 +434,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
445 .adv_thermal_throttle = true, 434 .adv_thermal_throttle = true,
446 .support_ct_kill_exit = true, 435 .support_ct_kill_exit = true,
447 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 436 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
437 .chain_noise_scale = 1500,
448}; 438};
449 439
450struct iwl_cfg iwl6000_3agn_cfg = { 440struct iwl_cfg iwl6000_3agn_cfg = {
@@ -476,6 +466,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
476 .adv_thermal_throttle = true, 466 .adv_thermal_throttle = true,
477 .support_ct_kill_exit = true, 467 .support_ct_kill_exit = true,
478 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, 468 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
469 .chain_noise_scale = 1000,
479}; 470};
480 471
481MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); 472MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index d0268280d679..1854c720b5e0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2631,7 +2631,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)
2631 */ 2631 */
2632 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 2632 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
2633 2633
2634 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX; 2634 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX + 1;
2635 /* we create the 802.11 header and a zero-length SSID element */ 2635 /* we create the 802.11 header and a zero-length SSID element */
2636 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; 2636 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
2637 2637
@@ -3440,7 +3440,6 @@ static struct ieee80211_ops iwl_hw_ops = {
3440 .set_key = iwl_mac_set_key, 3440 .set_key = iwl_mac_set_key,
3441 .update_tkip_key = iwl_mac_update_tkip_key, 3441 .update_tkip_key = iwl_mac_update_tkip_key,
3442 .get_stats = iwl_mac_get_stats, 3442 .get_stats = iwl_mac_get_stats,
3443 .get_tx_stats = iwl_mac_get_tx_stats,
3444 .conf_tx = iwl_mac_conf_tx, 3443 .conf_tx = iwl_mac_conf_tx,
3445 .reset_tsf = iwl_mac_reset_tsf, 3444 .reset_tsf = iwl_mac_reset_tsf,
3446 .bss_info_changed = iwl_bss_info_changed, 3445 .bss_info_changed = iwl_bss_info_changed,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 02bf17ecaf54..d390eef2efe5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2787,6 +2787,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) 2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
2788 priv->staging_rxon.flags = 0; 2788 priv->staging_rxon.flags = 0;
2789 2789
2790 iwl_set_rxon_ht(priv, ht_conf);
2790 iwl_set_rxon_channel(priv, conf->channel); 2791 iwl_set_rxon_channel(priv, conf->channel);
2791 2792
2792 iwl_set_flags_for_band(priv, conf->channel->band); 2793 iwl_set_flags_for_band(priv, conf->channel->band);
@@ -2850,42 +2851,6 @@ out:
2850} 2851}
2851EXPORT_SYMBOL(iwl_mac_config); 2852EXPORT_SYMBOL(iwl_mac_config);
2852 2853
2853int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
2854 struct ieee80211_tx_queue_stats *stats)
2855{
2856 struct iwl_priv *priv = hw->priv;
2857 int i, avail;
2858 struct iwl_tx_queue *txq;
2859 struct iwl_queue *q;
2860 unsigned long flags;
2861
2862 IWL_DEBUG_MAC80211(priv, "enter\n");
2863
2864 if (!iwl_is_ready_rf(priv)) {
2865 IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
2866 return -EIO;
2867 }
2868
2869 spin_lock_irqsave(&priv->lock, flags);
2870
2871 for (i = 0; i < AC_NUM; i++) {
2872 txq = &priv->txq[i];
2873 q = &txq->q;
2874 avail = iwl_queue_space(q);
2875
2876 stats[i].len = q->n_window - avail;
2877 stats[i].limit = q->n_window - q->high_mark;
2878 stats[i].count = q->n_window;
2879
2880 }
2881 spin_unlock_irqrestore(&priv->lock, flags);
2882
2883 IWL_DEBUG_MAC80211(priv, "leave\n");
2884
2885 return 0;
2886}
2887EXPORT_SYMBOL(iwl_mac_get_tx_stats);
2888
2889void iwl_mac_reset_tsf(struct ieee80211_hw *hw) 2854void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
2890{ 2855{
2891 struct iwl_priv *priv = hw->priv; 2856 struct iwl_priv *priv = hw->priv;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index ec1fe1d7cc9a..8f0c564e68b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -293,6 +293,7 @@ struct iwl_cfg {
293 bool support_ct_kill_exit; 293 bool support_ct_kill_exit;
294 const bool support_wimax_coexist; 294 const bool support_wimax_coexist;
295 u8 plcp_delta_threshold; 295 u8 plcp_delta_threshold;
296 s32 chain_noise_scale;
296}; 297};
297 298
298/*************************** 299/***************************
@@ -341,8 +342,6 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
341 struct ieee80211_vif *vif); 342 struct ieee80211_vif *vif);
342int iwl_mac_config(struct ieee80211_hw *hw, u32 changed); 343int iwl_mac_config(struct ieee80211_hw *hw, u32 changed);
343void iwl_config_ap(struct iwl_priv *priv); 344void iwl_config_ap(struct iwl_priv *priv);
344int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
345 struct ieee80211_tx_queue_stats *stats);
346void iwl_mac_reset_tsf(struct ieee80211_hw *hw); 345void iwl_mac_reset_tsf(struct ieee80211_hw *hw);
347int iwl_alloc_txq_mem(struct iwl_priv *priv); 346int iwl_alloc_txq_mem(struct iwl_priv *priv);
348void iwl_free_txq_mem(struct iwl_priv *priv); 347void iwl_free_txq_mem(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 08faafae8497..f786a407638f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -651,9 +651,20 @@ u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
651 if (left < 0) 651 if (left < 0)
652 return 0; 652 return 0;
653 *pos++ = WLAN_EID_SSID; 653 *pos++ = WLAN_EID_SSID;
654 *pos++ = 0; 654 if (!priv->is_internal_short_scan &&
655 655 priv->scan_request->n_ssids) {
656 len += 2; 656 struct cfg80211_ssid *ssid =
657 priv->scan_request->ssids;
658
659 /* Broadcast if ssid_len is 0 */
660 *pos++ = ssid->ssid_len;
661 memcpy(pos, ssid->ssid, ssid->ssid_len);
662 pos += ssid->ssid_len;
663 len += 2 + ssid->ssid_len;
664 } else {
665 *pos++ = 0;
666 len += 2;
667 }
657 668
658 if (WARN_ON(left < ie_len)) 669 if (WARN_ON(left < ie_len))
659 return len; 670 return len;
@@ -782,20 +793,26 @@ static void iwl_bg_request_scan(struct work_struct *data)
782 if (priv->is_internal_short_scan) { 793 if (priv->is_internal_short_scan) {
783 IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n"); 794 IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
784 } else if (priv->scan_request->n_ssids) { 795 } else if (priv->scan_request->n_ssids) {
785 int i, p = 0;
786 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n"); 796 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
787 for (i = 0; i < priv->scan_request->n_ssids; i++) { 797 /*
788 /* always does wildcard anyway */ 798 * The first SSID to scan is stuffed into the probe request
789 if (!priv->scan_request->ssids[i].ssid_len) 799 * template and the remaining ones are handled through the
790 continue; 800 * direct_scan array.
791 scan->direct_scan[p].id = WLAN_EID_SSID; 801 */
792 scan->direct_scan[p].len = 802 if (priv->scan_request->n_ssids > 1) {
793 priv->scan_request->ssids[i].ssid_len; 803 int i, p = 0;
794 memcpy(scan->direct_scan[p].ssid, 804 for (i = 1; i < priv->scan_request->n_ssids; i++) {
795 priv->scan_request->ssids[i].ssid, 805 if (!priv->scan_request->ssids[i].ssid_len)
796 priv->scan_request->ssids[i].ssid_len); 806 continue;
797 n_probes++; 807 scan->direct_scan[p].id = WLAN_EID_SSID;
798 p++; 808 scan->direct_scan[p].len =
809 priv->scan_request->ssids[i].ssid_len;
810 memcpy(scan->direct_scan[p].ssid,
811 priv->scan_request->ssids[i].ssid,
812 priv->scan_request->ssids[i].ssid_len);
813 n_probes++;
814 p++;
815 }
799 } 816 }
800 is_active = true; 817 is_active = true;
801 } else 818 } else
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 119da54116de..eac2b9a95711 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3835,7 +3835,6 @@ static struct ieee80211_ops iwl3945_hw_ops = {
3835 .config = iwl_mac_config, 3835 .config = iwl_mac_config,
3836 .configure_filter = iwl_configure_filter, 3836 .configure_filter = iwl_configure_filter,
3837 .set_key = iwl3945_mac_set_key, 3837 .set_key = iwl3945_mac_set_key,
3838 .get_tx_stats = iwl_mac_get_tx_stats,
3839 .conf_tx = iwl_mac_conf_tx, 3838 .conf_tx = iwl_mac_conf_tx,
3840 .reset_tsf = iwl_mac_reset_tsf, 3839 .reset_tsf = iwl_mac_reset_tsf,
3841 .bss_info_changed = iwl_bss_info_changed, 3840 .bss_info_changed = iwl_bss_info_changed,