diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 6283a3a707f5..61797f3f8d5c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -47,8 +47,8 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) | |||
47 | unsigned long flags; | 47 | unsigned long flags; |
48 | DECLARE_MAC_BUF(mac); | 48 | DECLARE_MAC_BUF(mac); |
49 | 49 | ||
50 | if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || | 50 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || |
51 | (priv->iw_mode == IEEE80211_IF_TYPE_AP)) | 51 | (priv->iw_mode == NL80211_IFTYPE_AP)) |
52 | start = IWL_STA_ID; | 52 | start = IWL_STA_ID; |
53 | 53 | ||
54 | if (is_broadcast_ether_addr(addr)) | 54 | if (is_broadcast_ether_addr(addr)) |
@@ -74,7 +74,7 @@ EXPORT_SYMBOL(iwl_find_station); | |||
74 | 74 | ||
75 | int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | 75 | int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) |
76 | { | 76 | { |
77 | if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { | 77 | if (priv->iw_mode == NL80211_IFTYPE_STATION) { |
78 | return IWL_AP_ID; | 78 | return IWL_AP_ID; |
79 | } else { | 79 | } else { |
80 | u8 *da = ieee80211_get_DA(hdr); | 80 | u8 *da = ieee80211_get_DA(hdr); |
@@ -191,20 +191,20 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, | |||
191 | if (!sta_ht_inf || !sta_ht_inf->ht_supported) | 191 | if (!sta_ht_inf || !sta_ht_inf->ht_supported) |
192 | goto done; | 192 | goto done; |
193 | 193 | ||
194 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2; | 194 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; |
195 | 195 | ||
196 | sta_flags = priv->stations[index].sta.station_flags; | 196 | sta_flags = priv->stations[index].sta.station_flags; |
197 | 197 | ||
198 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); | 198 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); |
199 | 199 | ||
200 | switch (mimo_ps_mode) { | 200 | switch (mimo_ps_mode) { |
201 | case WLAN_HT_CAP_MIMO_PS_STATIC: | 201 | case WLAN_HT_CAP_SM_PS_STATIC: |
202 | sta_flags |= STA_FLG_MIMO_DIS_MSK; | 202 | sta_flags |= STA_FLG_MIMO_DIS_MSK; |
203 | break; | 203 | break; |
204 | case WLAN_HT_CAP_MIMO_PS_DYNAMIC: | 204 | case WLAN_HT_CAP_SM_PS_DYNAMIC: |
205 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; | 205 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; |
206 | break; | 206 | break; |
207 | case WLAN_HT_CAP_MIMO_PS_DISABLED: | 207 | case WLAN_HT_CAP_SM_PS_DISABLED: |
208 | break; | 208 | break; |
209 | default: | 209 | default: |
210 | IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); | 210 | IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); |
@@ -286,7 +286,7 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap, | |||
286 | 286 | ||
287 | /* BCAST station and IBSS stations do not work in HT mode */ | 287 | /* BCAST station and IBSS stations do not work in HT mode */ |
288 | if (sta_id != priv->hw_params.bcast_sta_id && | 288 | if (sta_id != priv->hw_params.bcast_sta_id && |
289 | priv->iw_mode != IEEE80211_IF_TYPE_IBSS) | 289 | priv->iw_mode != NL80211_IFTYPE_ADHOC) |
290 | iwl_set_ht_add_station(priv, sta_id, ht_info); | 290 | iwl_set_ht_add_station(priv, sta_id, ht_info); |
291 | 291 | ||
292 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); | 292 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); |
@@ -817,7 +817,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, | |||
817 | }; | 817 | }; |
818 | 818 | ||
819 | if ((lq->sta_id == 0xFF) && | 819 | if ((lq->sta_id == 0xFF) && |
820 | (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)) | 820 | (priv->iw_mode == NL80211_IFTYPE_ADHOC)) |
821 | return -EINVAL; | 821 | return -EINVAL; |
822 | 822 | ||
823 | if (lq->sta_id == 0xFF) | 823 | if (lq->sta_id == 0xFF) |
@@ -904,7 +904,7 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap) | |||
904 | 904 | ||
905 | if ((is_ap) && | 905 | if ((is_ap) && |
906 | (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && | 906 | (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && |
907 | (priv->iw_mode == IEEE80211_IF_TYPE_STA)) | 907 | (priv->iw_mode == NL80211_IFTYPE_STATION)) |
908 | sta_id = iwl_add_station_flags(priv, addr, is_ap, | 908 | sta_id = iwl_add_station_flags(priv, addr, is_ap, |
909 | 0, cur_ht_config); | 909 | 0, cur_ht_config); |
910 | else | 910 | else |
@@ -938,11 +938,11 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
938 | 938 | ||
939 | /* If we are a client station in a BSS network, use the special | 939 | /* If we are a client station in a BSS network, use the special |
940 | * AP station entry (that's the only station we communicate with) */ | 940 | * AP station entry (that's the only station we communicate with) */ |
941 | case IEEE80211_IF_TYPE_STA: | 941 | case NL80211_IFTYPE_STATION: |
942 | return IWL_AP_ID; | 942 | return IWL_AP_ID; |
943 | 943 | ||
944 | /* If we are an AP, then find the station, or use BCAST */ | 944 | /* If we are an AP, then find the station, or use BCAST */ |
945 | case IEEE80211_IF_TYPE_AP: | 945 | case NL80211_IFTYPE_AP: |
946 | sta_id = iwl_find_station(priv, hdr->addr1); | 946 | sta_id = iwl_find_station(priv, hdr->addr1); |
947 | if (sta_id != IWL_INVALID_STATION) | 947 | if (sta_id != IWL_INVALID_STATION) |
948 | return sta_id; | 948 | return sta_id; |
@@ -950,7 +950,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
950 | 950 | ||
951 | /* If this frame is going out to an IBSS network, find the station, | 951 | /* If this frame is going out to an IBSS network, find the station, |
952 | * or create a new station table entry */ | 952 | * or create a new station table entry */ |
953 | case IEEE80211_IF_TYPE_IBSS: | 953 | case NL80211_IFTYPE_ADHOC: |
954 | sta_id = iwl_find_station(priv, hdr->addr1); | 954 | sta_id = iwl_find_station(priv, hdr->addr1); |
955 | if (sta_id != IWL_INVALID_STATION) | 955 | if (sta_id != IWL_INVALID_STATION) |
956 | return sta_id; | 956 | return sta_id; |
@@ -968,6 +968,11 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
968 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); | 968 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); |
969 | return priv->hw_params.bcast_sta_id; | 969 | return priv->hw_params.bcast_sta_id; |
970 | 970 | ||
971 | /* If we are in monitor mode, use BCAST. This is required for | ||
972 | * packet injection. */ | ||
973 | case NL80211_IFTYPE_MONITOR: | ||
974 | return priv->hw_params.bcast_sta_id; | ||
975 | |||
971 | default: | 976 | default: |
972 | IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); | 977 | IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); |
973 | return priv->hw_params.bcast_sta_id; | 978 | return priv->hw_params.bcast_sta_id; |