1. 31 Jul, 2012 3 commits
  2. 17 Jul, 2012 1 commit
    • Eliad Peller's avatar
      mac80211: go out of PS before sending disassoc · 88bc40e8
      Eliad Peller authored
      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: default avatarEliad Peller <eliad@wizery.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      88bc40e8
  3. 12 Jul, 2012 1 commit
    • Johannes Berg's avatar
      mac80211: add time synchronisation with BSS for assoc · 8c358bcd
      Johannes Berg authored
      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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8c358bcd
  4. 09 Jul, 2012 3 commits
  5. 03 Jul, 2012 1 commit
  6. 02 Jul, 2012 1 commit
  7. 28 Jun, 2012 2 commits
  8. 24 Jun, 2012 1 commit
    • Johannes Berg's avatar
      mac80211: clean up debugging · bdcbd8e0
      Johannes Berg authored
      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: default avatarJohannes Berg <johannes.berg@intel.com>
      bdcbd8e0
  9. 21 Jun, 2012 1 commit
  10. 20 Jun, 2012 3 commits
    • Yoni Divinsky's avatar
      mac80211: save wmm_acm per sdata · 00e96dec
      Yoni Divinsky authored
      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: default avatarYoni Divinsky <yoni.divinsky@ti.com>
      Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      00e96dec
    • Luciano Coelho's avatar
      mac80211: use the correct capability info in ieee80211_set_associated() · 50ae34a2
      Luciano Coelho authored
      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: default avatarLuciano Coelho <coelho@ti.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      50ae34a2
    • Luciano Coelho's avatar
      mac80211: initialize sta pointer to avoid false-positive warning · 6df653c7
      Luciano Coelho authored
      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: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6df653c7
  11. 13 Jun, 2012 1 commit
  12. 08 Jun, 2012 1 commit
  13. 06 Jun, 2012 2 commits
  14. 05 Jun, 2012 5 commits
  15. 04 Jun, 2012 1 commit
  16. 25 May, 2012 1 commit
    • Soumik Das's avatar
      mac80211: Fix race in checking AP status by sending null frame · 992e68bf
      Soumik Das authored
      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: default avatarSoumik Das <soumik.das@stericsson.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      992e68bf
  17. 15 May, 2012 1 commit
  18. 09 May, 2012 1 commit
    • Joe Perches's avatar
      mac80211: Convert compare_ether_addr to ether_addr_equal · b203ca39
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b203ca39
  19. 08 May, 2012 1 commit
  20. 24 Apr, 2012 1 commit
    • Eliad Peller's avatar
      mac80211: call ieee80211_mgd_stop() on interface stop · afa762f6
      Eliad Peller authored
      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: default avatarEliad Peller <eliad@wizery.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      afa762f6
  21. 13 Apr, 2012 1 commit
  22. 10 Apr, 2012 6 commits
  23. 09 Apr, 2012 1 commit