aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 75b896d47ea1..2f828ffd5698 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1660,8 +1660,8 @@ ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata,
1660 return RX_DROP_MONITOR; 1660 return RX_DROP_MONITOR;
1661} 1661}
1662 1662
1663static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, 1663void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1664 struct sk_buff *skb) 1664 struct sk_buff *skb)
1665{ 1665{
1666 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 1666 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1667 struct ieee80211_rx_status *rx_status; 1667 struct ieee80211_rx_status *rx_status;
@@ -1782,36 +1782,10 @@ static void ieee80211_sta_timer(unsigned long data)
1782 ieee80211_queue_work(&local->hw, &sdata->work); 1782 ieee80211_queue_work(&local->hw, &sdata->work);
1783} 1783}
1784 1784
1785static void ieee80211_sta_work(struct work_struct *work) 1785void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
1786{ 1786{
1787 struct ieee80211_sub_if_data *sdata =
1788 container_of(work, struct ieee80211_sub_if_data, work);
1789 struct ieee80211_local *local = sdata->local; 1787 struct ieee80211_local *local = sdata->local;
1790 struct ieee80211_if_managed *ifmgd; 1788 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1791 struct sk_buff *skb;
1792
1793 if (!ieee80211_sdata_running(sdata))
1794 return;
1795
1796 if (local->scanning)
1797 return;
1798
1799 if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION))
1800 return;
1801
1802 /*
1803 * ieee80211_queue_work() should have picked up most cases,
1804 * here we'll pick the rest.
1805 */
1806 if (WARN(local->suspended, "STA MLME work scheduled while "
1807 "going to suspend\n"))
1808 return;
1809
1810 ifmgd = &sdata->u.mgd;
1811
1812 /* first process frames to avoid timing out while a frame is pending */
1813 while ((skb = skb_dequeue(&sdata->skb_queue)))
1814 ieee80211_sta_rx_queued_mgmt(sdata, skb);
1815 1789
1816 /* then process the rest of the work */ 1790 /* then process the rest of the work */
1817 mutex_lock(&ifmgd->mtx); 1791 mutex_lock(&ifmgd->mtx);
@@ -1952,7 +1926,6 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
1952 struct ieee80211_if_managed *ifmgd; 1926 struct ieee80211_if_managed *ifmgd;
1953 1927
1954 ifmgd = &sdata->u.mgd; 1928 ifmgd = &sdata->u.mgd;
1955 INIT_WORK(&sdata->work, ieee80211_sta_work);
1956 INIT_WORK(&ifmgd->monitor_work, ieee80211_sta_monitor_work); 1929 INIT_WORK(&ifmgd->monitor_work, ieee80211_sta_monitor_work);
1957 INIT_WORK(&ifmgd->chswitch_work, ieee80211_chswitch_work); 1930 INIT_WORK(&ifmgd->chswitch_work, ieee80211_chswitch_work);
1958 INIT_WORK(&ifmgd->beacon_connection_loss_work, 1931 INIT_WORK(&ifmgd->beacon_connection_loss_work,