diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 23 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 6 |
2 files changed, 24 insertions, 5 deletions
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/include/linux/ieee80211.h b/include/linux/ieee80211.h index 5de6d911cdf7..f577c8f1c66d 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -287,6 +287,12 @@ struct ieee80211_ht_addt_info { | |||
287 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 | 287 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 |
288 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 | 288 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 |
289 | 289 | ||
290 | /* MIMO Power Save Modes */ | ||
291 | #define WLAN_HT_CAP_MIMO_PS_STATIC 0 | ||
292 | #define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 | ||
293 | #define WLAN_HT_CAP_MIMO_PS_INVALID 2 | ||
294 | #define WLAN_HT_CAP_MIMO_PS_DISABLED 3 | ||
295 | |||
290 | /* Authentication algorithms */ | 296 | /* Authentication algorithms */ |
291 | #define WLAN_AUTH_OPEN 0 | 297 | #define WLAN_AUTH_OPEN 0 |
292 | #define WLAN_AUTH_SHARED_KEY 1 | 298 | #define WLAN_AUTH_SHARED_KEY 1 |