aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c23
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c10
5 files changed, 32 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 4fdeb5323248..8d4d91d35fd2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -238,9 +238,10 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl3945_rx_mem_b
238 priv->last_statistics_time = jiffies; 238 priv->last_statistics_time = jiffies;
239} 239}
240 240
241void iwl3945_add_radiotap(struct iwl3945_priv *priv, struct sk_buff *skb, 241static void iwl3945_add_radiotap(struct iwl3945_priv *priv,
242 struct iwl3945_rx_frame_hdr *rx_hdr, 242 struct sk_buff *skb,
243 struct ieee80211_rx_status *stats) 243 struct iwl3945_rx_frame_hdr *rx_hdr,
244 struct ieee80211_rx_status *stats)
244{ 245{
245 /* First cache any information we need before we overwrite 246 /* First cache any information we need before we overwrite
246 * the information provided in the skb from the hardware */ 247 * the information provided in the skb from the hardware */
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 569347ff377b..d727de8b96fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4658,17 +4658,30 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4658 struct ieee80211_ht_info *sta_ht_inf) 4658 struct ieee80211_ht_info *sta_ht_inf)
4659{ 4659{
4660 __le32 sta_flags; 4660 __le32 sta_flags;
4661 u8 mimo_ps_mode;
4661 4662
4662 if (!sta_ht_inf || !sta_ht_inf->ht_supported) 4663 if (!sta_ht_inf || !sta_ht_inf->ht_supported)
4663 goto done; 4664 goto done;
4664 4665
4666 mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2;
4667
4665 sta_flags = priv->stations[index].sta.station_flags; 4668 sta_flags = priv->stations[index].sta.station_flags;
4666 4669
4667 if (((sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS >> 2)) 4670 sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK);
4668 == IWL_MIMO_PS_DYNAMIC) 4671
4672 switch (mimo_ps_mode) {
4673 case WLAN_HT_CAP_MIMO_PS_STATIC:
4674 sta_flags |= STA_FLG_MIMO_DIS_MSK;
4675 break;
4676 case WLAN_HT_CAP_MIMO_PS_DYNAMIC:
4669 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; 4677 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK;
4670 else 4678 break;
4671 sta_flags &= ~STA_FLG_RTS_MIMO_PROT_MSK; 4679 case WLAN_HT_CAP_MIMO_PS_DISABLED:
4680 break;
4681 default:
4682 IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode);
4683 break;
4684 }
4672 4685
4673 sta_flags |= cpu_to_le32( 4686 sta_flags |= cpu_to_le32(
4674 (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS); 4687 (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS);
@@ -4679,7 +4692,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4679 if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf)) 4692 if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf))
4680 sta_flags |= STA_FLG_FAT_EN_MSK; 4693 sta_flags |= STA_FLG_FAT_EN_MSK;
4681 else 4694 else
4682 sta_flags &= (~STA_FLG_FAT_EN_MSK); 4695 sta_flags &= ~STA_FLG_FAT_EN_MSK;
4683 4696
4684 priv->stations[index].sta.station_flags = sta_flags; 4697 priv->stations[index].sta.station_flags = sta_flags;
4685 done: 4698 done:
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index cb009f4c401f..8993cca81b40 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -147,9 +147,6 @@ static inline struct ieee80211_conf *ieee80211_get_hw_conf(
147 147
148#define QOS_CONTROL_LEN 2 148#define QOS_CONTROL_LEN 2
149 149
150#define IEEE80211_STYPE_BACK_REQ 0x0080
151#define IEEE80211_STYPE_BACK 0x0090
152
153 150
154static inline int ieee80211_is_management(u16 fc) 151static inline int ieee80211_is_management(u16 fc)
155{ 152{
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 33239f197984..f55c75712b55 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6330,6 +6330,11 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6330 return -ENODEV; 6330 return -ENODEV;
6331 } 6331 }
6332 6332
6333 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6334 IWL_ERROR("ucode not available for device bringup\n");
6335 return -EIO;
6336 }
6337
6333 /* If platform's RF_KILL switch is NOT set to KILL */ 6338 /* If platform's RF_KILL switch is NOT set to KILL */
6334 if (iwl3945_read32(priv, CSR_GP_CNTRL) & 6339 if (iwl3945_read32(priv, CSR_GP_CNTRL) &
6335 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6340 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
@@ -6342,11 +6347,6 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6342 } 6347 }
6343 } 6348 }
6344 6349
6345 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6346 IWL_ERROR("ucode not available for device bringup\n");
6347 return -EIO;
6348 }
6349
6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); 6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF);
6351 6351
6352 rc = iwl3945_hw_nic_init(priv); 6352 rc = iwl3945_hw_nic_init(priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index bf3a60c037aa..f423241b9567 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -6755,6 +6755,11 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6755 return -ENODEV; 6755 return -ENODEV;
6756 } 6756 }
6757 6757
6758 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6759 IWL_ERROR("ucode not available for device bringup\n");
6760 return -EIO;
6761 }
6762
6758 /* If platform's RF_KILL switch is NOT set to KILL */ 6763 /* If platform's RF_KILL switch is NOT set to KILL */
6759 if (iwl4965_read32(priv, CSR_GP_CNTRL) & 6764 if (iwl4965_read32(priv, CSR_GP_CNTRL) &
6760 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6765 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
@@ -6767,11 +6772,6 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6767 } 6772 }
6768 } 6773 }
6769 6774
6770 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6771 IWL_ERROR("ucode not available for device bringup\n");
6772 return -EIO;
6773 }
6774
6775 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF); 6775 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF);
6776 6776
6777 rc = iwl4965_hw_nic_init(priv); 6777 rc = iwl4965_hw_nic_init(priv);