diff options
Diffstat (limited to 'drivers/net/wireless')
24 files changed, 204 insertions, 64 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c index 8d78253c26ce..a366d6b4626f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c | |||
| @@ -76,9 +76,16 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
| 76 | mask2 |= ATH9K_INT_CST; | 76 | mask2 |= ATH9K_INT_CST; |
| 77 | if (isr2 & AR_ISR_S2_TSFOOR) | 77 | if (isr2 & AR_ISR_S2_TSFOOR) |
| 78 | mask2 |= ATH9K_INT_TSFOOR; | 78 | mask2 |= ATH9K_INT_TSFOOR; |
| 79 | |||
| 80 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
| 81 | REG_WRITE(ah, AR_ISR_S2, isr2); | ||
| 82 | isr &= ~AR_ISR_BCNMISC; | ||
| 83 | } | ||
| 79 | } | 84 | } |
| 80 | 85 | ||
| 81 | isr = REG_READ(ah, AR_ISR_RAC); | 86 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) |
| 87 | isr = REG_READ(ah, AR_ISR_RAC); | ||
| 88 | |||
| 82 | if (isr == 0xffffffff) { | 89 | if (isr == 0xffffffff) { |
| 83 | *masked = 0; | 90 | *masked = 0; |
| 84 | return false; | 91 | return false; |
| @@ -97,11 +104,23 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
| 97 | 104 | ||
| 98 | *masked |= ATH9K_INT_TX; | 105 | *masked |= ATH9K_INT_TX; |
| 99 | 106 | ||
| 100 | s0_s = REG_READ(ah, AR_ISR_S0_S); | 107 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) { |
| 108 | s0_s = REG_READ(ah, AR_ISR_S0_S); | ||
| 109 | s1_s = REG_READ(ah, AR_ISR_S1_S); | ||
| 110 | } else { | ||
| 111 | s0_s = REG_READ(ah, AR_ISR_S0); | ||
| 112 | REG_WRITE(ah, AR_ISR_S0, s0_s); | ||
| 113 | s1_s = REG_READ(ah, AR_ISR_S1); | ||
| 114 | REG_WRITE(ah, AR_ISR_S1, s1_s); | ||
| 115 | |||
| 116 | isr &= ~(AR_ISR_TXOK | | ||
| 117 | AR_ISR_TXDESC | | ||
| 118 | AR_ISR_TXERR | | ||
| 119 | AR_ISR_TXEOL); | ||
| 120 | } | ||
| 121 | |||
| 101 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK); | 122 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK); |
| 102 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC); | 123 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC); |
| 103 | |||
| 104 | s1_s = REG_READ(ah, AR_ISR_S1_S); | ||
| 105 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR); | 124 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR); |
| 106 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL); | 125 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL); |
| 107 | } | 126 | } |
| @@ -114,13 +133,15 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
| 114 | *masked |= mask2; | 133 | *masked |= mask2; |
| 115 | } | 134 | } |
| 116 | 135 | ||
| 117 | if (AR_SREV_9100(ah)) | 136 | if (!AR_SREV_9100(ah) && (isr & AR_ISR_GENTMR)) { |
| 118 | return true; | ||
| 119 | |||
| 120 | if (isr & AR_ISR_GENTMR) { | ||
| 121 | u32 s5_s; | 137 | u32 s5_s; |
| 122 | 138 | ||
| 123 | s5_s = REG_READ(ah, AR_ISR_S5_S); | 139 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) { |
| 140 | s5_s = REG_READ(ah, AR_ISR_S5_S); | ||
| 141 | } else { | ||
| 142 | s5_s = REG_READ(ah, AR_ISR_S5); | ||
| 143 | } | ||
| 144 | |||
| 124 | ah->intr_gen_timer_trigger = | 145 | ah->intr_gen_timer_trigger = |
| 125 | MS(s5_s, AR_ISR_S5_GENTIMER_TRIG); | 146 | MS(s5_s, AR_ISR_S5_GENTIMER_TRIG); |
| 126 | 147 | ||
| @@ -133,8 +154,21 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
| 133 | if ((s5_s & AR_ISR_S5_TIM_TIMER) && | 154 | if ((s5_s & AR_ISR_S5_TIM_TIMER) && |
| 134 | !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) | 155 | !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) |
| 135 | *masked |= ATH9K_INT_TIM_TIMER; | 156 | *masked |= ATH9K_INT_TIM_TIMER; |
| 157 | |||
| 158 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
| 159 | REG_WRITE(ah, AR_ISR_S5, s5_s); | ||
| 160 | isr &= ~AR_ISR_GENTMR; | ||
| 161 | } | ||
| 136 | } | 162 | } |
| 137 | 163 | ||
| 164 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
| 165 | REG_WRITE(ah, AR_ISR, isr); | ||
| 166 | REG_READ(ah, AR_ISR); | ||
| 167 | } | ||
| 168 | |||
| 169 | if (AR_SREV_9100(ah)) | ||
| 170 | return true; | ||
| 171 | |||
| 138 | if (sync_cause) { | 172 | if (sync_cause) { |
| 139 | ath9k_debug_sync_cause(common, sync_cause); | 173 | ath9k_debug_sync_cause(common, sync_cause); |
| 140 | fatal_int = | 174 | fatal_int = |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 1ec52356b5a1..130657db5c43 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
| @@ -3984,18 +3984,20 @@ static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq) | |||
| 3984 | int quick_drop; | 3984 | int quick_drop; |
| 3985 | s32 t[3], f[3] = {5180, 5500, 5785}; | 3985 | s32 t[3], f[3] = {5180, 5500, 5785}; |
| 3986 | 3986 | ||
| 3987 | if (!(pBase->miscConfiguration & BIT(1))) | 3987 | if (!(pBase->miscConfiguration & BIT(4))) |
| 3988 | return; | 3988 | return; |
| 3989 | 3989 | ||
| 3990 | if (freq < 4000) | 3990 | if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9340(ah)) { |
| 3991 | quick_drop = eep->modalHeader2G.quick_drop; | 3991 | if (freq < 4000) { |
| 3992 | else { | 3992 | quick_drop = eep->modalHeader2G.quick_drop; |
| 3993 | t[0] = eep->base_ext1.quick_drop_low; | 3993 | } else { |
| 3994 | t[1] = eep->modalHeader5G.quick_drop; | 3994 | t[0] = eep->base_ext1.quick_drop_low; |
| 3995 | t[2] = eep->base_ext1.quick_drop_high; | 3995 | t[1] = eep->modalHeader5G.quick_drop; |
| 3996 | quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); | 3996 | t[2] = eep->base_ext1.quick_drop_high; |
| 3997 | quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); | ||
| 3998 | } | ||
| 3999 | REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop); | ||
| 3997 | } | 4000 | } |
| 3998 | REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop); | ||
| 3999 | } | 4001 | } |
| 4000 | 4002 | ||
| 4001 | static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) | 4003 | static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) |
| @@ -4035,7 +4037,7 @@ static void ar9003_hw_xlna_bias_strength_apply(struct ath_hw *ah, bool is2ghz) | |||
| 4035 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; | 4037 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; |
| 4036 | u8 bias; | 4038 | u8 bias; |
| 4037 | 4039 | ||
| 4038 | if (!(eep->baseEepHeader.featureEnable & 0x40)) | 4040 | if (!(eep->baseEepHeader.miscConfiguration & 0x40)) |
| 4039 | return; | 4041 | return; |
| 4040 | 4042 | ||
| 4041 | if (!AR_SREV_9300(ah)) | 4043 | if (!AR_SREV_9300(ah)) |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 9a2657fdd9cc..608d739d1378 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -127,21 +127,26 @@ static void ath9k_htc_bssid_iter(void *data, u8 *mac, struct ieee80211_vif *vif) | |||
| 127 | struct ath9k_vif_iter_data *iter_data = data; | 127 | struct ath9k_vif_iter_data *iter_data = data; |
| 128 | int i; | 128 | int i; |
| 129 | 129 | ||
| 130 | for (i = 0; i < ETH_ALEN; i++) | 130 | if (iter_data->hw_macaddr != NULL) { |
| 131 | iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); | 131 | for (i = 0; i < ETH_ALEN; i++) |
| 132 | iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); | ||
| 133 | } else { | ||
| 134 | iter_data->hw_macaddr = mac; | ||
| 135 | } | ||
| 132 | } | 136 | } |
| 133 | 137 | ||
| 134 | static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, | 138 | static void ath9k_htc_set_mac_bssid_mask(struct ath9k_htc_priv *priv, |
| 135 | struct ieee80211_vif *vif) | 139 | struct ieee80211_vif *vif) |
| 136 | { | 140 | { |
| 137 | struct ath_common *common = ath9k_hw_common(priv->ah); | 141 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| 138 | struct ath9k_vif_iter_data iter_data; | 142 | struct ath9k_vif_iter_data iter_data; |
| 139 | 143 | ||
| 140 | /* | 144 | /* |
| 141 | * Use the hardware MAC address as reference, the hardware uses it | 145 | * Pick the MAC address of the first interface as the new hardware |
| 142 | * together with the BSSID mask when matching addresses. | 146 | * MAC address. The hardware will use it together with the BSSID mask |
| 147 | * when matching addresses. | ||
| 143 | */ | 148 | */ |
| 144 | iter_data.hw_macaddr = common->macaddr; | 149 | iter_data.hw_macaddr = NULL; |
| 145 | memset(&iter_data.mask, 0xff, ETH_ALEN); | 150 | memset(&iter_data.mask, 0xff, ETH_ALEN); |
| 146 | 151 | ||
| 147 | if (vif) | 152 | if (vif) |
| @@ -153,6 +158,10 @@ static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, | |||
| 153 | ath9k_htc_bssid_iter, &iter_data); | 158 | ath9k_htc_bssid_iter, &iter_data); |
| 154 | 159 | ||
| 155 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 160 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
| 161 | |||
| 162 | if (iter_data.hw_macaddr) | ||
| 163 | memcpy(common->macaddr, iter_data.hw_macaddr, ETH_ALEN); | ||
| 164 | |||
| 156 | ath_hw_setbssidmask(common); | 165 | ath_hw_setbssidmask(common); |
| 157 | } | 166 | } |
| 158 | 167 | ||
| @@ -1063,7 +1072,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, | |||
| 1063 | goto out; | 1072 | goto out; |
| 1064 | } | 1073 | } |
| 1065 | 1074 | ||
| 1066 | ath9k_htc_set_bssid_mask(priv, vif); | 1075 | ath9k_htc_set_mac_bssid_mask(priv, vif); |
| 1067 | 1076 | ||
| 1068 | priv->vif_slot |= (1 << avp->index); | 1077 | priv->vif_slot |= (1 << avp->index); |
| 1069 | priv->nvifs++; | 1078 | priv->nvifs++; |
| @@ -1128,7 +1137,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw, | |||
| 1128 | 1137 | ||
| 1129 | ath9k_htc_set_opmode(priv); | 1138 | ath9k_htc_set_opmode(priv); |
| 1130 | 1139 | ||
| 1131 | ath9k_htc_set_bssid_mask(priv, vif); | 1140 | ath9k_htc_set_mac_bssid_mask(priv, vif); |
| 1132 | 1141 | ||
| 1133 | /* | 1142 | /* |
| 1134 | * Stop ANI only if there are no associated station interfaces. | 1143 | * Stop ANI only if there are no associated station interfaces. |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 54b04155e43b..8918035da3a3 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
| @@ -146,10 +146,9 @@ static void ath9k_hw_set_clockrate(struct ath_hw *ah) | |||
| 146 | else | 146 | else |
| 147 | clockrate = ATH9K_CLOCK_RATE_5GHZ_OFDM; | 147 | clockrate = ATH9K_CLOCK_RATE_5GHZ_OFDM; |
| 148 | 148 | ||
| 149 | if (IS_CHAN_HT40(chan)) | 149 | if (chan) { |
| 150 | clockrate *= 2; | 150 | if (IS_CHAN_HT40(chan)) |
| 151 | 151 | clockrate *= 2; | |
| 152 | if (ah->curchan) { | ||
| 153 | if (IS_CHAN_HALF_RATE(chan)) | 152 | if (IS_CHAN_HALF_RATE(chan)) |
| 154 | clockrate /= 2; | 153 | clockrate /= 2; |
| 155 | if (IS_CHAN_QUARTER_RATE(chan)) | 154 | if (IS_CHAN_QUARTER_RATE(chan)) |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 74f452c7b166..21aa09e0e825 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -965,8 +965,9 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw, | |||
| 965 | struct ath_common *common = ath9k_hw_common(ah); | 965 | struct ath_common *common = ath9k_hw_common(ah); |
| 966 | 966 | ||
| 967 | /* | 967 | /* |
| 968 | * Use the hardware MAC address as reference, the hardware uses it | 968 | * Pick the MAC address of the first interface as the new hardware |
| 969 | * together with the BSSID mask when matching addresses. | 969 | * MAC address. The hardware will use it together with the BSSID mask |
| 970 | * when matching addresses. | ||
| 970 | */ | 971 | */ |
| 971 | memset(iter_data, 0, sizeof(*iter_data)); | 972 | memset(iter_data, 0, sizeof(*iter_data)); |
| 972 | memset(&iter_data->mask, 0xff, ETH_ALEN); | 973 | memset(&iter_data->mask, 0xff, ETH_ALEN); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 09cdbcd09739..b5a19e098f2d 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1276,6 +1276,10 @@ static void ath_tx_fill_desc(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1276 | if (!rts_thresh || (len > rts_thresh)) | 1276 | if (!rts_thresh || (len > rts_thresh)) |
| 1277 | rts = true; | 1277 | rts = true; |
| 1278 | } | 1278 | } |
| 1279 | |||
| 1280 | if (!aggr) | ||
| 1281 | len = fi->framelen; | ||
| 1282 | |||
| 1279 | ath_buf_set_rate(sc, bf, &info, len, rts); | 1283 | ath_buf_set_rate(sc, bf, &info, len, rts); |
| 1280 | } | 1284 | } |
| 1281 | 1285 | ||
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index de9eb2cfbf4b..366339421d4f 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c | |||
| @@ -2041,13 +2041,20 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len) | |||
| 2041 | case WCN36XX_HAL_DELETE_STA_CONTEXT_IND: | 2041 | case WCN36XX_HAL_DELETE_STA_CONTEXT_IND: |
| 2042 | mutex_lock(&wcn->hal_ind_mutex); | 2042 | mutex_lock(&wcn->hal_ind_mutex); |
| 2043 | msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL); | 2043 | msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL); |
| 2044 | msg_ind->msg_len = len; | 2044 | if (msg_ind) { |
| 2045 | msg_ind->msg = kmalloc(len, GFP_KERNEL); | 2045 | msg_ind->msg_len = len; |
| 2046 | memcpy(msg_ind->msg, buf, len); | 2046 | msg_ind->msg = kmalloc(len, GFP_KERNEL); |
| 2047 | list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); | 2047 | memcpy(msg_ind->msg, buf, len); |
| 2048 | queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); | 2048 | list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); |
| 2049 | wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n"); | 2049 | queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); |
| 2050 | wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n"); | ||
| 2051 | } | ||
| 2050 | mutex_unlock(&wcn->hal_ind_mutex); | 2052 | mutex_unlock(&wcn->hal_ind_mutex); |
| 2053 | if (msg_ind) | ||
| 2054 | break; | ||
| 2055 | /* FIXME: Do something smarter then just printing an error. */ | ||
| 2056 | wcn36xx_err("Run out of memory while handling SMD_EVENT (%d)\n", | ||
| 2057 | msg_header->msg_type); | ||
| 2051 | break; | 2058 | break; |
| 2052 | default: | 2059 | default: |
| 2053 | wcn36xx_err("SMD_EVENT (%d) not supported\n", | 2060 | wcn36xx_err("SMD_EVENT (%d) not supported\n", |
diff --git a/drivers/net/wireless/brcm80211/Kconfig b/drivers/net/wireless/brcm80211/Kconfig index b00a7e92225f..54e36fcb3954 100644 --- a/drivers/net/wireless/brcm80211/Kconfig +++ b/drivers/net/wireless/brcm80211/Kconfig | |||
| @@ -5,6 +5,8 @@ config BRCMSMAC | |||
| 5 | tristate "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver" | 5 | tristate "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver" |
| 6 | depends on MAC80211 | 6 | depends on MAC80211 |
| 7 | depends on BCMA | 7 | depends on BCMA |
| 8 | select NEW_LEDS if BCMA_DRIVER_GPIO | ||
| 9 | select LEDS_CLASS if BCMA_DRIVER_GPIO | ||
| 8 | select BRCMUTIL | 10 | select BRCMUTIL |
| 9 | select FW_LOADER | 11 | select FW_LOADER |
| 10 | select CRC_CCITT | 12 | select CRC_CCITT |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 905704e335d7..abc9ceca70f3 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
| @@ -109,6 +109,8 @@ static inline int brcmf_sdioh_f0_write_byte(struct brcmf_sdio_dev *sdiodev, | |||
| 109 | brcmf_err("Disable F2 failed:%d\n", | 109 | brcmf_err("Disable F2 failed:%d\n", |
| 110 | err_ret); | 110 | err_ret); |
| 111 | } | 111 | } |
| 112 | } else { | ||
| 113 | err_ret = -ENOENT; | ||
| 112 | } | 114 | } |
| 113 | } else if ((regaddr == SDIO_CCCR_ABORT) || | 115 | } else if ((regaddr == SDIO_CCCR_ABORT) || |
| 114 | (regaddr == SDIO_CCCR_IENx)) { | 116 | (regaddr == SDIO_CCCR_IENx)) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c index 85879dbaa402..3c34a72a5d64 100644 --- a/drivers/net/wireless/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/iwlwifi/iwl-7000.c | |||
| @@ -67,8 +67,8 @@ | |||
| 67 | #include "iwl-agn-hw.h" | 67 | #include "iwl-agn-hw.h" |
| 68 | 68 | ||
| 69 | /* Highest firmware API version supported */ | 69 | /* Highest firmware API version supported */ |
| 70 | #define IWL7260_UCODE_API_MAX 7 | 70 | #define IWL7260_UCODE_API_MAX 8 |
| 71 | #define IWL3160_UCODE_API_MAX 7 | 71 | #define IWL3160_UCODE_API_MAX 8 |
| 72 | 72 | ||
| 73 | /* Oldest version we won't warn about */ | 73 | /* Oldest version we won't warn about */ |
| 74 | #define IWL7260_UCODE_API_OK 7 | 74 | #define IWL7260_UCODE_API_OK 7 |
| @@ -130,6 +130,7 @@ const struct iwl_cfg iwl7260_2ac_cfg = { | |||
| 130 | .ht_params = &iwl7000_ht_params, | 130 | .ht_params = &iwl7000_ht_params, |
| 131 | .nvm_ver = IWL7260_NVM_VERSION, | 131 | .nvm_ver = IWL7260_NVM_VERSION, |
| 132 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 132 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
| 133 | .host_interrupt_operation_mode = true, | ||
| 133 | }; | 134 | }; |
| 134 | 135 | ||
| 135 | const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { | 136 | const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { |
| @@ -140,6 +141,7 @@ const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { | |||
| 140 | .nvm_ver = IWL7260_NVM_VERSION, | 141 | .nvm_ver = IWL7260_NVM_VERSION, |
| 141 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 142 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
| 142 | .high_temp = true, | 143 | .high_temp = true, |
| 144 | .host_interrupt_operation_mode = true, | ||
| 143 | }; | 145 | }; |
| 144 | 146 | ||
| 145 | const struct iwl_cfg iwl7260_2n_cfg = { | 147 | const struct iwl_cfg iwl7260_2n_cfg = { |
| @@ -149,6 +151,7 @@ const struct iwl_cfg iwl7260_2n_cfg = { | |||
| 149 | .ht_params = &iwl7000_ht_params, | 151 | .ht_params = &iwl7000_ht_params, |
| 150 | .nvm_ver = IWL7260_NVM_VERSION, | 152 | .nvm_ver = IWL7260_NVM_VERSION, |
| 151 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 153 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
| 154 | .host_interrupt_operation_mode = true, | ||
| 152 | }; | 155 | }; |
| 153 | 156 | ||
| 154 | const struct iwl_cfg iwl7260_n_cfg = { | 157 | const struct iwl_cfg iwl7260_n_cfg = { |
| @@ -158,6 +161,7 @@ const struct iwl_cfg iwl7260_n_cfg = { | |||
| 158 | .ht_params = &iwl7000_ht_params, | 161 | .ht_params = &iwl7000_ht_params, |
| 159 | .nvm_ver = IWL7260_NVM_VERSION, | 162 | .nvm_ver = IWL7260_NVM_VERSION, |
| 160 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 163 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
| 164 | .host_interrupt_operation_mode = true, | ||
| 161 | }; | 165 | }; |
| 162 | 166 | ||
| 163 | const struct iwl_cfg iwl3160_2ac_cfg = { | 167 | const struct iwl_cfg iwl3160_2ac_cfg = { |
| @@ -167,6 +171,7 @@ const struct iwl_cfg iwl3160_2ac_cfg = { | |||
| 167 | .ht_params = &iwl7000_ht_params, | 171 | .ht_params = &iwl7000_ht_params, |
| 168 | .nvm_ver = IWL3160_NVM_VERSION, | 172 | .nvm_ver = IWL3160_NVM_VERSION, |
| 169 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 173 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
| 174 | .host_interrupt_operation_mode = true, | ||
| 170 | }; | 175 | }; |
| 171 | 176 | ||
| 172 | const struct iwl_cfg iwl3160_2n_cfg = { | 177 | const struct iwl_cfg iwl3160_2n_cfg = { |
| @@ -176,6 +181,7 @@ const struct iwl_cfg iwl3160_2n_cfg = { | |||
| 176 | .ht_params = &iwl7000_ht_params, | 181 | .ht_params = &iwl7000_ht_params, |
| 177 | .nvm_ver = IWL3160_NVM_VERSION, | 182 | .nvm_ver = IWL3160_NVM_VERSION, |
| 178 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 183 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
| 184 | .host_interrupt_operation_mode = true, | ||
| 179 | }; | 185 | }; |
| 180 | 186 | ||
| 181 | const struct iwl_cfg iwl3160_n_cfg = { | 187 | const struct iwl_cfg iwl3160_n_cfg = { |
| @@ -185,6 +191,7 @@ const struct iwl_cfg iwl3160_n_cfg = { | |||
| 185 | .ht_params = &iwl7000_ht_params, | 191 | .ht_params = &iwl7000_ht_params, |
| 186 | .nvm_ver = IWL3160_NVM_VERSION, | 192 | .nvm_ver = IWL3160_NVM_VERSION, |
| 187 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 193 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
| 194 | .host_interrupt_operation_mode = true, | ||
| 188 | }; | 195 | }; |
| 189 | 196 | ||
| 190 | const struct iwl_cfg iwl7265_2ac_cfg = { | 197 | const struct iwl_cfg iwl7265_2ac_cfg = { |
| @@ -196,5 +203,23 @@ const struct iwl_cfg iwl7265_2ac_cfg = { | |||
| 196 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | 203 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, |
| 197 | }; | 204 | }; |
| 198 | 205 | ||
| 206 | const struct iwl_cfg iwl7265_2n_cfg = { | ||
| 207 | .name = "Intel(R) Dual Band Wireless N 7265", | ||
| 208 | .fw_name_pre = IWL7265_FW_PRE, | ||
| 209 | IWL_DEVICE_7000, | ||
| 210 | .ht_params = &iwl7000_ht_params, | ||
| 211 | .nvm_ver = IWL7265_NVM_VERSION, | ||
| 212 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | ||
| 213 | }; | ||
| 214 | |||
| 215 | const struct iwl_cfg iwl7265_n_cfg = { | ||
| 216 | .name = "Intel(R) Wireless N 7265", | ||
| 217 | .fw_name_pre = IWL7265_FW_PRE, | ||
| 218 | IWL_DEVICE_7000, | ||
| 219 | .ht_params = &iwl7000_ht_params, | ||
| 220 | .nvm_ver = IWL7265_NVM_VERSION, | ||
| 221 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | ||
| 222 | }; | ||
| 223 | |||
| 199 | MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); | 224 | MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); |
| 200 | MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); | 225 | MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index 18f232e8e812..03fd9aa8bfda 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
| @@ -207,6 +207,8 @@ struct iwl_eeprom_params { | |||
| 207 | * @rx_with_siso_diversity: 1x1 device with rx antenna diversity | 207 | * @rx_with_siso_diversity: 1x1 device with rx antenna diversity |
| 208 | * @internal_wimax_coex: internal wifi/wimax combo device | 208 | * @internal_wimax_coex: internal wifi/wimax combo device |
| 209 | * @high_temp: Is this NIC is designated to be in high temperature. | 209 | * @high_temp: Is this NIC is designated to be in high temperature. |
| 210 | * @host_interrupt_operation_mode: device needs host interrupt operation | ||
| 211 | * mode set | ||
| 210 | * | 212 | * |
| 211 | * We enable the driver to be backward compatible wrt. hardware features. | 213 | * We enable the driver to be backward compatible wrt. hardware features. |
| 212 | * API differences in uCode shouldn't be handled here but through TLVs | 214 | * API differences in uCode shouldn't be handled here but through TLVs |
| @@ -235,6 +237,7 @@ struct iwl_cfg { | |||
| 235 | enum iwl_led_mode led_mode; | 237 | enum iwl_led_mode led_mode; |
| 236 | const bool rx_with_siso_diversity; | 238 | const bool rx_with_siso_diversity; |
| 237 | const bool internal_wimax_coex; | 239 | const bool internal_wimax_coex; |
| 240 | const bool host_interrupt_operation_mode; | ||
| 238 | bool high_temp; | 241 | bool high_temp; |
| 239 | }; | 242 | }; |
| 240 | 243 | ||
| @@ -294,6 +297,8 @@ extern const struct iwl_cfg iwl3160_2ac_cfg; | |||
| 294 | extern const struct iwl_cfg iwl3160_2n_cfg; | 297 | extern const struct iwl_cfg iwl3160_2n_cfg; |
| 295 | extern const struct iwl_cfg iwl3160_n_cfg; | 298 | extern const struct iwl_cfg iwl3160_n_cfg; |
| 296 | extern const struct iwl_cfg iwl7265_2ac_cfg; | 299 | extern const struct iwl_cfg iwl7265_2ac_cfg; |
| 300 | extern const struct iwl_cfg iwl7265_2n_cfg; | ||
| 301 | extern const struct iwl_cfg iwl7265_n_cfg; | ||
| 297 | #endif /* CONFIG_IWLMVM */ | 302 | #endif /* CONFIG_IWLMVM */ |
| 298 | 303 | ||
| 299 | #endif /* __IWL_CONFIG_H__ */ | 304 | #endif /* __IWL_CONFIG_H__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index 54a4fdc631b7..da4eca8b3007 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
| @@ -495,14 +495,11 @@ enum secure_load_status_reg { | |||
| 495 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | 495 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit |
| 496 | * | 496 | * |
| 497 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | 497 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs |
| 498 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
| 499 | */ | 498 | */ |
| 500 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | 499 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) |
| 501 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | 500 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) |
| 502 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | 501 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) |
| 503 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | 502 | #define IWL_HOST_INT_OPER_MODE BIT(31) |
| 504 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
| 505 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
| 506 | 503 | ||
| 507 | /***************************************************************************** | 504 | /***************************************************************************** |
| 508 | * 7000/3000 series SHR DTS addresses * | 505 | * 7000/3000 series SHR DTS addresses * |
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c index 5d066cbc5ac7..75b72a956552 100644 --- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c | |||
| @@ -391,7 +391,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm) | |||
| 391 | BT_VALID_LUT | | 391 | BT_VALID_LUT | |
| 392 | BT_VALID_WIFI_RX_SW_PRIO_BOOST | | 392 | BT_VALID_WIFI_RX_SW_PRIO_BOOST | |
| 393 | BT_VALID_WIFI_TX_SW_PRIO_BOOST | | 393 | BT_VALID_WIFI_TX_SW_PRIO_BOOST | |
| 394 | BT_VALID_MULTI_PRIO_LUT | | ||
| 395 | BT_VALID_CORUN_LUT_20 | | 394 | BT_VALID_CORUN_LUT_20 | |
| 396 | BT_VALID_CORUN_LUT_40 | | 395 | BT_VALID_CORUN_LUT_40 | |
| 397 | BT_VALID_ANT_ISOLATION | | 396 | BT_VALID_ANT_ISOLATION | |
| @@ -842,6 +841,11 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac, | |||
| 842 | 841 | ||
| 843 | sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], | 842 | sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], |
| 844 | lockdep_is_held(&mvm->mutex)); | 843 | lockdep_is_held(&mvm->mutex)); |
| 844 | |||
| 845 | /* This can happen if the station has been removed right now */ | ||
| 846 | if (IS_ERR_OR_NULL(sta)) | ||
| 847 | return; | ||
| 848 | |||
| 845 | mvmsta = (void *)sta->drv_priv; | 849 | mvmsta = (void *)sta->drv_priv; |
| 846 | 850 | ||
| 847 | data->num_bss_ifaces++; | 851 | data->num_bss_ifaces++; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 6f45966817bb..b9b81e881dd0 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
| @@ -895,7 +895,7 @@ static int iwl_mvm_get_last_nonqos_seq(struct iwl_mvm *mvm, | |||
| 895 | /* new API returns next, not last-used seqno */ | 895 | /* new API returns next, not last-used seqno */ |
| 896 | if (mvm->fw->ucode_capa.flags & | 896 | if (mvm->fw->ucode_capa.flags & |
| 897 | IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API) | 897 | IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API) |
| 898 | err -= 0x10; | 898 | err = (u16) (err - 0x10); |
| 899 | } | 899 | } |
| 900 | 900 | ||
| 901 | iwl_free_resp(&cmd); | 901 | iwl_free_resp(&cmd); |
| @@ -1549,7 +1549,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, | |||
| 1549 | if (gtkdata.unhandled_cipher) | 1549 | if (gtkdata.unhandled_cipher) |
| 1550 | return false; | 1550 | return false; |
| 1551 | if (!gtkdata.num_keys) | 1551 | if (!gtkdata.num_keys) |
| 1552 | return true; | 1552 | goto out; |
| 1553 | if (!gtkdata.last_gtk) | 1553 | if (!gtkdata.last_gtk) |
| 1554 | return false; | 1554 | return false; |
| 1555 | 1555 | ||
| @@ -1600,6 +1600,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, | |||
| 1600 | (void *)&replay_ctr, GFP_KERNEL); | 1600 | (void *)&replay_ctr, GFP_KERNEL); |
| 1601 | } | 1601 | } |
| 1602 | 1602 | ||
| 1603 | out: | ||
| 1603 | mvmvif->seqno_valid = true; | 1604 | mvmvif->seqno_valid = true; |
| 1604 | /* +0x10 because the set API expects next-to-use, not last-used */ | 1605 | /* +0x10 because the set API expects next-to-use, not last-used */ |
| 1605 | mvmvif->seqno = le16_to_cpu(status->non_qos_seq_ctr) + 0x10; | 1606 | mvmvif->seqno = le16_to_cpu(status->non_qos_seq_ctr) + 0x10; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index 9864d713eb2c..a8fe6b41f9a3 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c | |||
| @@ -119,6 +119,10 @@ static ssize_t iwl_dbgfs_sta_drain_write(struct file *file, | |||
| 119 | 119 | ||
| 120 | if (sscanf(buf, "%d %d", &sta_id, &drain) != 2) | 120 | if (sscanf(buf, "%d %d", &sta_id, &drain) != 2) |
| 121 | return -EINVAL; | 121 | return -EINVAL; |
| 122 | if (sta_id < 0 || sta_id >= IWL_MVM_STATION_COUNT) | ||
| 123 | return -EINVAL; | ||
| 124 | if (drain < 0 || drain > 1) | ||
| 125 | return -EINVAL; | ||
| 122 | 126 | ||
| 123 | mutex_lock(&mvm->mutex); | 127 | mutex_lock(&mvm->mutex); |
| 124 | 128 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c index 33cf56fdfc41..95ce4b601fef 100644 --- a/drivers/net/wireless/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c | |||
| @@ -176,8 +176,11 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm, | |||
| 176 | * P2P Device discoveribility, while there are other higher priority | 176 | * P2P Device discoveribility, while there are other higher priority |
| 177 | * events in the system). | 177 | * events in the system). |
| 178 | */ | 178 | */ |
| 179 | if (WARN_ONCE(!le32_to_cpu(notif->status), | 179 | if (!le32_to_cpu(notif->status)) { |
| 180 | "Failed to schedule time event\n")) { | 180 | bool start = le32_to_cpu(notif->action) & |
| 181 | TE_V2_NOTIF_HOST_EVENT_START; | ||
| 182 | IWL_WARN(mvm, "Time Event %s notification failure\n", | ||
| 183 | start ? "start" : "end"); | ||
| 181 | if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, NULL)) { | 184 | if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, NULL)) { |
| 182 | iwl_mvm_te_clear_data(mvm, te_data); | 185 | iwl_mvm_te_clear_data(mvm, te_data); |
| 183 | return; | 186 | return; |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 941c0c88f982..86605027c41d 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
| @@ -353,6 +353,27 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
| 353 | 353 | ||
| 354 | /* 7265 Series */ | 354 | /* 7265 Series */ |
| 355 | {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)}, | 355 | {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)}, |
| 356 | {IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)}, | ||
| 357 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, | ||
| 358 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, | ||
| 359 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, | ||
| 360 | {IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)}, | ||
| 361 | {IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)}, | ||
| 362 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, | ||
| 363 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, | ||
| 364 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, | ||
| 365 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, | ||
| 366 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, | ||
| 367 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, | ||
| 368 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, | ||
| 369 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, | ||
| 370 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, | ||
| 371 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, | ||
| 372 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, | ||
| 373 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, | ||
| 374 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, | ||
| 375 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, | ||
| 376 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, | ||
| 356 | #endif /* CONFIG_IWLMVM */ | 377 | #endif /* CONFIG_IWLMVM */ |
| 357 | 378 | ||
| 358 | {0} | 379 | {0} |
diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h index fa22639b63c9..051268c037b1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/iwlwifi/pcie/internal.h | |||
| @@ -477,4 +477,12 @@ static inline bool iwl_is_rfkill_set(struct iwl_trans *trans) | |||
| 477 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); | 477 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | static inline void iwl_nic_error(struct iwl_trans *trans) | ||
| 481 | { | ||
| 482 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | ||
| 483 | |||
| 484 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); | ||
| 485 | iwl_op_mode_nic_error(trans->op_mode); | ||
| 486 | } | ||
| 487 | |||
| 480 | #endif /* __iwl_trans_int_pcie_h__ */ | 488 | #endif /* __iwl_trans_int_pcie_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 3f237b42eb36..be3995afa9d0 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
| @@ -489,6 +489,10 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq) | |||
| 489 | 489 | ||
| 490 | /* Set interrupt coalescing timer to default (2048 usecs) */ | 490 | /* Set interrupt coalescing timer to default (2048 usecs) */ |
| 491 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF); | 491 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF); |
| 492 | |||
| 493 | /* W/A for interrupt coalescing bug in 7260 and 3160 */ | ||
| 494 | if (trans->cfg->host_interrupt_operation_mode) | ||
| 495 | iwl_set_bit(trans, CSR_INT_COALESCING, IWL_HOST_INT_OPER_MODE); | ||
| 492 | } | 496 | } |
| 493 | 497 | ||
| 494 | static void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq) | 498 | static void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq) |
| @@ -796,12 +800,13 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans) | |||
| 796 | iwl_pcie_dump_csr(trans); | 800 | iwl_pcie_dump_csr(trans); |
| 797 | iwl_dump_fh(trans, NULL); | 801 | iwl_dump_fh(trans, NULL); |
| 798 | 802 | ||
| 803 | /* set the ERROR bit before we wake up the caller */ | ||
| 799 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); | 804 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); |
| 800 | clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status); | 805 | clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status); |
| 801 | wake_up(&trans_pcie->wait_command_queue); | 806 | wake_up(&trans_pcie->wait_command_queue); |
| 802 | 807 | ||
| 803 | local_bh_disable(); | 808 | local_bh_disable(); |
| 804 | iwl_op_mode_nic_error(trans->op_mode); | 809 | iwl_nic_error(trans); |
| 805 | local_bh_enable(); | 810 | local_bh_enable(); |
| 806 | } | 811 | } |
| 807 | 812 | ||
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5d9337bec67a..cde9c16f6e4f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
| @@ -279,9 +279,6 @@ static int iwl_pcie_nic_init(struct iwl_trans *trans) | |||
| 279 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); | 279 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); |
| 280 | iwl_pcie_apm_init(trans); | 280 | iwl_pcie_apm_init(trans); |
| 281 | 281 | ||
| 282 | /* Set interrupt coalescing calibration timer to default (512 usecs) */ | ||
| 283 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF); | ||
| 284 | |||
| 285 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); | 282 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); |
| 286 | 283 | ||
| 287 | iwl_pcie_set_pwr(trans, false); | 284 | iwl_pcie_set_pwr(trans, false); |
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index 059c5acad3a0..0adde919a258 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c | |||
| @@ -207,7 +207,7 @@ static void iwl_pcie_txq_stuck_timer(unsigned long data) | |||
| 207 | IWL_ERR(trans, "scratch %d = 0x%08x\n", i, | 207 | IWL_ERR(trans, "scratch %d = 0x%08x\n", i, |
| 208 | le32_to_cpu(txq->scratchbufs[i].scratch)); | 208 | le32_to_cpu(txq->scratchbufs[i].scratch)); |
| 209 | 209 | ||
| 210 | iwl_op_mode_nic_error(trans->op_mode); | 210 | iwl_nic_error(trans); |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | /* | 213 | /* |
| @@ -1023,7 +1023,7 @@ static void iwl_pcie_cmdq_reclaim(struct iwl_trans *trans, int txq_id, int idx) | |||
| 1023 | if (nfreed++ > 0) { | 1023 | if (nfreed++ > 0) { |
| 1024 | IWL_ERR(trans, "HCMD skipped: index (%d) %d %d\n", | 1024 | IWL_ERR(trans, "HCMD skipped: index (%d) %d %d\n", |
| 1025 | idx, q->write_ptr, q->read_ptr); | 1025 | idx, q->write_ptr, q->read_ptr); |
| 1026 | iwl_op_mode_nic_error(trans->op_mode); | 1026 | iwl_nic_error(trans); |
| 1027 | } | 1027 | } |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| @@ -1562,7 +1562,7 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, | |||
| 1562 | get_cmd_string(trans_pcie, cmd->id)); | 1562 | get_cmd_string(trans_pcie, cmd->id)); |
| 1563 | ret = -ETIMEDOUT; | 1563 | ret = -ETIMEDOUT; |
| 1564 | 1564 | ||
| 1565 | iwl_op_mode_nic_error(trans->op_mode); | 1565 | iwl_nic_error(trans); |
| 1566 | 1566 | ||
| 1567 | goto cancel; | 1567 | goto cancel; |
| 1568 | } | 1568 | } |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 9df7bc91a26f..c72438bb2faf 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
| @@ -383,6 +383,14 @@ struct hwsim_radiotap_hdr { | |||
| 383 | __le16 rt_chbitmask; | 383 | __le16 rt_chbitmask; |
| 384 | } __packed; | 384 | } __packed; |
| 385 | 385 | ||
| 386 | struct hwsim_radiotap_ack_hdr { | ||
| 387 | struct ieee80211_radiotap_header hdr; | ||
| 388 | u8 rt_flags; | ||
| 389 | u8 pad; | ||
| 390 | __le16 rt_channel; | ||
| 391 | __le16 rt_chbitmask; | ||
| 392 | } __packed; | ||
| 393 | |||
| 386 | /* MAC80211_HWSIM netlinf family */ | 394 | /* MAC80211_HWSIM netlinf family */ |
| 387 | static struct genl_family hwsim_genl_family = { | 395 | static struct genl_family hwsim_genl_family = { |
| 388 | .id = GENL_ID_GENERATE, | 396 | .id = GENL_ID_GENERATE, |
| @@ -500,7 +508,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
| 500 | const u8 *addr) | 508 | const u8 *addr) |
| 501 | { | 509 | { |
| 502 | struct sk_buff *skb; | 510 | struct sk_buff *skb; |
| 503 | struct hwsim_radiotap_hdr *hdr; | 511 | struct hwsim_radiotap_ack_hdr *hdr; |
| 504 | u16 flags; | 512 | u16 flags; |
| 505 | struct ieee80211_hdr *hdr11; | 513 | struct ieee80211_hdr *hdr11; |
| 506 | 514 | ||
| @@ -511,14 +519,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
| 511 | if (skb == NULL) | 519 | if (skb == NULL) |
| 512 | return; | 520 | return; |
| 513 | 521 | ||
| 514 | hdr = (struct hwsim_radiotap_hdr *) skb_put(skb, sizeof(*hdr)); | 522 | hdr = (struct hwsim_radiotap_ack_hdr *) skb_put(skb, sizeof(*hdr)); |
| 515 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 523 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
| 516 | hdr->hdr.it_pad = 0; | 524 | hdr->hdr.it_pad = 0; |
| 517 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); | 525 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); |
| 518 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | | 526 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | |
| 519 | (1 << IEEE80211_RADIOTAP_CHANNEL)); | 527 | (1 << IEEE80211_RADIOTAP_CHANNEL)); |
| 520 | hdr->rt_flags = 0; | 528 | hdr->rt_flags = 0; |
| 521 | hdr->rt_rate = 0; | 529 | hdr->pad = 0; |
| 522 | hdr->rt_channel = cpu_to_le16(chan->center_freq); | 530 | hdr->rt_channel = cpu_to_le16(chan->center_freq); |
| 523 | flags = IEEE80211_CHAN_2GHZ; | 531 | flags = IEEE80211_CHAN_2GHZ; |
| 524 | hdr->rt_chbitmask = cpu_to_le16(flags); | 532 | hdr->rt_chbitmask = cpu_to_le16(flags); |
| @@ -1230,7 +1238,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1230 | HRTIMER_MODE_REL); | 1238 | HRTIMER_MODE_REL); |
| 1231 | } else if (!info->enable_beacon) { | 1239 | } else if (!info->enable_beacon) { |
| 1232 | unsigned int count = 0; | 1240 | unsigned int count = 0; |
| 1233 | ieee80211_iterate_active_interfaces( | 1241 | ieee80211_iterate_active_interfaces_atomic( |
| 1234 | data->hw, IEEE80211_IFACE_ITER_NORMAL, | 1242 | data->hw, IEEE80211_IFACE_ITER_NORMAL, |
| 1235 | mac80211_hwsim_bcn_en_iter, &count); | 1243 | mac80211_hwsim_bcn_en_iter, &count); |
| 1236 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", | 1244 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index c8e029df770e..a09398fe9e2a 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
| @@ -319,8 +319,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
| 319 | if (bss_desc && bss_desc->ssid.ssid_len && | 319 | if (bss_desc && bss_desc->ssid.ssid_len && |
| 320 | (!mwifiex_ssid_cmp(&priv->curr_bss_params.bss_descriptor. | 320 | (!mwifiex_ssid_cmp(&priv->curr_bss_params.bss_descriptor. |
| 321 | ssid, &bss_desc->ssid))) { | 321 | ssid, &bss_desc->ssid))) { |
| 322 | kfree(bss_desc); | 322 | ret = 0; |
| 323 | return 0; | 323 | goto done; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | /* Exit Adhoc mode first */ | 326 | /* Exit Adhoc mode first */ |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 0f494444bcd1..5a53195d016b 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
| @@ -740,6 +740,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
| 740 | }; | 740 | }; |
| 741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; | 741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; |
| 742 | 742 | ||
| 743 | if (rtlpci->driver_is_goingto_unload) | ||
| 744 | return; | ||
| 743 | /*RX NORMAL PKT */ | 745 | /*RX NORMAL PKT */ |
| 744 | while (count--) { | 746 | while (count--) { |
| 745 | /*rx descriptor */ | 747 | /*rx descriptor */ |
| @@ -1636,6 +1638,7 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
| 1636 | */ | 1638 | */ |
| 1637 | set_hal_stop(rtlhal); | 1639 | set_hal_stop(rtlhal); |
| 1638 | 1640 | ||
| 1641 | rtlpci->driver_is_goingto_unload = true; | ||
| 1639 | rtlpriv->cfg->ops->disable_interrupt(hw); | 1642 | rtlpriv->cfg->ops->disable_interrupt(hw); |
| 1640 | cancel_work_sync(&rtlpriv->works.lps_change_work); | 1643 | cancel_work_sync(&rtlpriv->works.lps_change_work); |
| 1641 | 1644 | ||
| @@ -1653,7 +1656,6 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
| 1653 | ppsc->rfchange_inprogress = true; | 1656 | ppsc->rfchange_inprogress = true; |
| 1654 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); | 1657 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); |
| 1655 | 1658 | ||
| 1656 | rtlpci->driver_is_goingto_unload = true; | ||
| 1657 | rtlpriv->cfg->ops->hw_disable(hw); | 1659 | rtlpriv->cfg->ops->hw_disable(hw); |
| 1658 | /* some things are not needed if firmware not available */ | 1660 | /* some things are not needed if firmware not available */ |
| 1659 | if (!rtlpriv->max_fw_size) | 1661 | if (!rtlpriv->max_fw_size) |
