diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 654a8e963ccb..a98ea273a155 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <net/mac80211.h> | 20 | #include <net/mac80211.h> |
21 | #include "ieee80211_i.h" | 21 | #include "ieee80211_i.h" |
22 | #include "driver-ops.h" | ||
22 | #include "rate.h" | 23 | #include "rate.h" |
23 | #include "sta_info.h" | 24 | #include "sta_info.h" |
24 | #include "debugfs_sta.h" | 25 | #include "debugfs_sta.h" |
@@ -346,8 +347,7 @@ int sta_info_insert(struct sta_info *sta) | |||
346 | struct ieee80211_sub_if_data, | 347 | struct ieee80211_sub_if_data, |
347 | u.ap); | 348 | u.ap); |
348 | 349 | ||
349 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 350 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_ADD, &sta->sta); |
350 | STA_NOTIFY_ADD, &sta->sta); | ||
351 | } | 351 | } |
352 | 352 | ||
353 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 353 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
@@ -405,8 +405,7 @@ static void __sta_info_set_tim_bit(struct ieee80211_if_ap *bss, | |||
405 | 405 | ||
406 | if (sta->local->ops->set_tim) { | 406 | if (sta->local->ops->set_tim) { |
407 | sta->local->tim_in_locked_section = true; | 407 | sta->local->tim_in_locked_section = true; |
408 | sta->local->ops->set_tim(local_to_hw(sta->local), | 408 | drv_set_tim(sta->local, &sta->sta, true); |
409 | &sta->sta, true); | ||
410 | sta->local->tim_in_locked_section = false; | 409 | sta->local->tim_in_locked_section = false; |
411 | } | 410 | } |
412 | } | 411 | } |
@@ -431,8 +430,7 @@ static void __sta_info_clear_tim_bit(struct ieee80211_if_ap *bss, | |||
431 | 430 | ||
432 | if (sta->local->ops->set_tim) { | 431 | if (sta->local->ops->set_tim) { |
433 | sta->local->tim_in_locked_section = true; | 432 | sta->local->tim_in_locked_section = true; |
434 | sta->local->ops->set_tim(local_to_hw(sta->local), | 433 | drv_set_tim(sta->local, &sta->sta, false); |
435 | &sta->sta, false); | ||
436 | sta->local->tim_in_locked_section = false; | 434 | sta->local->tim_in_locked_section = false; |
437 | } | 435 | } |
438 | } | 436 | } |
@@ -482,8 +480,8 @@ static void __sta_info_unlink(struct sta_info **sta) | |||
482 | struct ieee80211_sub_if_data, | 480 | struct ieee80211_sub_if_data, |
483 | u.ap); | 481 | u.ap); |
484 | 482 | ||
485 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 483 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_REMOVE, |
486 | STA_NOTIFY_REMOVE, &(*sta)->sta); | 484 | &(*sta)->sta); |
487 | } | 485 | } |
488 | 486 | ||
489 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 487 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
@@ -543,9 +541,8 @@ void sta_info_unlink(struct sta_info **sta) | |||
543 | spin_unlock_irqrestore(&local->sta_lock, flags); | 541 | spin_unlock_irqrestore(&local->sta_lock, flags); |
544 | } | 542 | } |
545 | 543 | ||
546 | static inline int sta_info_buffer_expired(struct ieee80211_local *local, | 544 | static int sta_info_buffer_expired(struct sta_info *sta, |
547 | struct sta_info *sta, | 545 | struct sk_buff *skb) |
548 | struct sk_buff *skb) | ||
549 | { | 546 | { |
550 | struct ieee80211_tx_info *info; | 547 | struct ieee80211_tx_info *info; |
551 | int timeout; | 548 | int timeout; |
@@ -556,8 +553,9 @@ static inline int sta_info_buffer_expired(struct ieee80211_local *local, | |||
556 | info = IEEE80211_SKB_CB(skb); | 553 | info = IEEE80211_SKB_CB(skb); |
557 | 554 | ||
558 | /* Timeout: (2 * listen_interval * beacon_int * 1024 / 1000000) sec */ | 555 | /* Timeout: (2 * listen_interval * beacon_int * 1024 / 1000000) sec */ |
559 | timeout = (sta->listen_interval * local->hw.conf.beacon_int * 32 / | 556 | timeout = (sta->listen_interval * |
560 | 15625) * HZ; | 557 | sta->sdata->vif.bss_conf.beacon_int * |
558 | 32 / 15625) * HZ; | ||
561 | if (timeout < STA_TX_BUFFER_EXPIRE) | 559 | if (timeout < STA_TX_BUFFER_EXPIRE) |
562 | timeout = STA_TX_BUFFER_EXPIRE; | 560 | timeout = STA_TX_BUFFER_EXPIRE; |
563 | return time_after(jiffies, info->control.jiffies + timeout); | 561 | return time_after(jiffies, info->control.jiffies + timeout); |
@@ -577,7 +575,7 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
577 | for (;;) { | 575 | for (;;) { |
578 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); | 576 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); |
579 | skb = skb_peek(&sta->ps_tx_buf); | 577 | skb = skb_peek(&sta->ps_tx_buf); |
580 | if (sta_info_buffer_expired(local, sta, skb)) | 578 | if (sta_info_buffer_expired(sta, skb)) |
581 | skb = __skb_dequeue(&sta->ps_tx_buf); | 579 | skb = __skb_dequeue(&sta->ps_tx_buf); |
582 | else | 580 | else |
583 | skb = NULL; | 581 | skb = NULL; |