summaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-11-17 10:24:36 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-12-04 14:43:32 +0100
commit0ead2510f8cec11ce96308d79a1b4ee272fb5238 (patch)
tree440e48a4356a939a982ac047ca2a9c9b55cde022 /include/net/mac80211.h
parent1b9df2d20eee9f3a675d1a3a7aa3640e6d8d7e94 (diff)
downloadop-kernel-dev-0ead2510f8cec11ce96308d79a1b4ee272fb5238.zip
op-kernel-dev-0ead2510f8cec11ce96308d79a1b4ee272fb5238.tar.gz
mac80211: allow the driver to send EOSP when needed
This can happen when the driver needs to send less frames than expected and then needs to close the SP. Mac80211 still needs to set the more_data properly based on its buffer state (ps_tx_buffer and buffered frames on other TIDs). To that end, refactor the code that delivers frames upon uAPSD trigger frames to be able to get only the more_data bit without actually delivering those frames in case the driver is just asking to set a NDP with EOSP and MORE_DATA bit properly set. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 8628118..18ac733 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4869,6 +4869,28 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
void ieee80211_sta_eosp(struct ieee80211_sta *pubsta);
/**
+ * ieee80211_send_eosp_nullfunc - ask mac80211 to send NDP with EOSP
+ * @pubsta: the station
+ * @tid: the tid of the NDP
+ *
+ * Sometimes the device understands that it needs to close
+ * the Service Period unexpectedly. This can happen when
+ * sending frames that are filling holes in the BA window.
+ * In this case, the device can ask mac80211 to send a
+ * Nullfunc frame with EOSP set. When that happens, the
+ * driver must have called ieee80211_sta_set_buffered() to
+ * let mac80211 know that there are no buffered frames any
+ * more, otherwise mac80211 will get the more_data bit wrong.
+ * The low level driver must have made sure that the frame
+ * will be sent despite the station being in power-save.
+ * Mac80211 won't call allow_buffered_frames().
+ * Note that calling this function, doesn't exempt the driver
+ * from closing the EOSP properly, it will still have to call
+ * ieee80211_sta_eosp when the NDP is sent.
+ */
+void ieee80211_send_eosp_nullfunc(struct ieee80211_sta *pubsta, int tid);
+
+/**
* ieee80211_iter_keys - iterate keys programmed into the device
* @hw: pointer obtained from ieee80211_alloc_hw()
* @vif: virtual interface to iterate, may be %NULL for all
OpenPOWER on IntegriCloud