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.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7b3f9df725bd..cc984bd861cf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -145,6 +145,9 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
145{ 145{
146 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 146 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
147 147
148 if (unlikely(!sdata->u.mgd.associated))
149 return;
150
148 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) 151 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
149 return; 152 return;
150 153
@@ -738,9 +741,19 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
738 return; 741 return;
739 742
740 if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && 743 if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
741 (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) 744 (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) {
745 netif_tx_stop_all_queues(sdata->dev);
746 /*
747 * Flush all the frames queued in the driver before
748 * going to power save
749 */
750 drv_flush(local, false);
742 ieee80211_send_nullfunc(local, sdata, 1); 751 ieee80211_send_nullfunc(local, sdata, 1);
743 752
753 /* Flush once again to get the tx status of nullfunc frame */
754 drv_flush(local, false);
755 }
756
744 if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) && 757 if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
745 (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) || 758 (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) ||
746 (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { 759 (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
@@ -748,6 +761,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
748 local->hw.conf.flags |= IEEE80211_CONF_PS; 761 local->hw.conf.flags |= IEEE80211_CONF_PS;
749 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 762 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
750 } 763 }
764
765 netif_tx_start_all_queues(sdata->dev);
751} 766}
752 767
753void ieee80211_dynamic_ps_timer(unsigned long data) 768void ieee80211_dynamic_ps_timer(unsigned long data)
@@ -1071,12 +1086,6 @@ void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
1071 if (is_multicast_ether_addr(hdr->addr1)) 1086 if (is_multicast_ether_addr(hdr->addr1))
1072 return; 1087 return;
1073 1088
1074 /*
1075 * In case we receive frames after disassociation.
1076 */
1077 if (!sdata->u.mgd.associated)
1078 return;
1079
1080 ieee80211_sta_reset_conn_monitor(sdata); 1089 ieee80211_sta_reset_conn_monitor(sdata);
1081} 1090}
1082 1091