diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 12 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 12 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 14 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 7 |
7 files changed, 39 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index fbb3a573463e..2de6471d4be9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
| @@ -112,7 +112,7 @@ enum iwl3945_antenna { | |||
| 112 | #define IWL_TX_FIFO_NONE 7 | 112 | #define IWL_TX_FIFO_NONE 7 |
| 113 | 113 | ||
| 114 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ | 114 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ |
| 115 | #define IWL_MIN_NUM_QUEUES 4 | 115 | #define IWL39_MIN_NUM_QUEUES 4 |
| 116 | 116 | ||
| 117 | #define IEEE80211_DATA_LEN 2304 | 117 | #define IEEE80211_DATA_LEN 2304 |
| 118 | #define IEEE80211_4ADDR_LEN 30 | 118 | #define IEEE80211_4ADDR_LEN 30 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 6ab07165ea28..18b135f510e5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -1332,6 +1332,9 @@ int iwl_setup_mac(struct iwl_priv *priv) | |||
| 1332 | 1332 | ||
| 1333 | hw->wiphy->custom_regulatory = true; | 1333 | hw->wiphy->custom_regulatory = true; |
| 1334 | 1334 | ||
| 1335 | /* Firmware does not support this */ | ||
| 1336 | hw->wiphy->disable_beacon_hints = true; | ||
| 1337 | |||
| 1335 | hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX; | 1338 | hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX; |
| 1336 | /* we create the 802.11 header and a zero-length SSID element */ | 1339 | /* we create the 802.11 header and a zero-length SSID element */ |
| 1337 | hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; | 1340 | hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 11e08c068917..ca00cc8ad4c7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
| @@ -308,18 +308,18 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file, | |||
| 308 | return -ENODATA; | 308 | return -ENODATA; |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | ptr = priv->eeprom; | ||
| 312 | if (!ptr) { | ||
| 313 | IWL_ERR(priv, "Invalid EEPROM/OTP memory\n"); | ||
| 314 | return -ENOMEM; | ||
| 315 | } | ||
| 316 | |||
| 311 | /* 4 characters for byte 0xYY */ | 317 | /* 4 characters for byte 0xYY */ |
| 312 | buf = kzalloc(buf_size, GFP_KERNEL); | 318 | buf = kzalloc(buf_size, GFP_KERNEL); |
| 313 | if (!buf) { | 319 | if (!buf) { |
| 314 | IWL_ERR(priv, "Can not allocate Buffer\n"); | 320 | IWL_ERR(priv, "Can not allocate Buffer\n"); |
| 315 | return -ENOMEM; | 321 | return -ENOMEM; |
| 316 | } | 322 | } |
| 317 | |||
| 318 | ptr = priv->eeprom; | ||
| 319 | if (!ptr) { | ||
| 320 | IWL_ERR(priv, "Invalid EEPROM/OTP memory\n"); | ||
| 321 | return -ENOMEM; | ||
| 322 | } | ||
| 323 | pos += scnprintf(buf + pos, buf_size - pos, "NVM Type: %s\n", | 323 | pos += scnprintf(buf + pos, buf_size - pos, "NVM Type: %s\n", |
| 324 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) | 324 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) |
| 325 | ? "OTP" : "EEPROM"); | 325 | ? "OTP" : "EEPROM"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index e2d620f0b6e8..650e20af20fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
| @@ -258,8 +258,10 @@ struct iwl_channel_info { | |||
| 258 | #define IWL_TX_FIFO_HCCA_2 6 | 258 | #define IWL_TX_FIFO_HCCA_2 6 |
| 259 | #define IWL_TX_FIFO_NONE 7 | 259 | #define IWL_TX_FIFO_NONE 7 |
| 260 | 260 | ||
| 261 | /* Minimum number of queues. MAX_NUM is defined in hw specific files */ | 261 | /* Minimum number of queues. MAX_NUM is defined in hw specific files. |
| 262 | #define IWL_MIN_NUM_QUEUES 4 | 262 | * Set the minimum to accommodate the 4 standard TX queues, 1 command |
| 263 | * queue, 2 (unused) HCCA queues, and 4 HT queues (one for each AC) */ | ||
| 264 | #define IWL_MIN_NUM_QUEUES 10 | ||
| 263 | 265 | ||
| 264 | /* Power management (not Tx power) structures */ | 266 | /* Power management (not Tx power) structures */ |
| 265 | 267 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 2addf735b193..ffd5c61a7553 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
| @@ -566,6 +566,8 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
| 566 | unsigned long flags; | 566 | unsigned long flags; |
| 567 | 567 | ||
| 568 | spin_lock_irqsave(&priv->sta_lock, flags); | 568 | spin_lock_irqsave(&priv->sta_lock, flags); |
| 569 | IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n", | ||
| 570 | keyconf->keyidx); | ||
| 569 | 571 | ||
| 570 | if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) | 572 | if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) |
| 571 | IWL_ERR(priv, "index %d not used in uCode key table.\n", | 573 | IWL_ERR(priv, "index %d not used in uCode key table.\n", |
| @@ -573,6 +575,11 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
| 573 | 575 | ||
| 574 | priv->default_wep_key--; | 576 | priv->default_wep_key--; |
| 575 | memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0])); | 577 | memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0])); |
| 578 | if (iwl_is_rfkill(priv)) { | ||
| 579 | IWL_DEBUG_WEP(priv, "Not sending REPLY_WEPKEY command due to RFKILL.\n"); | ||
| 580 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
| 581 | return 0; | ||
| 582 | } | ||
| 576 | ret = iwl_send_static_wepkey_cmd(priv, 1); | 583 | ret = iwl_send_static_wepkey_cmd(priv, 1); |
| 577 | IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n", | 584 | IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n", |
| 578 | keyconf->keyidx, ret); | 585 | keyconf->keyidx, ret); |
| @@ -853,6 +860,11 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, | |||
| 853 | priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; | 860 | priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; |
| 854 | priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | 861 | priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; |
| 855 | 862 | ||
| 863 | if (iwl_is_rfkill(priv)) { | ||
| 864 | IWL_DEBUG_WEP(priv, "Not sending REPLY_ADD_STA command because RFKILL enabled. \n"); | ||
| 865 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
| 866 | return 0; | ||
| 867 | } | ||
| 856 | ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); | 868 | ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); |
| 857 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 869 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
| 858 | return ret; | 870 | return ret; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 9bbeec9427f0..2e89040e63be 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
| @@ -720,8 +720,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 720 | goto drop_unlock; | 720 | goto drop_unlock; |
| 721 | } | 721 | } |
| 722 | 722 | ||
| 723 | spin_unlock_irqrestore(&priv->lock, flags); | ||
| 724 | |||
| 725 | hdr_len = ieee80211_hdrlen(fc); | 723 | hdr_len = ieee80211_hdrlen(fc); |
| 726 | 724 | ||
| 727 | /* Find (or create) index into station table for destination station */ | 725 | /* Find (or create) index into station table for destination station */ |
| @@ -729,7 +727,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 729 | if (sta_id == IWL_INVALID_STATION) { | 727 | if (sta_id == IWL_INVALID_STATION) { |
| 730 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 728 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", |
| 731 | hdr->addr1); | 729 | hdr->addr1); |
| 732 | goto drop; | 730 | goto drop_unlock; |
| 733 | } | 731 | } |
| 734 | 732 | ||
| 735 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); | 733 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); |
| @@ -750,14 +748,17 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 750 | txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; | 748 | txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; |
| 751 | swq_id = iwl_virtual_agg_queue_num(swq_id, txq_id); | 749 | swq_id = iwl_virtual_agg_queue_num(swq_id, txq_id); |
| 752 | } | 750 | } |
| 753 | priv->stations[sta_id].tid[tid].tfds_in_queue++; | ||
| 754 | } | 751 | } |
| 755 | 752 | ||
| 756 | txq = &priv->txq[txq_id]; | 753 | txq = &priv->txq[txq_id]; |
| 757 | q = &txq->q; | 754 | q = &txq->q; |
| 758 | txq->swq_id = swq_id; | 755 | txq->swq_id = swq_id; |
| 759 | 756 | ||
| 760 | spin_lock_irqsave(&priv->lock, flags); | 757 | if (unlikely(iwl_queue_space(q) < q->high_mark)) |
| 758 | goto drop_unlock; | ||
| 759 | |||
| 760 | if (ieee80211_is_data_qos(fc)) | ||
| 761 | priv->stations[sta_id].tid[tid].tfds_in_queue++; | ||
| 761 | 762 | ||
| 762 | /* Set up driver data for this TFD */ | 763 | /* Set up driver data for this TFD */ |
| 763 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); | 764 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); |
| @@ -902,7 +903,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
| 902 | 903 | ||
| 903 | drop_unlock: | 904 | drop_unlock: |
| 904 | spin_unlock_irqrestore(&priv->lock, flags); | 905 | spin_unlock_irqrestore(&priv->lock, flags); |
| 905 | drop: | ||
| 906 | return -1; | 906 | return -1; |
| 907 | } | 907 | } |
| 908 | EXPORT_SYMBOL(iwl_tx_skb); | 908 | EXPORT_SYMBOL(iwl_tx_skb); |
| @@ -1171,6 +1171,8 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | |||
| 1171 | IWL_ERR(priv, "Start AGG on invalid station\n"); | 1171 | IWL_ERR(priv, "Start AGG on invalid station\n"); |
| 1172 | return -ENXIO; | 1172 | return -ENXIO; |
| 1173 | } | 1173 | } |
| 1174 | if (unlikely(tid >= MAX_TID_COUNT)) | ||
| 1175 | return -EINVAL; | ||
| 1174 | 1176 | ||
| 1175 | if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) { | 1177 | if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) { |
| 1176 | IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n"); | 1178 | IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 956798f2c80c..523843369ca2 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
| @@ -3968,6 +3968,9 @@ static int iwl3945_setup_mac(struct iwl_priv *priv) | |||
| 3968 | 3968 | ||
| 3969 | hw->wiphy->custom_regulatory = true; | 3969 | hw->wiphy->custom_regulatory = true; |
| 3970 | 3970 | ||
| 3971 | /* Firmware does not support this */ | ||
| 3972 | hw->wiphy->disable_beacon_hints = true; | ||
| 3973 | |||
| 3971 | hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945; | 3974 | hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945; |
| 3972 | /* we create the 802.11 header and a zero-length SSID element */ | 3975 | /* we create the 802.11 header and a zero-length SSID element */ |
| 3973 | hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; | 3976 | hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; |
| @@ -4018,10 +4021,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
| 4018 | SET_IEEE80211_DEV(hw, &pdev->dev); | 4021 | SET_IEEE80211_DEV(hw, &pdev->dev); |
| 4019 | 4022 | ||
| 4020 | if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) || | 4023 | if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) || |
| 4021 | (iwl3945_mod_params.num_of_queues < IWL_MIN_NUM_QUEUES)) { | 4024 | (iwl3945_mod_params.num_of_queues < IWL39_MIN_NUM_QUEUES)) { |
| 4022 | IWL_ERR(priv, | 4025 | IWL_ERR(priv, |
| 4023 | "invalid queues_num, should be between %d and %d\n", | 4026 | "invalid queues_num, should be between %d and %d\n", |
| 4024 | IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); | 4027 | IWL39_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); |
| 4025 | err = -EINVAL; | 4028 | err = -EINVAL; |
| 4026 | goto out_ieee80211_free_hw; | 4029 | goto out_ieee80211_free_hw; |
| 4027 | } | 4030 | } |
