]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: move ieee80211_sta_expire
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 10 Sep 2008 22:01:46 +0000 (00:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2008 20:48:20 +0000 (16:48 -0400)
ieee80211_sta_expire uses the internal __sta_info_unlink
function which can become static if this function is moved
to sta_info.c.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c
net/mac80211/sta_info.c
net/mac80211/sta_info.h

index 2c06f6965b7ddf987dc172f755f6a2b57ddcc022..ffc47c81a1613b072e2a069b9c846782773a1026 100644 (file)
@@ -1913,32 +1913,6 @@ static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
 }
 
 
-static void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata, unsigned long exp_time)
-{
-       struct ieee80211_local *local = sdata->local;
-       struct sta_info *sta, *tmp;
-       LIST_HEAD(tmp_list);
-       DECLARE_MAC_BUF(mac);
-       unsigned long flags;
-
-       spin_lock_irqsave(&local->sta_lock, flags);
-       list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
-               if (time_after(jiffies, sta->last_rx + exp_time)) {
-#ifdef CONFIG_MAC80211_IBSS_DEBUG
-                       printk(KERN_DEBUG "%s: expiring inactive STA %s\n",
-                              sdata->dev->name, print_mac(mac, sta->addr));
-#endif
-                       __sta_info_unlink(&sta);
-                       if (sta)
-                               list_add(&sta->list, &tmp_list);
-               }
-       spin_unlock_irqrestore(&local->sta_lock, flags);
-
-       list_for_each_entry_safe(sta, tmp, &tmp_list, list)
-               sta_info_destroy(sta);
-}
-
-
 static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata,
                                     struct ieee80211_if_sta *ifsta)
 {
index f2ba653b9d69525601293b930e838f878db8f05b..3370b262563378a76f5ca6a43d821e21301de0b4 100644 (file)
@@ -424,7 +424,7 @@ void sta_info_clear_tim_bit(struct sta_info *sta)
        spin_unlock_irqrestore(&sta->local->sta_lock, flags);
 }
 
-void __sta_info_unlink(struct sta_info **sta)
+static void __sta_info_unlink(struct sta_info **sta)
 {
        struct ieee80211_local *local = (*sta)->local;
        struct ieee80211_sub_if_data *sdata = (*sta)->sdata;
@@ -802,3 +802,29 @@ void sta_info_flush_delayed(struct ieee80211_sub_if_data *sdata)
                schedule_work(&local->sta_flush_work);
        spin_unlock_irqrestore(&local->sta_lock, flags);
 }
+
+void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
+                         unsigned long exp_time)
+{
+       struct ieee80211_local *local = sdata->local;
+       struct sta_info *sta, *tmp;
+       LIST_HEAD(tmp_list);
+       DECLARE_MAC_BUF(mac);
+       unsigned long flags;
+
+       spin_lock_irqsave(&local->sta_lock, flags);
+       list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
+               if (time_after(jiffies, sta->last_rx + exp_time)) {
+#ifdef CONFIG_MAC80211_IBSS_DEBUG
+                       printk(KERN_DEBUG "%s: expiring inactive STA %s\n",
+                              sdata->dev->name, print_mac(mac, sta->addr));
+#endif
+                       __sta_info_unlink(&sta);
+                       if (sta)
+                               list_add(&sta->list, &tmp_list);
+               }
+       spin_unlock_irqrestore(&local->sta_lock, flags);
+
+       list_for_each_entry_safe(sta, tmp, &tmp_list, list)
+               sta_info_destroy(sta);
+}
index 4a581a5b5766f4fd3d17c024d047aae93500c172..22007990099169be95a3cc3759010aa94bfc7ffc 100644 (file)
@@ -452,7 +452,6 @@ int sta_info_insert(struct sta_info *sta);
  * has already unlinked it.
  */
 void sta_info_unlink(struct sta_info **sta);
-void __sta_info_unlink(struct sta_info **sta);
 
 void sta_info_destroy(struct sta_info *sta);
 void sta_info_set_tim_bit(struct sta_info *sta);
@@ -464,5 +463,7 @@ void sta_info_stop(struct ieee80211_local *local);
 int sta_info_flush(struct ieee80211_local *local,
                    struct ieee80211_sub_if_data *sdata);
 void sta_info_flush_delayed(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
+                         unsigned long exp_time);
 
 #endif /* STA_INFO_H */