diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 5798fe49c771..17a4dd2be1f2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -75,7 +75,7 @@ int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
75 | return IWL_AP_ID; | 75 | return IWL_AP_ID; |
76 | } else { | 76 | } else { |
77 | u8 *da = ieee80211_get_DA(hdr); | 77 | u8 *da = ieee80211_get_DA(hdr); |
78 | return iwl_find_station(priv, da); | 78 | return priv->cfg->ops->smgmt->find_station(priv, da); |
79 | } | 79 | } |
80 | } | 80 | } |
81 | EXPORT_SYMBOL(iwl_get_ra_sta_id); | 81 | EXPORT_SYMBOL(iwl_get_ra_sta_id); |
@@ -300,7 +300,7 @@ EXPORT_SYMBOL(iwl_add_station_flags); | |||
300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) | 300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) |
301 | { | 301 | { |
302 | unsigned long flags; | 302 | unsigned long flags; |
303 | u8 sta_id = iwl_find_station(priv, addr); | 303 | u8 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr); |
304 | 304 | ||
305 | BUG_ON(sta_id == IWL_INVALID_STATION); | 305 | BUG_ON(sta_id == IWL_INVALID_STATION); |
306 | 306 | ||
@@ -758,7 +758,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv, | |||
758 | int i; | 758 | int i; |
759 | DECLARE_MAC_BUF(mac); | 759 | DECLARE_MAC_BUF(mac); |
760 | 760 | ||
761 | sta_id = iwl_find_station(priv, addr); | 761 | sta_id = priv->cfg->ops->smgmt->find_station(priv, addr); |
762 | if (sta_id == IWL_INVALID_STATION) { | 762 | if (sta_id == IWL_INVALID_STATION) { |
763 | IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", | 763 | IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", |
764 | addr); | 764 | addr); |
@@ -1019,7 +1019,7 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap) | |||
1019 | rcu_read_unlock(); | 1019 | rcu_read_unlock(); |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | sta_id = iwl_add_station_flags(priv, addr, is_ap, | 1022 | sta_id = priv->cfg->ops->smgmt->add_station(priv, addr, is_ap, |
1023 | 0, cur_ht_config); | 1023 | 0, cur_ht_config); |
1024 | 1024 | ||
1025 | /* Set up default rate scaling table in device's station table */ | 1025 | /* Set up default rate scaling table in device's station table */ |
@@ -1053,7 +1053,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
1053 | 1053 | ||
1054 | /* If we are an AP, then find the station, or use BCAST */ | 1054 | /* If we are an AP, then find the station, or use BCAST */ |
1055 | case NL80211_IFTYPE_AP: | 1055 | case NL80211_IFTYPE_AP: |
1056 | sta_id = iwl_find_station(priv, hdr->addr1); | 1056 | sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1); |
1057 | if (sta_id != IWL_INVALID_STATION) | 1057 | if (sta_id != IWL_INVALID_STATION) |
1058 | return sta_id; | 1058 | return sta_id; |
1059 | return priv->hw_params.bcast_sta_id; | 1059 | return priv->hw_params.bcast_sta_id; |
@@ -1061,12 +1061,12 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
1061 | /* If this frame is going out to an IBSS network, find the station, | 1061 | /* If this frame is going out to an IBSS network, find the station, |
1062 | * or create a new station table entry */ | 1062 | * or create a new station table entry */ |
1063 | case NL80211_IFTYPE_ADHOC: | 1063 | case NL80211_IFTYPE_ADHOC: |
1064 | sta_id = iwl_find_station(priv, hdr->addr1); | 1064 | sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1); |
1065 | if (sta_id != IWL_INVALID_STATION) | 1065 | if (sta_id != IWL_INVALID_STATION) |
1066 | return sta_id; | 1066 | return sta_id; |
1067 | 1067 | ||
1068 | /* Create new station table entry */ | 1068 | /* Create new station table entry */ |
1069 | sta_id = iwl_add_station_flags(priv, hdr->addr1, | 1069 | sta_id = priv->cfg->ops->smgmt->add_station(priv, hdr->addr1, |
1070 | 0, CMD_ASYNC, NULL); | 1070 | 0, CMD_ASYNC, NULL); |
1071 | 1071 | ||
1072 | if (sta_id != IWL_INVALID_STATION) | 1072 | if (sta_id != IWL_INVALID_STATION) |
@@ -1078,11 +1078,6 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
1078 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); | 1078 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); |
1079 | return priv->hw_params.bcast_sta_id; | 1079 | return priv->hw_params.bcast_sta_id; |
1080 | 1080 | ||
1081 | /* If we are in monitor mode, use BCAST. This is required for | ||
1082 | * packet injection. */ | ||
1083 | case NL80211_IFTYPE_MONITOR: | ||
1084 | return priv->hw_params.bcast_sta_id; | ||
1085 | |||
1086 | default: | 1081 | default: |
1087 | IWL_WARN(priv, "Unknown mode of operation: %d\n", | 1082 | IWL_WARN(priv, "Unknown mode of operation: %d\n", |
1088 | priv->iw_mode); | 1083 | priv->iw_mode); |
@@ -1115,7 +1110,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, | |||
1115 | unsigned long flags; | 1110 | unsigned long flags; |
1116 | int sta_id; | 1111 | int sta_id; |
1117 | 1112 | ||
1118 | sta_id = iwl_find_station(priv, addr); | 1113 | sta_id = priv->cfg->ops->smgmt->find_station(priv, addr); |
1119 | if (sta_id == IWL_INVALID_STATION) | 1114 | if (sta_id == IWL_INVALID_STATION) |
1120 | return -ENXIO; | 1115 | return -ENXIO; |
1121 | 1116 | ||
@@ -1137,7 +1132,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid) | |||
1137 | unsigned long flags; | 1132 | unsigned long flags; |
1138 | int sta_id; | 1133 | int sta_id; |
1139 | 1134 | ||
1140 | sta_id = iwl_find_station(priv, addr); | 1135 | sta_id = priv->cfg->ops->smgmt->find_station(priv, addr); |
1141 | if (sta_id == IWL_INVALID_STATION) { | 1136 | if (sta_id == IWL_INVALID_STATION) { |
1142 | IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); | 1137 | IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); |
1143 | return -ENXIO; | 1138 | return -ENXIO; |
@@ -1172,7 +1167,7 @@ static void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id) | |||
1172 | void iwl_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr) | 1167 | void iwl_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr) |
1173 | { | 1168 | { |
1174 | /* FIXME: need locking over ps_status ??? */ | 1169 | /* FIXME: need locking over ps_status ??? */ |
1175 | u8 sta_id = iwl_find_station(priv, addr); | 1170 | u8 sta_id = priv->cfg->ops->smgmt->find_station(priv, addr); |
1176 | 1171 | ||
1177 | if (sta_id != IWL_INVALID_STATION) { | 1172 | if (sta_id != IWL_INVALID_STATION) { |
1178 | u8 sta_awake = priv->stations[sta_id]. | 1173 | u8 sta_awake = priv->stations[sta_id]. |