aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h54
1 files changed, 53 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d6b0045788ce..0396cecd1d62 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1069,6 +1069,13 @@ enum ieee80211_tkip_key_type {
1069 * to decrypt group addressed frames, then IBSS RSN support is still 1069 * to decrypt group addressed frames, then IBSS RSN support is still
1070 * possible but software crypto will be used. Advertise the wiphy flag 1070 * possible but software crypto will be used. Advertise the wiphy flag
1071 * only in that case. 1071 * only in that case.
1072 *
1073 * @IEEE80211_HW_AP_LINK_PS: When operating in AP mode the device
1074 * autonomously manages the PS status of connected stations. When
1075 * this flag is set mac80211 will not trigger PS mode for connected
1076 * stations based on the PM bit of incoming frames.
1077 * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure
1078 * the PS mode of connected stations.
1072 */ 1079 */
1073enum ieee80211_hw_flags { 1080enum ieee80211_hw_flags {
1074 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, 1081 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -1093,6 +1100,7 @@ enum ieee80211_hw_flags {
1093 IEEE80211_HW_CONNECTION_MONITOR = 1<<19, 1100 IEEE80211_HW_CONNECTION_MONITOR = 1<<19,
1094 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, 1101 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20,
1095 IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, 1102 IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
1103 IEEE80211_HW_AP_LINK_PS = 1<<22,
1096}; 1104};
1097 1105
1098/** 1106/**
@@ -1701,7 +1709,9 @@ enum ieee80211_ampdu_mlme_action {
1701 * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep. 1709 * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep.
1702 * 1710 *
1703 * @sta_notify: Notifies low level driver about power state transition of an 1711 * @sta_notify: Notifies low level driver about power state transition of an
1704 * associated station, AP, IBSS/WDS/mesh peer etc. Must be atomic. 1712 * associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating
1713 * in AP mode, this callback will not be called when the flag
1714 * %IEEE80211_HW_AP_LINK_PS is set. Must be atomic.
1705 * 1715 *
1706 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), 1716 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
1707 * bursting) for a hardware TX queue. 1717 * bursting) for a hardware TX queue.
@@ -2131,6 +2141,48 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
2131 local_bh_enable(); 2141 local_bh_enable();
2132} 2142}
2133 2143
2144/**
2145 * ieee80211_sta_ps_transition - PS transition for connected sta
2146 *
2147 * When operating in AP mode with the %IEEE80211_HW_AP_LINK_PS
2148 * flag set, use this function to inform mac80211 about a connected station
2149 * entering/leaving PS mode.
2150 *
2151 * This function may not be called in IRQ context or with softirqs enabled.
2152 *
2153 * Calls to this function for a single hardware must be synchronized against
2154 * each other.
2155 *
2156 * The function returns -EINVAL when the requested PS mode is already set.
2157 *
2158 * @sta: currently connected sta
2159 * @start: start or stop PS
2160 */
2161int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
2162
2163/**
2164 * ieee80211_sta_ps_transition_ni - PS transition for connected sta
2165 * (in process context)
2166 *
2167 * Like ieee80211_sta_ps_transition() but can be called in process context
2168 * (internally disables bottom halves). Concurrent call restriction still
2169 * applies.
2170 *
2171 * @sta: currently connected sta
2172 * @start: start or stop PS
2173 */
2174static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2175 bool start)
2176{
2177 int ret;
2178
2179 local_bh_disable();
2180 ret = ieee80211_sta_ps_transition(sta, start);
2181 local_bh_enable();
2182
2183 return ret;
2184}
2185
2134/* 2186/*
2135 * The TX headroom reserved by mac80211 for its own tx_status functions. 2187 * The TX headroom reserved by mac80211 for its own tx_status functions.
2136 * This is enough for the radiotap header. 2188 * This is enough for the radiotap header.