Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4be8c387 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: extend/document powersave API



This modifies hardware flags for powersave to support three different
flags:
 * IEEE80211_HW_SUPPORTS_PS - indicates general PS support
 * IEEE80211_HW_PS_NULLFUNC_STACK - indicates nullfunc sending in software
 * IEEE80211_HW_SUPPORTS_DYNAMIC_PS - indicates dynamic PS on the device

It also adds documentation for all this which explains how to set the
various flags.

Additionally, it fixes a few things:
 * a spot where && was used to test flags
 * enable CONF_PS only when associated again

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent acbaf32e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
    </authorgroup>

    <copyright>
      <year>2007</year>
      <year>2008</year>
      <year>2007-2009</year>
      <holder>Johannes Berg</holder>
    </copyright>

@@ -223,6 +222,11 @@ usage should require reading the full document.
!Finclude/net/mac80211.h ieee80211_key_flags
    </chapter>

    <chapter id="powersave">
      <title>Powersave support</title>
!Pinclude/net/mac80211.h Powersave support
    </chapter>

    <chapter id="qos">
      <title>Multiple queues and QoS support</title>
      <para>TBD</para>
+2 −1
Original line number Diff line number Diff line
@@ -805,7 +805,8 @@ int iwl_setup_mac(struct iwl_priv *priv)
	/* Tell mac80211 our characteristics */
	hw->flags = IEEE80211_HW_SIGNAL_DBM |
		    IEEE80211_HW_NOISE_DBM |
		    IEEE80211_HW_AMPDU_AGGREGATION;
		    IEEE80211_HW_AMPDU_AGGREGATION |
		    IEEE80211_HW_SUPPORTS_PS;
	hw->wiphy->interface_modes =
		BIT(NL80211_IFTYPE_STATION) |
		BIT(NL80211_IFTYPE_ADHOC);
+3 −1
Original line number Diff line number Diff line
@@ -1449,7 +1449,9 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
	 * Initialize all hw fields.
	 */
	rt2x00dev->hw->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
			       IEEE80211_HW_SIGNAL_DBM;
			       IEEE80211_HW_SIGNAL_DBM |
			       IEEE80211_HW_SUPPORTS_PS |
			       IEEE80211_HW_PS_NULLFUNC_STACK;
	rt2x00dev->hw->extra_tx_headroom = 0;

	SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
+3 −1
Original line number Diff line number Diff line
@@ -1749,7 +1749,9 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
	 * Initialize all hw fields.
	 */
	rt2x00dev->hw->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
			       IEEE80211_HW_SIGNAL_DBM;
			       IEEE80211_HW_SIGNAL_DBM |
			       IEEE80211_HW_SUPPORTS_PS |
			       IEEE80211_HW_PS_NULLFUNC_STACK;

	rt2x00dev->hw->extra_tx_headroom = 0;

+3 −1
Original line number Diff line number Diff line
@@ -1801,7 +1801,9 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
	rt2x00dev->hw->flags =
	    IEEE80211_HW_RX_INCLUDES_FCS |
	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
	    IEEE80211_HW_SIGNAL_DBM;
	    IEEE80211_HW_SIGNAL_DBM |
	    IEEE80211_HW_SUPPORTS_PS |
	    IEEE80211_HW_PS_NULLFUNC_STACK;

	rt2x00dev->hw->extra_tx_headroom = TXD_DESC_SIZE;

Loading