aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index bfdaf5c82f9d..130aad2de108 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -424,36 +424,6 @@ void sta_info_clear_tim_bit(struct sta_info *sta)
424 spin_unlock_irqrestore(&sta->local->sta_lock, flags); 424 spin_unlock_irqrestore(&sta->local->sta_lock, flags);
425} 425}
426 426
427/*
428 * See comment in __sta_info_unlink,
429 * caller must hold local->sta_lock.
430 */
431static void __sta_info_pin(struct sta_info *sta)
432{
433 WARN_ON(sta->pin_status != STA_INFO_PIN_STAT_NORMAL);
434 sta->pin_status = STA_INFO_PIN_STAT_PINNED;
435}
436
437/*
438 * See comment in __sta_info_unlink, returns sta if it
439 * needs to be destroyed.
440 */
441static struct sta_info *__sta_info_unpin(struct sta_info *sta)
442{
443 struct sta_info *ret = NULL;
444 unsigned long flags;
445
446 spin_lock_irqsave(&sta->local->sta_lock, flags);
447 WARN_ON(sta->pin_status != STA_INFO_PIN_STAT_DESTROY &&
448 sta->pin_status != STA_INFO_PIN_STAT_PINNED);
449 if (sta->pin_status == STA_INFO_PIN_STAT_DESTROY)
450 ret = sta;
451 sta->pin_status = STA_INFO_PIN_STAT_NORMAL;
452 spin_unlock_irqrestore(&sta->local->sta_lock, flags);
453
454 return ret;
455}
456
457void __sta_info_unlink(struct sta_info **sta) 427void __sta_info_unlink(struct sta_info **sta)
458{ 428{
459 struct ieee80211_local *local = (*sta)->local; 429 struct ieee80211_local *local = (*sta)->local;
@@ -617,6 +587,36 @@ static void sta_info_cleanup(unsigned long data)
617} 587}
618 588
619#ifdef CONFIG_MAC80211_DEBUGFS 589#ifdef CONFIG_MAC80211_DEBUGFS
590/*
591 * See comment in __sta_info_unlink,
592 * caller must hold local->sta_lock.
593 */
594static void __sta_info_pin(struct sta_info *sta)
595{
596 WARN_ON(sta->pin_status != STA_INFO_PIN_STAT_NORMAL);
597 sta->pin_status = STA_INFO_PIN_STAT_PINNED;
598}
599
600/*
601 * See comment in __sta_info_unlink, returns sta if it
602 * needs to be destroyed.
603 */
604static struct sta_info *__sta_info_unpin(struct sta_info *sta)
605{
606 struct sta_info *ret = NULL;
607 unsigned long flags;
608
609 spin_lock_irqsave(&sta->local->sta_lock, flags);
610 WARN_ON(sta->pin_status != STA_INFO_PIN_STAT_DESTROY &&
611 sta->pin_status != STA_INFO_PIN_STAT_PINNED);
612 if (sta->pin_status == STA_INFO_PIN_STAT_DESTROY)
613 ret = sta;
614 sta->pin_status = STA_INFO_PIN_STAT_NORMAL;
615 spin_unlock_irqrestore(&sta->local->sta_lock, flags);
616
617 return ret;
618}
619
620static void sta_info_debugfs_add_work(struct work_struct *work) 620static void sta_info_debugfs_add_work(struct work_struct *work)
621{ 621{
622 struct ieee80211_local *local = 622 struct ieee80211_local *local =