diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 61797f3f8d5c..e02c4717c93c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -45,7 +45,6 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) | |||
45 | int start = 0; | 45 | int start = 0; |
46 | int ret = IWL_INVALID_STATION; | 46 | int ret = IWL_INVALID_STATION; |
47 | unsigned long flags; | 47 | unsigned long flags; |
48 | DECLARE_MAC_BUF(mac); | ||
49 | 48 | ||
50 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || | 49 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || |
51 | (priv->iw_mode == NL80211_IFTYPE_AP)) | 50 | (priv->iw_mode == NL80211_IFTYPE_AP)) |
@@ -63,8 +62,8 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) | |||
63 | goto out; | 62 | goto out; |
64 | } | 63 | } |
65 | 64 | ||
66 | IWL_DEBUG_ASSOC_LIMIT("can not find STA %s total %d\n", | 65 | IWL_DEBUG_ASSOC_LIMIT("can not find STA %pM total %d\n", |
67 | print_mac(mac, addr), priv->num_stations); | 66 | addr, priv->num_stations); |
68 | 67 | ||
69 | out: | 68 | out: |
70 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 69 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
@@ -86,7 +85,6 @@ EXPORT_SYMBOL(iwl_get_ra_sta_id); | |||
86 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | 85 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) |
87 | { | 86 | { |
88 | unsigned long flags; | 87 | unsigned long flags; |
89 | DECLARE_MAC_BUF(mac); | ||
90 | 88 | ||
91 | spin_lock_irqsave(&priv->sta_lock, flags); | 89 | spin_lock_irqsave(&priv->sta_lock, flags); |
92 | 90 | ||
@@ -94,8 +92,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | |||
94 | IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id); | 92 | IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id); |
95 | 93 | ||
96 | priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; | 94 | priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; |
97 | IWL_DEBUG_ASSOC("Added STA to Ucode: %s\n", | 95 | IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", |
98 | print_mac(mac, priv->stations[sta_id].sta.sta.addr)); | 96 | priv->stations[sta_id].sta.sta.addr); |
99 | 97 | ||
100 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 98 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
101 | } | 99 | } |
@@ -237,7 +235,6 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap, | |||
237 | int sta_id = IWL_INVALID_STATION; | 235 | int sta_id = IWL_INVALID_STATION; |
238 | struct iwl_station_entry *station; | 236 | struct iwl_station_entry *station; |
239 | unsigned long flags_spin; | 237 | unsigned long flags_spin; |
240 | DECLARE_MAC_BUF(mac); | ||
241 | 238 | ||
242 | spin_lock_irqsave(&priv->sta_lock, flags_spin); | 239 | spin_lock_irqsave(&priv->sta_lock, flags_spin); |
243 | if (is_ap) | 240 | if (is_ap) |
@@ -273,8 +270,8 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap, | |||
273 | 270 | ||
274 | station = &priv->stations[sta_id]; | 271 | station = &priv->stations[sta_id]; |
275 | station->used = IWL_STA_DRIVER_ACTIVE; | 272 | station->used = IWL_STA_DRIVER_ACTIVE; |
276 | IWL_DEBUG_ASSOC("Add STA to driver ID %d: %s\n", | 273 | IWL_DEBUG_ASSOC("Add STA to driver ID %d: %pM\n", |
277 | sta_id, print_mac(mac, addr)); | 274 | sta_id, addr); |
278 | priv->num_stations++; | 275 | priv->num_stations++; |
279 | 276 | ||
280 | /* Set up the REPLY_ADD_STA command to send to device */ | 277 | /* Set up the REPLY_ADD_STA command to send to device */ |
@@ -301,14 +298,11 @@ EXPORT_SYMBOL(iwl_add_station_flags); | |||
301 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) | 298 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) |
302 | { | 299 | { |
303 | unsigned long flags; | 300 | unsigned long flags; |
304 | DECLARE_MAC_BUF(mac); | ||
305 | |||
306 | u8 sta_id = iwl_find_station(priv, addr); | 301 | u8 sta_id = iwl_find_station(priv, addr); |
307 | 302 | ||
308 | BUG_ON(sta_id == IWL_INVALID_STATION); | 303 | BUG_ON(sta_id == IWL_INVALID_STATION); |
309 | 304 | ||
310 | IWL_DEBUG_ASSOC("Removed STA from Ucode: %s\n", | 305 | IWL_DEBUG_ASSOC("Removed STA from Ucode: %pM\n", addr); |
311 | print_mac(mac, addr)); | ||
312 | 306 | ||
313 | spin_lock_irqsave(&priv->sta_lock, flags); | 307 | spin_lock_irqsave(&priv->sta_lock, flags); |
314 | 308 | ||
@@ -415,7 +409,6 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) | |||
415 | int sta_id = IWL_INVALID_STATION; | 409 | int sta_id = IWL_INVALID_STATION; |
416 | int i, ret = -EINVAL; | 410 | int i, ret = -EINVAL; |
417 | unsigned long flags; | 411 | unsigned long flags; |
418 | DECLARE_MAC_BUF(mac); | ||
419 | 412 | ||
420 | spin_lock_irqsave(&priv->sta_lock, flags); | 413 | spin_lock_irqsave(&priv->sta_lock, flags); |
421 | 414 | ||
@@ -435,18 +428,18 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) | |||
435 | if (unlikely(sta_id == IWL_INVALID_STATION)) | 428 | if (unlikely(sta_id == IWL_INVALID_STATION)) |
436 | goto out; | 429 | goto out; |
437 | 430 | ||
438 | IWL_DEBUG_ASSOC("Removing STA from driver:%d %s\n", | 431 | IWL_DEBUG_ASSOC("Removing STA from driver:%d %pM\n", |
439 | sta_id, print_mac(mac, addr)); | 432 | sta_id, addr); |
440 | 433 | ||
441 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { | 434 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { |
442 | IWL_ERROR("Removing %s but non DRIVER active\n", | 435 | IWL_ERROR("Removing %pM but non DRIVER active\n", |
443 | print_mac(mac, addr)); | 436 | addr); |
444 | goto out; | 437 | goto out; |
445 | } | 438 | } |
446 | 439 | ||
447 | if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { | 440 | if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { |
448 | IWL_ERROR("Removing %s but non UCODE active\n", | 441 | IWL_ERROR("Removing %pM but non UCODE active\n", |
449 | print_mac(mac, addr)); | 442 | addr); |
450 | goto out; | 443 | goto out; |
451 | } | 444 | } |
452 | 445 | ||
@@ -927,7 +920,6 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
927 | { | 920 | { |
928 | int sta_id; | 921 | int sta_id; |
929 | u16 fc = le16_to_cpu(hdr->frame_control); | 922 | u16 fc = le16_to_cpu(hdr->frame_control); |
930 | DECLARE_MAC_BUF(mac); | ||
931 | 923 | ||
932 | /* If this frame is broadcast or management, use broadcast station id */ | 924 | /* If this frame is broadcast or management, use broadcast station id */ |
933 | if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) || | 925 | if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) || |
@@ -962,9 +954,9 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
962 | if (sta_id != IWL_INVALID_STATION) | 954 | if (sta_id != IWL_INVALID_STATION) |
963 | return sta_id; | 955 | return sta_id; |
964 | 956 | ||
965 | IWL_DEBUG_DROP("Station %s not in station map. " | 957 | IWL_DEBUG_DROP("Station %pM not in station map. " |
966 | "Defaulting to broadcast...\n", | 958 | "Defaulting to broadcast...\n", |
967 | print_mac(mac, hdr->addr1)); | 959 | hdr->addr1); |
968 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); | 960 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); |
969 | return priv->hw_params.bcast_sta_id; | 961 | return priv->hw_params.bcast_sta_id; |
970 | 962 | ||