Search Linux Wireless

[PATCH 5/6] Schedule work proc when output bitrate changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Paul Stewart <pstew@xxxxxxxxxx>

---
 net/mac80211/status.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 3153c19..0148c50 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -154,6 +154,20 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
 		}
 
 		ieee80211_queue_work(&local->hw, &local->recalc_smps);
+	} else if (ieee80211_is_data(mgmt->frame_control) &&
+		   sdata->vif.type == NL80211_IFTYPE_STATION) {
+		struct ieee80211_bss_conf *bss_conf;
+		struct ieee80211_if_managed *ifmgd;
+		bss_conf = &sta->sdata->vif.bss_conf;
+		ifmgd = &sta->sdata->u.mgd;
+		if (bss_conf->cqm_bitrate_thold != 0 &&
+		    (memcmp(&ifmgd->last_cqm_tx_rate, &sta->last_tx_rate,
+			    sizeof(ifmgd->last_cqm_tx_rate)) != 0 ||
+		     sdata->u.mgd.last_cqm_bitrate == 0)) {
+			ifmgd->last_cqm_tx_rate = sta->last_tx_rate;
+			ifmgd->flags |= IEEE80211_STA_TX_RATE_CHANGED;
+			ieee80211_queue_work(&local->hw, &local->rate_notify);
+		}
 	}
 }
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux