diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-06-21 01:59:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-21 15:39:59 -0400 |
commit | f90754c15f47063671aea55268a9dd6a37b51492 (patch) | |
tree | 197c239a813e426d8a675449927e381352ad4875 /include/net/mac80211.h | |
parent | fb63bc41772259701a827e9a6117219a7393554f (diff) |
mac80211: Add interface for driver to temporarily disable dynamic ps
This mechanism introduced in this patch applies (at least) for hardware
designs using a single shared antenna for both WLAN and BT. In these designs,
the antenna must be toggled between WLAN and BT.
In those hardware, managing WLAN co-existence with Bluetooth requires WLAN
full power save whenever there is Bluetooth activity in order for WLAN to be
able to periodically relinquish the antenna to be used for BT. This is because
BT can only access the shared antenna when WLAN is idle or asleep.
Some hardware, for instance the wl1271, are able to indicate to the host
whenever there is BT traffic. In essence, the hardware will send an indication
to the host whenever there is, for example, SCO traffic or A2DP traffic, and
will send another indication when the traffic is over.
The hardware gets information of Bluetooth traffic via hardware co-existence
control lines - these lines are used to negotiate the shared antenna
ownership. The hardware will give the antenna to BT whenever WLAN is sleeping.
This patch adds the interface to mac80211 to facilitate temporarily disabling
of dynamic power save as per request of the WLAN driver. This interface will
immediately force WLAN to full powersave, hence allowing BT coexistence as
described above.
In these kind of shared antenna desings, when WLAN powersave is fully disabled,
Bluetooth will not work simultaneously with WLAN at all. This patch does not
address that problem. This interface will not change PSM state, so if PSM is
disabled it will remain so. Solving this problem requires knowledge about BT
state, and is best done in user-space.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index fe1a3a603375..7f256e23c57f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1271,6 +1271,15 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1271 | * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS | 1271 | * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS |
1272 | * enabled whenever user has enabled powersave. | 1272 | * enabled whenever user has enabled powersave. |
1273 | * | 1273 | * |
1274 | * Some hardware need to toggle a single shared antenna between WLAN and | ||
1275 | * Bluetooth to facilitate co-existence. These types of hardware set | ||
1276 | * limitations on the use of host controlled dynamic powersave whenever there | ||
1277 | * is simultaneous WLAN and Bluetooth traffic. For these types of hardware, the | ||
1278 | * driver may request temporarily going into full power save, in order to | ||
1279 | * enable toggling the antenna between BT and WLAN. If the driver requests | ||
1280 | * disabling dynamic powersave, the @dynamic_ps_timeout value will be | ||
1281 | * temporarily set to zero until the driver re-enables dynamic powersave. | ||
1282 | * | ||
1274 | * Driver informs U-APSD client support by enabling | 1283 | * Driver informs U-APSD client support by enabling |
1275 | * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the | 1284 | * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the |
1276 | * uapsd paramater in conf_tx() operation. Hardware needs to send the QoS | 1285 | * uapsd paramater in conf_tx() operation. Hardware needs to send the QoS |
@@ -2447,6 +2456,36 @@ void ieee80211_beacon_loss(struct ieee80211_vif *vif); | |||
2447 | void ieee80211_connection_loss(struct ieee80211_vif *vif); | 2456 | void ieee80211_connection_loss(struct ieee80211_vif *vif); |
2448 | 2457 | ||
2449 | /** | 2458 | /** |
2459 | * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm | ||
2460 | * | ||
2461 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2462 | * | ||
2463 | * Some hardware require full power save to manage simultaneous BT traffic | ||
2464 | * on the WLAN frequency. Full PSM is required periodically, whenever there are | ||
2465 | * burst of BT traffic. The hardware gets information of BT traffic via | ||
2466 | * hardware co-existence lines, and consequentially requests mac80211 to | ||
2467 | * (temporarily) enter full psm. | ||
2468 | * This function will only temporarily disable dynamic PS, not enable PSM if | ||
2469 | * it was not already enabled. | ||
2470 | * The driver must make sure to re-enable dynamic PS using | ||
2471 | * ieee80211_enable_dyn_ps() if the driver has disabled it. | ||
2472 | * | ||
2473 | */ | ||
2474 | void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif); | ||
2475 | |||
2476 | /** | ||
2477 | * ieee80211_enable_dyn_ps - restore dynamic psm after being disabled | ||
2478 | * | ||
2479 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2480 | * | ||
2481 | * This function restores dynamic PS after being temporarily disabled via | ||
2482 | * ieee80211_disable_dyn_ps(). Each ieee80211_disable_dyn_ps() call must | ||
2483 | * be coupled with an eventual call to this function. | ||
2484 | * | ||
2485 | */ | ||
2486 | void ieee80211_enable_dyn_ps(struct ieee80211_vif *vif); | ||
2487 | |||
2488 | /** | ||
2450 | * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring | 2489 | * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring |
2451 | * rssi threshold triggered | 2490 | * rssi threshold triggered |
2452 | * | 2491 | * |