Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+362 -218
+1 -4
MAINTAINERS
··· 2978 2978 F: drivers/net/ixgbe/ 2979 2979 2980 2980 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT 2981 - M: Zhu Yi <yi.zhu@intel.com> 2982 2981 M: Reinette Chatre <reinette.chatre@intel.com> 2983 2982 M: Intel Linux Wireless <ilw@linux.intel.com> 2984 2983 L: linux-wireless@vger.kernel.org ··· 2987 2988 F: drivers/net/wireless/ipw2x00/ipw2100.* 2988 2989 2989 2990 INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT 2990 - M: Zhu Yi <yi.zhu@intel.com> 2991 2991 M: Reinette Chatre <reinette.chatre@intel.com> 2992 2992 M: Intel Linux Wireless <ilw@linux.intel.com> 2993 2993 L: linux-wireless@vger.kernel.org ··· 3017 3019 F: include/linux/wimax/i2400m.h 3018 3020 3019 3021 INTEL WIRELESS WIFI LINK (iwlwifi) 3020 - M: Zhu Yi <yi.zhu@intel.com> 3021 3022 M: Reinette Chatre <reinette.chatre@intel.com> 3023 + M: Wey-Yi Guy <wey-yi.w.guy@intel.com> 3022 3024 M: Intel Linux Wireless <ilw@linux.intel.com> 3023 3025 L: linux-wireless@vger.kernel.org 3024 3026 W: http://intellinuxwireless.org ··· 3028 3030 3029 3031 INTEL WIRELESS MULTICOMM 3200 WIFI (iwmc3200wifi) 3030 3032 M: Samuel Ortiz <samuel.ortiz@intel.com> 3031 - M: Zhu Yi <yi.zhu@intel.com> 3032 3033 M: Intel Linux Wireless <ilw@linux.intel.com> 3033 3034 L: linux-wireless@vger.kernel.org 3034 3035 S: Supported
+7 -5
drivers/net/wireless/ath/ath5k/base.c
··· 195 195 static int __devinit ath5k_pci_probe(struct pci_dev *pdev, 196 196 const struct pci_device_id *id); 197 197 static void __devexit ath5k_pci_remove(struct pci_dev *pdev); 198 - #ifdef CONFIG_PM 198 + #ifdef CONFIG_PM_SLEEP 199 199 static int ath5k_pci_suspend(struct device *dev); 200 200 static int ath5k_pci_resume(struct device *dev); 201 201 ··· 203 203 #define ATH5K_PM_OPS (&ath5k_pm_ops) 204 204 #else 205 205 #define ATH5K_PM_OPS NULL 206 - #endif /* CONFIG_PM */ 206 + #endif /* CONFIG_PM_SLEEP */ 207 207 208 208 static struct pci_driver ath5k_pci_driver = { 209 209 .name = KBUILD_MODNAME, ··· 708 708 ieee80211_free_hw(hw); 709 709 } 710 710 711 - #ifdef CONFIG_PM 711 + #ifdef CONFIG_PM_SLEEP 712 712 static int ath5k_pci_suspend(struct device *dev) 713 713 { 714 714 struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev)); ··· 734 734 ath5k_led_enable(sc); 735 735 return 0; 736 736 } 737 - #endif /* CONFIG_PM */ 737 + #endif /* CONFIG_PM_SLEEP */ 738 738 739 739 740 740 /***********************\ ··· 3140 3140 3141 3141 if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { 3142 3142 if (*new_flags & FIF_PROMISC_IN_BSS) { 3143 - rfilt |= AR5K_RX_FILTER_PROM; 3144 3143 __set_bit(ATH_STAT_PROMISC, sc->status); 3145 3144 } else { 3146 3145 __clear_bit(ATH_STAT_PROMISC, sc->status); 3147 3146 } 3148 3147 } 3148 + 3149 + if (test_bit(ATH_STAT_PROMISC, sc->status)) 3150 + rfilt |= AR5K_RX_FILTER_PROM; 3149 3151 3150 3152 /* Note, AR5K_RX_FILTER_MCAST is already enabled */ 3151 3153 if (*new_flags & FIF_ALLMULTI) {
+7
drivers/net/wireless/ath/ath5k/phy.c
··· 1814 1814 u8 def_ant, tx_ant, ee_mode; 1815 1815 u32 sta_id1 = 0; 1816 1816 1817 + /* if channel is not initialized yet we can't set the antennas 1818 + * so just store the mode. it will be set on the next reset */ 1819 + if (channel == NULL) { 1820 + ah->ah_ant_mode = ant_mode; 1821 + return; 1822 + } 1823 + 1817 1824 def_ant = ah->ah_def_ant; 1818 1825 1819 1826 ATH5K_TRACE(ah->ah_sc);
-9
drivers/net/wireless/hostap/hostap_hw.c
··· 2618 2618 int events = 0; 2619 2619 u16 ev; 2620 2620 2621 - /* Detect early interrupt before driver is fully configued */ 2622 - if (!dev->base_addr) { 2623 - if (net_ratelimit()) { 2624 - printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n", 2625 - dev->name); 2626 - } 2627 - return IRQ_HANDLED; 2628 - } 2629 - 2630 2621 iface = netdev_priv(dev); 2631 2622 local = iface->local; 2632 2623
+1
drivers/net/wireless/iwlwifi/iwl-3945.c
··· 2852 2852 .isr = iwl_isr_legacy, 2853 2853 .config_ap = iwl3945_config_ap, 2854 2854 .manage_ibss_station = iwl3945_manage_ibss_station, 2855 + .recover_from_tx_stall = iwl_bg_monitor_recover, 2855 2856 .check_plcp_health = iwl3945_good_plcp_health, 2856 2857 2857 2858 .debugfs_ops = {
+2 -28
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
··· 1119 1119 struct iwl_scan_channel *scan_ch) 1120 1120 { 1121 1121 const struct ieee80211_supported_band *sband; 1122 - const struct iwl_channel_info *ch_info; 1123 1122 u16 passive_dwell = 0; 1124 1123 u16 active_dwell = 0; 1125 - int i, added = 0; 1124 + int added = 0; 1126 1125 u16 channel = 0; 1127 1126 1128 1127 sband = iwl_get_hw_mode(priv, band); ··· 1136 1137 if (passive_dwell <= active_dwell) 1137 1138 passive_dwell = active_dwell + 1; 1138 1139 1139 - /* only scan single channel, good enough to reset the RF */ 1140 - /* pick the first valid not in-use channel */ 1141 - if (band == IEEE80211_BAND_5GHZ) { 1142 - for (i = 14; i < priv->channel_count; i++) { 1143 - if (priv->channel_info[i].channel != 1144 - le16_to_cpu(priv->staging_rxon.channel)) { 1145 - channel = priv->channel_info[i].channel; 1146 - ch_info = iwl_get_channel_info(priv, 1147 - band, channel); 1148 - if (is_channel_valid(ch_info)) 1149 - break; 1150 - } 1151 - } 1152 - } else { 1153 - for (i = 0; i < 14; i++) { 1154 - if (priv->channel_info[i].channel != 1155 - le16_to_cpu(priv->staging_rxon.channel)) { 1156 - channel = 1157 - priv->channel_info[i].channel; 1158 - ch_info = iwl_get_channel_info(priv, 1159 - band, channel); 1160 - if (is_channel_valid(ch_info)) 1161 - break; 1162 - } 1163 - } 1164 - } 1140 + channel = iwl_get_single_channel_number(priv, band); 1165 1141 if (channel) { 1166 1142 scan_ch->channel = cpu_to_le16(channel); 1167 1143 scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE;
+2
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
··· 1125 1125 struct ieee80211_sta *sta; 1126 1126 struct iwl_station_priv *sta_priv; 1127 1127 1128 + rcu_read_lock(); 1128 1129 sta = ieee80211_find_sta(priv->vif, hdr->addr1); 1129 1130 if (sta) { 1130 1131 sta_priv = (void *)sta->drv_priv; ··· 1134 1133 atomic_dec_return(&sta_priv->pending_frames) == 0) 1135 1134 ieee80211_sta_block_awake(priv->hw, sta, false); 1136 1135 } 1136 + rcu_read_unlock(); 1137 1137 1138 1138 ieee80211_tx_status_irqsafe(priv->hw, skb); 1139 1139 }
+159 -159
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 1484 1484 } 1485 1485 1486 1486 1487 + /***************************************************************************** 1488 + * 1489 + * sysfs attributes 1490 + * 1491 + *****************************************************************************/ 1492 + 1493 + #ifdef CONFIG_IWLWIFI_DEBUG 1494 + 1495 + /* 1496 + * The following adds a new attribute to the sysfs representation 1497 + * of this device driver (i.e. a new file in /sys/class/net/wlan0/device/) 1498 + * used for controlling the debug level. 1499 + * 1500 + * See the level definitions in iwl for details. 1501 + * 1502 + * The debug_level being managed using sysfs below is a per device debug 1503 + * level that is used instead of the global debug level if it (the per 1504 + * device debug level) is set. 1505 + */ 1506 + static ssize_t show_debug_level(struct device *d, 1507 + struct device_attribute *attr, char *buf) 1508 + { 1509 + struct iwl_priv *priv = dev_get_drvdata(d); 1510 + return sprintf(buf, "0x%08X\n", iwl_get_debug_level(priv)); 1511 + } 1512 + static ssize_t store_debug_level(struct device *d, 1513 + struct device_attribute *attr, 1514 + const char *buf, size_t count) 1515 + { 1516 + struct iwl_priv *priv = dev_get_drvdata(d); 1517 + unsigned long val; 1518 + int ret; 1519 + 1520 + ret = strict_strtoul(buf, 0, &val); 1521 + if (ret) 1522 + IWL_ERR(priv, "%s is not in hex or decimal form.\n", buf); 1523 + else { 1524 + priv->debug_level = val; 1525 + if (iwl_alloc_traffic_mem(priv)) 1526 + IWL_ERR(priv, 1527 + "Not enough memory to generate traffic log\n"); 1528 + } 1529 + return strnlen(buf, count); 1530 + } 1531 + 1532 + static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, 1533 + show_debug_level, store_debug_level); 1534 + 1535 + 1536 + #endif /* CONFIG_IWLWIFI_DEBUG */ 1537 + 1538 + 1539 + static ssize_t show_temperature(struct device *d, 1540 + struct device_attribute *attr, char *buf) 1541 + { 1542 + struct iwl_priv *priv = dev_get_drvdata(d); 1543 + 1544 + if (!iwl_is_alive(priv)) 1545 + return -EAGAIN; 1546 + 1547 + return sprintf(buf, "%d\n", priv->temperature); 1548 + } 1549 + 1550 + static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); 1551 + 1552 + static ssize_t show_tx_power(struct device *d, 1553 + struct device_attribute *attr, char *buf) 1554 + { 1555 + struct iwl_priv *priv = dev_get_drvdata(d); 1556 + 1557 + if (!iwl_is_ready_rf(priv)) 1558 + return sprintf(buf, "off\n"); 1559 + else 1560 + return sprintf(buf, "%d\n", priv->tx_power_user_lmt); 1561 + } 1562 + 1563 + static ssize_t store_tx_power(struct device *d, 1564 + struct device_attribute *attr, 1565 + const char *buf, size_t count) 1566 + { 1567 + struct iwl_priv *priv = dev_get_drvdata(d); 1568 + unsigned long val; 1569 + int ret; 1570 + 1571 + ret = strict_strtoul(buf, 10, &val); 1572 + if (ret) 1573 + IWL_INFO(priv, "%s is not in decimal form.\n", buf); 1574 + else { 1575 + ret = iwl_set_tx_power(priv, val, false); 1576 + if (ret) 1577 + IWL_ERR(priv, "failed setting tx power (0x%d).\n", 1578 + ret); 1579 + else 1580 + ret = count; 1581 + } 1582 + return ret; 1583 + } 1584 + 1585 + static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); 1586 + 1587 + static ssize_t show_rts_ht_protection(struct device *d, 1588 + struct device_attribute *attr, char *buf) 1589 + { 1590 + struct iwl_priv *priv = dev_get_drvdata(d); 1591 + 1592 + return sprintf(buf, "%s\n", 1593 + priv->cfg->use_rts_for_ht ? "RTS/CTS" : "CTS-to-self"); 1594 + } 1595 + 1596 + static ssize_t store_rts_ht_protection(struct device *d, 1597 + struct device_attribute *attr, 1598 + const char *buf, size_t count) 1599 + { 1600 + struct iwl_priv *priv = dev_get_drvdata(d); 1601 + unsigned long val; 1602 + int ret; 1603 + 1604 + ret = strict_strtoul(buf, 10, &val); 1605 + if (ret) 1606 + IWL_INFO(priv, "Input is not in decimal form.\n"); 1607 + else { 1608 + if (!iwl_is_associated(priv)) 1609 + priv->cfg->use_rts_for_ht = val ? true : false; 1610 + else 1611 + IWL_ERR(priv, "Sta associated with AP - " 1612 + "Change protection mechanism is not allowed\n"); 1613 + ret = count; 1614 + } 1615 + return ret; 1616 + } 1617 + 1618 + static DEVICE_ATTR(rts_ht_protection, S_IWUSR | S_IRUGO, 1619 + show_rts_ht_protection, store_rts_ht_protection); 1620 + 1621 + 1622 + static struct attribute *iwl_sysfs_entries[] = { 1623 + &dev_attr_temperature.attr, 1624 + &dev_attr_tx_power.attr, 1625 + &dev_attr_rts_ht_protection.attr, 1626 + #ifdef CONFIG_IWLWIFI_DEBUG 1627 + &dev_attr_debug_level.attr, 1628 + #endif 1629 + NULL 1630 + }; 1631 + 1632 + static struct attribute_group iwl_attribute_group = { 1633 + .name = NULL, /* put in device directory */ 1634 + .attrs = iwl_sysfs_entries, 1635 + }; 1636 + 1487 1637 /****************************************************************************** 1488 1638 * 1489 1639 * uCode download functions ··· 2114 1964 err = iwl_dbgfs_register(priv, DRV_NAME); 2115 1965 if (err) 2116 1966 IWL_ERR(priv, "failed to create debugfs files. Ignoring error: %d\n", err); 1967 + 1968 + err = sysfs_create_group(&priv->pci_dev->dev.kobj, 1969 + &iwl_attribute_group); 1970 + if (err) { 1971 + IWL_ERR(priv, "failed to create sysfs device attributes\n"); 1972 + goto out_unbind; 1973 + } 2117 1974 2118 1975 /* We have our copies now, allow OS release its copies */ 2119 1976 release_firmware(ucode_raw); ··· 3421 3264 3422 3265 /***************************************************************************** 3423 3266 * 3424 - * sysfs attributes 3425 - * 3426 - *****************************************************************************/ 3427 - 3428 - #ifdef CONFIG_IWLWIFI_DEBUG 3429 - 3430 - /* 3431 - * The following adds a new attribute to the sysfs representation 3432 - * of this device driver (i.e. a new file in /sys/class/net/wlan0/device/) 3433 - * used for controlling the debug level. 3434 - * 3435 - * See the level definitions in iwl for details. 3436 - * 3437 - * The debug_level being managed using sysfs below is a per device debug 3438 - * level that is used instead of the global debug level if it (the per 3439 - * device debug level) is set. 3440 - */ 3441 - static ssize_t show_debug_level(struct device *d, 3442 - struct device_attribute *attr, char *buf) 3443 - { 3444 - struct iwl_priv *priv = dev_get_drvdata(d); 3445 - return sprintf(buf, "0x%08X\n", iwl_get_debug_level(priv)); 3446 - } 3447 - static ssize_t store_debug_level(struct device *d, 3448 - struct device_attribute *attr, 3449 - const char *buf, size_t count) 3450 - { 3451 - struct iwl_priv *priv = dev_get_drvdata(d); 3452 - unsigned long val; 3453 - int ret; 3454 - 3455 - ret = strict_strtoul(buf, 0, &val); 3456 - if (ret) 3457 - IWL_ERR(priv, "%s is not in hex or decimal form.\n", buf); 3458 - else { 3459 - priv->debug_level = val; 3460 - if (iwl_alloc_traffic_mem(priv)) 3461 - IWL_ERR(priv, 3462 - "Not enough memory to generate traffic log\n"); 3463 - } 3464 - return strnlen(buf, count); 3465 - } 3466 - 3467 - static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, 3468 - show_debug_level, store_debug_level); 3469 - 3470 - 3471 - #endif /* CONFIG_IWLWIFI_DEBUG */ 3472 - 3473 - 3474 - static ssize_t show_temperature(struct device *d, 3475 - struct device_attribute *attr, char *buf) 3476 - { 3477 - struct iwl_priv *priv = dev_get_drvdata(d); 3478 - 3479 - if (!iwl_is_alive(priv)) 3480 - return -EAGAIN; 3481 - 3482 - return sprintf(buf, "%d\n", priv->temperature); 3483 - } 3484 - 3485 - static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); 3486 - 3487 - static ssize_t show_tx_power(struct device *d, 3488 - struct device_attribute *attr, char *buf) 3489 - { 3490 - struct iwl_priv *priv = dev_get_drvdata(d); 3491 - 3492 - if (!iwl_is_ready_rf(priv)) 3493 - return sprintf(buf, "off\n"); 3494 - else 3495 - return sprintf(buf, "%d\n", priv->tx_power_user_lmt); 3496 - } 3497 - 3498 - static ssize_t store_tx_power(struct device *d, 3499 - struct device_attribute *attr, 3500 - const char *buf, size_t count) 3501 - { 3502 - struct iwl_priv *priv = dev_get_drvdata(d); 3503 - unsigned long val; 3504 - int ret; 3505 - 3506 - ret = strict_strtoul(buf, 10, &val); 3507 - if (ret) 3508 - IWL_INFO(priv, "%s is not in decimal form.\n", buf); 3509 - else { 3510 - ret = iwl_set_tx_power(priv, val, false); 3511 - if (ret) 3512 - IWL_ERR(priv, "failed setting tx power (0x%d).\n", 3513 - ret); 3514 - else 3515 - ret = count; 3516 - } 3517 - return ret; 3518 - } 3519 - 3520 - static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); 3521 - 3522 - static ssize_t show_rts_ht_protection(struct device *d, 3523 - struct device_attribute *attr, char *buf) 3524 - { 3525 - struct iwl_priv *priv = dev_get_drvdata(d); 3526 - 3527 - return sprintf(buf, "%s\n", 3528 - priv->cfg->use_rts_for_ht ? "RTS/CTS" : "CTS-to-self"); 3529 - } 3530 - 3531 - static ssize_t store_rts_ht_protection(struct device *d, 3532 - struct device_attribute *attr, 3533 - const char *buf, size_t count) 3534 - { 3535 - struct iwl_priv *priv = dev_get_drvdata(d); 3536 - unsigned long val; 3537 - int ret; 3538 - 3539 - ret = strict_strtoul(buf, 10, &val); 3540 - if (ret) 3541 - IWL_INFO(priv, "Input is not in decimal form.\n"); 3542 - else { 3543 - if (!iwl_is_associated(priv)) 3544 - priv->cfg->use_rts_for_ht = val ? true : false; 3545 - else 3546 - IWL_ERR(priv, "Sta associated with AP - " 3547 - "Change protection mechanism is not allowed\n"); 3548 - ret = count; 3549 - } 3550 - return ret; 3551 - } 3552 - 3553 - static DEVICE_ATTR(rts_ht_protection, S_IWUSR | S_IRUGO, 3554 - show_rts_ht_protection, store_rts_ht_protection); 3555 - 3556 - 3557 - /***************************************************************************** 3558 - * 3559 3267 * driver setup and teardown 3560 3268 * 3561 3269 *****************************************************************************/ ··· 3571 3549 iwl_free_channel_map(priv); 3572 3550 kfree(priv->scan_cmd); 3573 3551 } 3574 - 3575 - static struct attribute *iwl_sysfs_entries[] = { 3576 - &dev_attr_temperature.attr, 3577 - &dev_attr_tx_power.attr, 3578 - &dev_attr_rts_ht_protection.attr, 3579 - #ifdef CONFIG_IWLWIFI_DEBUG 3580 - &dev_attr_debug_level.attr, 3581 - #endif 3582 - NULL 3583 - }; 3584 - 3585 - static struct attribute_group iwl_attribute_group = { 3586 - .name = NULL, /* put in device directory */ 3587 - .attrs = iwl_sysfs_entries, 3588 - }; 3589 3552 3590 3553 static struct ieee80211_ops iwl_hw_ops = { 3591 3554 .tx = iwl_mac_tx, ··· 3757 3750 IWL_ERR(priv, "Error allocating IRQ %d\n", priv->pci_dev->irq); 3758 3751 goto out_disable_msi; 3759 3752 } 3760 - err = sysfs_create_group(&pdev->dev.kobj, &iwl_attribute_group); 3761 - if (err) { 3762 - IWL_ERR(priv, "failed to create sysfs device attributes\n"); 3763 - goto out_free_irq; 3764 - } 3765 3753 3766 3754 iwl_setup_deferred_work(priv); 3767 3755 iwl_setup_rx_handlers(priv); ··· 3790 3788 3791 3789 err = iwl_request_firmware(priv, true); 3792 3790 if (err) 3793 - goto out_remove_sysfs; 3791 + goto out_destroy_workqueue; 3794 3792 3795 3793 return 0; 3796 3794 3797 - out_remove_sysfs: 3795 + out_destroy_workqueue: 3798 3796 destroy_workqueue(priv->workqueue); 3799 3797 priv->workqueue = NULL; 3800 - sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); 3801 - out_free_irq: 3802 3798 free_irq(priv->pci_dev->irq, priv); 3803 3799 iwl_free_isr_ict(priv); 3804 3800 out_disable_msi:
+39
drivers/net/wireless/iwlwifi/iwl-core.c
··· 854 854 } 855 855 EXPORT_SYMBOL(iwl_set_rxon_chain); 856 856 857 + /* Return valid channel */ 858 + u8 iwl_get_single_channel_number(struct iwl_priv *priv, 859 + enum ieee80211_band band) 860 + { 861 + const struct iwl_channel_info *ch_info; 862 + int i; 863 + u8 channel = 0; 864 + 865 + /* only scan single channel, good enough to reset the RF */ 866 + /* pick the first valid not in-use channel */ 867 + if (band == IEEE80211_BAND_5GHZ) { 868 + for (i = 14; i < priv->channel_count; i++) { 869 + if (priv->channel_info[i].channel != 870 + le16_to_cpu(priv->staging_rxon.channel)) { 871 + channel = priv->channel_info[i].channel; 872 + ch_info = iwl_get_channel_info(priv, 873 + band, channel); 874 + if (is_channel_valid(ch_info)) 875 + break; 876 + } 877 + } 878 + } else { 879 + for (i = 0; i < 14; i++) { 880 + if (priv->channel_info[i].channel != 881 + le16_to_cpu(priv->staging_rxon.channel)) { 882 + channel = 883 + priv->channel_info[i].channel; 884 + ch_info = iwl_get_channel_info(priv, 885 + band, channel); 886 + if (is_channel_valid(ch_info)) 887 + break; 888 + } 889 + } 890 + } 891 + 892 + return channel; 893 + } 894 + EXPORT_SYMBOL(iwl_get_single_channel_number); 895 + 857 896 /** 858 897 * iwl_set_rxon_channel - Set the phymode and channel values in staging RXON 859 898 * @phymode: MODE_IEEE80211A sets to 5.2GHz; all else set to 2.4GHz
+2
drivers/net/wireless/iwlwifi/iwl-core.h
··· 343 343 int iwl_full_rxon_required(struct iwl_priv *priv); 344 344 void iwl_set_rxon_chain(struct iwl_priv *priv); 345 345 int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch); 346 + u8 iwl_get_single_channel_number(struct iwl_priv *priv, 347 + enum ieee80211_band band); 346 348 void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf); 347 349 u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv, 348 350 struct ieee80211_sta_ht_cap *sta_ht_inf);
+53 -3
drivers/net/wireless/iwlwifi/iwl3945-base.c
··· 1844 1844 #endif 1845 1845 } 1846 1846 1847 + static int iwl3945_get_single_channel_for_scan(struct iwl_priv *priv, 1848 + struct ieee80211_vif *vif, 1849 + enum ieee80211_band band, 1850 + struct iwl3945_scan_channel *scan_ch) 1851 + { 1852 + const struct ieee80211_supported_band *sband; 1853 + u16 passive_dwell = 0; 1854 + u16 active_dwell = 0; 1855 + int added = 0; 1856 + u8 channel = 0; 1857 + 1858 + sband = iwl_get_hw_mode(priv, band); 1859 + if (!sband) { 1860 + IWL_ERR(priv, "invalid band\n"); 1861 + return added; 1862 + } 1863 + 1864 + active_dwell = iwl_get_active_dwell_time(priv, band, 0); 1865 + passive_dwell = iwl_get_passive_dwell_time(priv, band, vif); 1866 + 1867 + if (passive_dwell <= active_dwell) 1868 + passive_dwell = active_dwell + 1; 1869 + 1870 + 1871 + channel = iwl_get_single_channel_number(priv, band); 1872 + 1873 + if (channel) { 1874 + scan_ch->channel = channel; 1875 + scan_ch->type = 0; /* passive */ 1876 + scan_ch->active_dwell = cpu_to_le16(active_dwell); 1877 + scan_ch->passive_dwell = cpu_to_le16(passive_dwell); 1878 + /* Set txpower levels to defaults */ 1879 + scan_ch->tpc.dsp_atten = 110; 1880 + if (band == IEEE80211_BAND_5GHZ) 1881 + scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3; 1882 + else 1883 + scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); 1884 + added++; 1885 + } else 1886 + IWL_ERR(priv, "no valid channel found\n"); 1887 + return added; 1888 + } 1889 + 1847 1890 static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, 1848 1891 enum ieee80211_band band, 1849 1892 u8 is_active, u8 n_probes, ··· 3035 2992 /* select Rx antennas */ 3036 2993 scan->flags |= iwl3945_get_antenna_flags(priv); 3037 2994 3038 - scan->channel_count = 3039 - iwl3945_get_channels_for_scan(priv, band, is_active, n_probes, 3040 - (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif); 2995 + if (priv->is_internal_short_scan) { 2996 + scan->channel_count = 2997 + iwl3945_get_single_channel_for_scan(priv, vif, band, 2998 + (void *)&scan->data[le16_to_cpu( 2999 + scan->tx_cmd.len)]); 3000 + } else { 3001 + scan->channel_count = 3002 + iwl3945_get_channels_for_scan(priv, band, is_active, n_probes, 3003 + (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)], vif); 3004 + } 3041 3005 3042 3006 if (scan->channel_count == 0) { 3043 3007 IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count);
+1
drivers/net/wireless/p54/p54usb.c
··· 80 80 {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ 81 81 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 82 82 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ 83 + {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */ 83 84 {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */ 84 85 {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */ 85 86 {}
+1
drivers/net/wireless/wl12xx/wl1251_sdio.c
··· 259 259 sdio_disable_func(func); 260 260 release: 261 261 sdio_release_host(func); 262 + wl1251_free_hw(wl); 262 263 return ret; 263 264 } 264 265
+1 -1
net/mac80211/driver-ops.h
··· 349 349 struct survey_info *survey) 350 350 { 351 351 int ret = -EOPNOTSUPP; 352 - if (local->ops->conf_tx) 352 + if (local->ops->get_survey) 353 353 ret = local->ops->get_survey(&local->hw, idx, survey); 354 354 /* trace_drv_get_survey(local, idx, survey, ret); */ 355 355 return ret;
+83 -9
net/mac80211/mlme.c
··· 1692 1692 rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); 1693 1693 break; 1694 1694 case IEEE80211_STYPE_ACTION: 1695 - if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) 1696 - break; 1695 + switch (mgmt->u.action.category) { 1696 + case WLAN_CATEGORY_BACK: { 1697 + struct ieee80211_local *local = sdata->local; 1698 + int len = skb->len; 1699 + struct sta_info *sta; 1697 1700 1698 - ieee80211_sta_process_chanswitch(sdata, 1699 - &mgmt->u.action.u.chan_switch.sw_elem, 1700 - (void *)ifmgd->associated->priv, 1701 - rx_status->mactime); 1702 - break; 1701 + rcu_read_lock(); 1702 + sta = sta_info_get(sdata, mgmt->sa); 1703 + if (!sta) { 1704 + rcu_read_unlock(); 1705 + break; 1706 + } 1707 + 1708 + local_bh_disable(); 1709 + 1710 + switch (mgmt->u.action.u.addba_req.action_code) { 1711 + case WLAN_ACTION_ADDBA_REQ: 1712 + if (len < (IEEE80211_MIN_ACTION_SIZE + 1713 + sizeof(mgmt->u.action.u.addba_req))) 1714 + break; 1715 + ieee80211_process_addba_request(local, sta, mgmt, len); 1716 + break; 1717 + case WLAN_ACTION_ADDBA_RESP: 1718 + if (len < (IEEE80211_MIN_ACTION_SIZE + 1719 + sizeof(mgmt->u.action.u.addba_resp))) 1720 + break; 1721 + ieee80211_process_addba_resp(local, sta, mgmt, len); 1722 + break; 1723 + case WLAN_ACTION_DELBA: 1724 + if (len < (IEEE80211_MIN_ACTION_SIZE + 1725 + sizeof(mgmt->u.action.u.delba))) 1726 + break; 1727 + ieee80211_process_delba(sdata, sta, mgmt, len); 1728 + break; 1729 + } 1730 + local_bh_enable(); 1731 + rcu_read_unlock(); 1732 + break; 1733 + } 1734 + case WLAN_CATEGORY_SPECTRUM_MGMT: 1735 + ieee80211_sta_process_chanswitch(sdata, 1736 + &mgmt->u.action.u.chan_switch.sw_elem, 1737 + (void *)ifmgd->associated->priv, 1738 + rx_status->mactime); 1739 + break; 1740 + } 1703 1741 } 1704 1742 mutex_unlock(&ifmgd->mtx); 1705 1743 ··· 1760 1722 mutex_unlock(&ifmgd->mtx); 1761 1723 1762 1724 if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && 1763 - (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) 1764 - cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 1725 + (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) { 1726 + struct ieee80211_local *local = sdata->local; 1727 + struct ieee80211_work *wk; 1765 1728 1729 + mutex_lock(&local->work_mtx); 1730 + list_for_each_entry(wk, &local->work_list, list) { 1731 + if (wk->sdata != sdata) 1732 + continue; 1733 + 1734 + if (wk->type != IEEE80211_WORK_ASSOC) 1735 + continue; 1736 + 1737 + if (memcmp(mgmt->bssid, wk->filter_ta, ETH_ALEN)) 1738 + continue; 1739 + if (memcmp(mgmt->sa, wk->filter_ta, ETH_ALEN)) 1740 + continue; 1741 + 1742 + /* 1743 + * Printing the message only here means we can't 1744 + * spuriously print it, but it also means that it 1745 + * won't be printed when the frame comes in before 1746 + * we even tried to associate or in similar cases. 1747 + * 1748 + * Ultimately, I suspect cfg80211 should print the 1749 + * messages instead. 1750 + */ 1751 + printk(KERN_DEBUG 1752 + "%s: deauthenticated from %pM (Reason: %u)\n", 1753 + sdata->name, mgmt->bssid, 1754 + le16_to_cpu(mgmt->u.deauth.reason_code)); 1755 + 1756 + list_del_rcu(&wk->list); 1757 + free_work(wk); 1758 + break; 1759 + } 1760 + mutex_unlock(&local->work_mtx); 1761 + 1762 + cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 1763 + } 1766 1764 out: 1767 1765 kfree_skb(skb); 1768 1766 }
+3
net/mac80211/rx.c
··· 1944 1944 if (len < IEEE80211_MIN_ACTION_SIZE + 1) 1945 1945 break; 1946 1946 1947 + if (sdata->vif.type == NL80211_IFTYPE_STATION) 1948 + return ieee80211_sta_rx_mgmt(sdata, rx->skb); 1949 + 1947 1950 switch (mgmt->u.action.u.addba_req.action_code) { 1948 1951 case WLAN_ACTION_ADDBA_REQ: 1949 1952 if (len < (IEEE80211_MIN_ACTION_SIZE +