1. 11 6月, 2009 3 次提交
  2. 23 5月, 2009 2 次提交
  3. 21 5月, 2009 8 次提交
  4. 14 5月, 2009 3 次提交
  5. 12 5月, 2009 3 次提交
  6. 07 5月, 2009 10 次提交
    • L
      mac80211: Fix sparse warning for ssid_len on ieee80211_sta_config_auth() · 6cfe62cd
      Luis R. Rodriguez 提交于
      net/mac80211/mlme.c:2079:28: warning: symbol 'ssid_len' shadows an earlier one
      net/mac80211/mlme.c:2022:12: originally declared here
      
      ssid_len is already being declared and checked above so there is
      no need for it again.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6cfe62cd
    • J
      mac80211: tell driver when idle · 5cff20e6
      Johannes Berg 提交于
      When we aren't doing anything in mac80211, we can turn off
      much of the hardware, depending on the driver/hw. Not doing
      anything, aka being idle, means:
      
       * no monitor interfaces
       * no AP/mesh/wds interfaces
       * any station interfaces are in DISABLED state
       * any IBSS interfaces aren't trying to be in a network
       * we aren't trying to scan
      
      By creating a new function that verifies these conditions and calling
      it at strategic points where the states of those conditions change,
      we can easily make mac80211 tell the driver when we are idle to save
      power.
      
      Additionally, this fixes a small quirk where a recalculated powersave
      state is passed to the driver even if the hardware is about to stopped
      completely.
      
      This patch intentionally doesn't touch radio_enabled because that is
      currently implemented to be a soft rfkill which is inappropriate here
      when we need to be able to wake up with low latency.
      
      One thing I'm not entirely sure about is this:
      
        phy0: device no longer idle - in use
        wlan0: direct probe to AP 00:11:24:91:07:4d try 1
        wlan0 direct probe responded
        wlan0: authenticate with AP 00:11:24:91:07:4d
        wlan0: authenticated
      > phy0: device now idle
      > phy0: device no longer idle - in use
        wlan0: associate with AP 00:11:24:91:07:4d
        wlan0: RX AssocResp from 00:11:24:91:07:4d (capab=0x401 status=0 aid=1)
        wlan0: associated
      
      Is it appropriate to go into idle state for a short time when we have
      just authenticated, but not associated yet? This happens only with the
      userspace SME, because we cannot really know how long it will wait
      before asking us to associate. Would going idle after a short timeout
      be more appropriate? We may need to revisit this, depending on what
      happens.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5cff20e6
    • J
      mac80211: fix probe response processing · 16cf438a
      Johannes Berg 提交于
      Due to the use of a _REQ_DIRECT_PROBE bit, which is
      unnecessary (and I wonder why it was done that way),
      an interesting situation can arise:
       1) we try to probe an access point
       2) the AP doesn't response in time
       3) we tell userspace that we gave up
       4) the AP suddenly responds
       5) we auth/assoc with the AP
      
      I've seen 4) happen in testing with hostapd SIGSTOPped,
      and when SIGCONTinued it processes the probe requests
      that came in and send responses. But 5) is not supposed
      to happen after we tell everybody we've given up on the
      AP.
      
      To fix this, remove the _REQ_DIRECT_PROBE request bit,
      and process probe responses when we're in the relevant
      MLME state, namely IEEE80211_STA_MLME_DIRECT_PROBE.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      16cf438a
    • J
      nl80211: Send timeout event on failed direct probe · e61f2340
      Jouni Malinen 提交于
      If the direct probe times out, we need to send the authentication
      timeout event to notify SME in the same way as we notify on timeout
      with authentication frames since the direct probe is run as part of
      the authentication attempt.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e61f2340
    • J
      mac80211: add driver ops wrappers · 24487981
      Johannes Berg 提交于
      In order to later add tracing or verifications to the driver
      calls mac80211 makes, this patch adds static inline wrappers
      for all operations.
      
      All calls are now written as
      
      	drv_<op>(local, ...);
      
      instead of
      
      	local->ops-><op>(&local->hw, ...);
      
      Where necessary, the wrappers also do existence checking and
      return default values as appropriate.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      24487981
    • J
      mac80211: unify config_interface and bss_info_changed · 2d0ddec5
      Johannes Berg 提交于
      The config_interface method is a little strange, it contains the
      BSSID and beacon updates, while bss_info_changed contains most
      other BSS information for each interface. This patch removes
      config_interface and rolls all the information it previously
      passed to drivers into bss_info_changed.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2d0ddec5
    • J
      mac80211: clean up beacon interval settings · 57c4d7b4
      Johannes Berg 提交于
      We currently have two beacon interval configuration knobs:
      hw.conf.beacon_int and vif.bss_info.beacon_int. This is
      rather confusing, even though the former is used when we
      beacon ourselves and the latter when we are associated to
      an AP.
      
      This just deprecates the hw.conf.beacon_int setting in favour
      of always using vif.bss_info.beacon_int. Since it touches all
      the beaconing IBSS code anyway, we can also add support for
      the cfg80211 IBSS beacon interval configuration easily.
      
      NOTE: The hw.conf.beacon_int setting is retained for now due
            to drivers still using it -- I couldn't untangle all
            drivers, some are updated in this patch.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      57c4d7b4
    • J
      mac80211: fix scan races and rework scanning · f3b85252
      Johannes Berg 提交于
      There are some places marked
      	/* XXX maybe racy? */
      and they really are racy because there's no locking.
      
      This patch reworks much of the scan code, and introduces proper
      locking for the scan request as well as the internal scanning
      (which is necessary for IBSS/managed modes). Helper functions
      are added to call the scanning code whenever necessary. The
      scan deferring is changed to simply queue the scanning work
      instead of trying to start the scan in place, the scanning work
      will then take care of the rest.
      
      Also, currently when internal scans are requested for an interface
      that is trying to associate, we reject such scans. This was not
      intended, the mlme code has provisions to scan twice when it can't
      find the BSS to associate with right away; this has never worked
      properly. Fix this by not rejecting internal scan requests for an
      interface that is associating.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f3b85252
    • J
      mac80211: rename max_sleep_interval to max_sleep_period · 9ccebe61
      Johannes Berg 提交于
      Kalle points out that max_sleep_interval is somewhat confusing
      because the value is measured in beacon intervals, and not in
      TU. Rename it to max_sleep_period to be consistent with things
      like DTIM period that are also measured in beacon intervals.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9ccebe61
    • J
      mac80211: fix PS vs. scan race · d5edaedc
      Johannes Berg 提交于
      When somebody changes the PS parameters while scanning
      is in progress, we enable PS -- during the scan. This
      is clearly not desirable, and we can just abort enabling
      PS when scanning since when the scan finishes it will
      be taken care of.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Reviewed-by: NKalle Valo <kalle.valo@iki.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d5edaedc
  7. 23 4月, 2009 11 次提交