1. 31 7月, 2012 4 次提交
    • E
      mac80211: add PS flag to bss_conf · ab095877
      Eliad Peller 提交于
      Currently, ps mode is indicated per device (rather than
      per interface), which doesn't make a lot of sense.
      
      Moreover, there are subtle bugs caused by the inability
      to indicate ps change along with other changes
      (e.g. when the AP deauth us, we'd like to indicate
      CHANGED_PS | CHANGED_ASSOC, as changing PS before
      notifying about disassociation will result in null-packets
      being sent (if IEEE80211_HW_SUPPORTS_DYNAMIC_PS) while
      the sta is already disconnected.)
      
      Keep the current per-device notifications, and add
      parallel per-vif notifications.
      
      In order to keep it simple, the per-device ps and
      the per-vif ps are orthogonal - the per-vif ps
      configuration is determined only by the user
      configuration (enable/disable) and the connection
      state, and is not affected by other vifs state and
      (temporary) dynamic_ps/offchannel operations
      (unlike per-device ps).
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ab095877
    • E
      mac80211: don't call mgd_prepare_tx when associated · 8c7d857c
      Emmanuel Grumbach 提交于
      This doesn't make any sense since we are expected to be on
      the medium or at least to Tx only when we are on the right
      channel and the AP/GO can hear us.
      
      Move the call to mgd_prepare_tx() for deauth to be only
      done in case we're sending a deauth while not associated.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8c7d857c
    • J
      mac80211: don't react to beacon loss if HW monitoring · 7eeff74c
      Johannes Berg 提交于
      If the HW is monitoring connection loss (as advertised
      by IEEE80211_HW_CONNECTION_MONITOR) but not filtering
      beacons (IEEE80211_VIF_BEACON_FILTER) then mac80211 will
      still start the beacon loss timer and if a few beacons
      are lost, e.g. due to scanning, drop the connection.
      
      If the hardware doesn't advertise connection monitoring,
      then it won't drop the connection right away but probe
      the AP, which is intended, but due to the logic in the
      timer when connection monitoring is done it assumes the
      connection was actually lost.
      
      Fix this problem by not starting the timer when the HW
      does connection monitoring.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7eeff74c
    • M
      mac80211: VHT (11ac) association · d545daba
      Mahesh Palivela 提交于
      Insert VHT IEs into association frames to allow
      mac80211 to connect as a VHT client.
      Signed-off-by: NMahesh Palivela <maheshp@posedge.com>
      [clarify commit message]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d545daba
  2. 17 7月, 2012 1 次提交
    • E
      mac80211: go out of PS before sending disassoc · 88bc40e8
      Eliad Peller 提交于
      on disassoc, ieee80211_set_disassoc() goes out of PS
      before indicating BSS_CHANGED_ASSOC (not sure why this
      is needed, but some drivers might count on the current
      behavior).
      
      However, it does it after sending the disassoc
      frame, which results in null-data frame being sent
      (in order to go out of ps) after we were already sent
      the disassoc, which is invalid.
      
      Fix it by going out of ps before sending the disassoc.
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      88bc40e8
  3. 12 7月, 2012 1 次提交
    • J
      mac80211: add time synchronisation with BSS for assoc · 8c358bcd
      Johannes Berg 提交于
      Some drivers (iwlegacy, iwlwifi and rt2x00) today use the
      bss_conf.last_tsf value. By itself though that value is
      completely worthless since it may be ancient. What really
      is needed is synchronisation between some device time and
      the TSF.
      
      To clarify this, rename bss_conf.last_tsf to sync_tsf and
      add sync_device_ts which is obtained from rx_status which
      gets a new field device_timestamp for this purpose. This
      is intentionally not using the mactime field since that
      is used for other things and in IBSS is expected to sync
      with the IBSS's TSF which isn't necessarily true for the
      device timestamp.
      
      Also, since we have the information and it's useful even
      before the connection has been established, give all the
      timing details to the driver before authenticating.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8c358bcd
  4. 10 7月, 2012 1 次提交
  5. 09 7月, 2012 2 次提交
  6. 03 7月, 2012 1 次提交
  7. 02 7月, 2012 1 次提交
  8. 28 6月, 2012 2 次提交
  9. 24 6月, 2012 1 次提交
    • J
      mac80211: clean up debugging · bdcbd8e0
      Johannes Berg 提交于
      There are a few things that make the logging and
      debugging in mac80211 less useful than it should
      be right now:
       * a lot of messages should be pr_info, not pr_debug
       * wholesale use of pr_debug makes it require *both*
         Kconfig and dynamic configuration
       * there are still a lot of ifdefs
       * the style is very inconsistent, sometimes the
         sdata->name is printed in front
      
      Clean up everything, introducing new macros and
      separating out the station MLME debugging into
      a new Kconfig symbol.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      bdcbd8e0
  10. 22 6月, 2012 1 次提交
  11. 20 6月, 2012 3 次提交
    • Y
      mac80211: save wmm_acm per sdata · 00e96dec
      Yoni Divinsky 提交于
      Save and configure the wmm_acm per sdata, rather than
      per hardware.
      
      If wmm_acm is saved per hardware when running two
      interfaces simultaneously on the same hardware one
      interface's wmm policy will be affected by the other
      interface.
      Signed-off-by: NYoni Divinsky <yoni.divinsky@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      00e96dec
    • L
      mac80211: use the correct capability info in ieee80211_set_associated() · 50ae34a2
      Luciano Coelho 提交于
      If an AP is beaconing with different capabilities than the one we get
      in the associate response, we were still using the capabilities
      received in the beacons.  One example is when the AP is beaconing with
      the short slot bit set to zero and then we try to connect to it with
      long slot.  In this case, we would keep using long slot until the next
      beacon was received.
      
      Fix this by using the correct capability value when calling
      ieee80211_handle_bss_capability().  We were using cbss->capability,
      but we should use the bss_conf->assoc_capability instead.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      50ae34a2
    • L
      mac80211: initialize sta pointer to avoid false-positive warning · 6df653c7
      Luciano Coelho 提交于
      Some compilers (eg. gcc 4.4.1 for ARM) report a false positive warning
      in mlme.c:
      
      net/mac80211/mlme.c: In function 'ieee80211_prep_connection':
      net/mac80211/mlme.c:3035: warning: 'sta' may be used uninitialized in this function
      
      This is a false positive because the place where 'sta' is used is
      inside an if with the same condition of where it is set:
      
      [...]
              if (!have_sta) {
                      sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL);
                      if (!sta)
                              return -ENOMEM;
              }
      [...]
              if (!have_sta) {
      [...]
                      sta->sta.supp_rates[cbss->channel->band] = rates;
      [...]
      
      For some reason the compiler doesn't understand this and warns.
      
      While this is not a problem in the code itself, we can avoid polluting
      the build logs with false positives by setting sta to NULL on
      declaration and checking for sta instead of !have_sta in the second if.
      Reported-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6df653c7
  12. 13 6月, 2012 1 次提交
  13. 09 6月, 2012 1 次提交
  14. 07 6月, 2012 2 次提交
  15. 06 6月, 2012 5 次提交
  16. 05 6月, 2012 1 次提交
  17. 25 5月, 2012 1 次提交
    • S
      mac80211: Fix race in checking AP status by sending null frame · 992e68bf
      Soumik Das 提交于
      mac80211 tries to verify the existence of the current AP by
      probing or sending a NULL frame in function
      ieee80211_mgd_probe_ap_send. It 1st sends a null frame to the AP,
      increments probe_send_count and waits for the ACK to the NULL
      frame for a finite duration of time. At times, it happens that by
      the time mac80211 gets to increment probe_send_count, the ACK for
      the NULL frame transmitted has already been processed. This leads
      to a race condition where mac80211 times out waiting for the ACK
      for the NULL frame causing unnecessary disconnection with the AP.
      Signed-off-by: NSoumik Das <soumik.das@stericsson.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      992e68bf
  18. 16 5月, 2012 1 次提交
  19. 10 5月, 2012 1 次提交
    • J
      mac80211: Convert compare_ether_addr to ether_addr_equal · b203ca39
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b203ca39
  20. 09 5月, 2012 1 次提交
  21. 25 4月, 2012 1 次提交
    • E
      mac80211: call ieee80211_mgd_stop() on interface stop · afa762f6
      Eliad Peller 提交于
      ieee80211_mgd_teardown() is called on netdev removal, which
      occurs after the vif was already removed from the low-level
      driver, resulting in the following warning:
      
      [ 4809.014734] ------------[ cut here ]------------
      [ 4809.019861] WARNING: at net/mac80211/driver-ops.h:12 ieee80211_bss_info_change_notify+0x200/0x2c8 [mac80211]()
      [ 4809.030388] wlan0:  Failed check-sdata-in-driver check, flags: 0x4
      [ 4809.036862] Modules linked in: wlcore_sdio(-) wl12xx wlcore mac80211 cfg80211 [last unloaded: cfg80211]
      [ 4809.046849] [<c001bd4c>] (unwind_backtrace+0x0/0x12c)
      [ 4809.055937] [<c047cf1c>] (dump_stack+0x20/0x24)
      [ 4809.065385] [<c003e334>] (warn_slowpath_common+0x5c/0x74)
      [ 4809.075589] [<c003e408>] (warn_slowpath_fmt+0x40/0x48)
      [ 4809.088291] [<bf033630>] (ieee80211_bss_info_change_notify+0x200/0x2c8 [mac80211])
      [ 4809.102844] [<bf067f84>] (ieee80211_destroy_auth_data+0x80/0xa4 [mac80211])
      [ 4809.116276] [<bf068004>] (ieee80211_mgd_teardown+0x5c/0x74 [mac80211])
      [ 4809.129331] [<bf043f18>] (ieee80211_teardown_sdata+0xb0/0xd8 [mac80211])
      [ 4809.141595] [<c03b5e58>] (rollback_registered_many+0x228/0x2f0)
      [ 4809.153056] [<c03b5f48>] (unregister_netdevice_many+0x28/0x50)
      [ 4809.165696] [<bf041ea8>] (ieee80211_remove_interfaces+0xb4/0xdc [mac80211])
      [ 4809.179151] [<bf032174>] (ieee80211_unregister_hw+0x50/0xf0 [mac80211])
      [ 4809.191043] [<bf0bebb4>] (wlcore_remove+0x5c/0x7c [wlcore])
      [ 4809.201491] [<c02c6918>] (platform_drv_remove+0x24/0x28)
      [ 4809.212029] [<c02c4d50>] (__device_release_driver+0x8c/0xcc)
      [ 4809.222738] [<c02c4e84>] (device_release_driver+0x30/0x3c)
      [ 4809.233099] [<c02c4258>] (bus_remove_device+0x10c/0x128)
      [ 4809.242620] [<c02c26f8>] (device_del+0x11c/0x17c)
      [ 4809.252150] [<c02c6de0>] (platform_device_del+0x28/0x68)
      [ 4809.263051] [<bf0df49c>] (wl1271_remove+0x3c/0x50 [wlcore_sdio])
      [ 4809.273590] [<c03806b0>] (sdio_bus_remove+0x48/0xf8)
      [ 4809.283754] [<c02c4d50>] (__device_release_driver+0x8c/0xcc)
      [ 4809.293729] [<c02c4e2c>] (driver_detach+0x9c/0xc4)
      [ 4809.303163] [<c02c3d7c>] (bus_remove_driver+0xc4/0xf4)
      [ 4809.312973] [<c02c5a98>] (driver_unregister+0x70/0x7c)
      [ 4809.323220] [<c03809c4>] (sdio_unregister_driver+0x24/0x2c)
      [ 4809.334213] [<bf0df458>] (wl1271_exit+0x14/0x1c [wlcore_sdio])
      [ 4809.344930] [<c009b1a4>] (sys_delete_module+0x228/0x2a8)
      [ 4809.354734] ---[ end trace 515290ccf5feb522 ]---
      
      Rename ieee80211_mgd_teardown() to ieee80211_mgd_stop(),
      and call it on ieee80211_do_stop().
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      afa762f6
  22. 14 4月, 2012 1 次提交
  23. 11 4月, 2012 6 次提交