1. 09 7月, 2012 1 次提交
  2. 03 7月, 2012 1 次提交
  3. 02 7月, 2012 1 次提交
  4. 28 6月, 2012 2 次提交
  5. 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
  6. 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
  7. 13 6月, 2012 1 次提交
  8. 09 6月, 2012 1 次提交
  9. 07 6月, 2012 2 次提交
  10. 06 6月, 2012 5 次提交
  11. 05 6月, 2012 1 次提交
  12. 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
  13. 16 5月, 2012 1 次提交
  14. 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
  15. 09 5月, 2012 1 次提交
  16. 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
  17. 14 4月, 2012 1 次提交
  18. 11 4月, 2012 6 次提交
  19. 10 4月, 2012 5 次提交
  20. 16 3月, 2012 1 次提交
  21. 14 3月, 2012 2 次提交
    • P
      mac80211: Don't let regulatory make us deaf · 3117bbdb
      Paul Stewart 提交于
      When regulatory information changes our HT behavior (e.g,
      when we get a country code from the AP we have just associated
      with), we should use this information to change the power with
      which we transmit, and what channels we transmit.  Sometimes
      the channel parameters we derive from regulatory information
      contradicts the parameters we used in association.  For example,
      we could have associated specifying HT40, but the regulatory
      rules we apply may forbid HT40 operation.
      
      In the situation above, we should reconfigure ourselves to
      transmit in HT20 only, however it makes no sense for us to
      disable receive in HT40, since if we associated with these
      parameters, the AP has every reason to expect we can and
      will receive packets this way.  The code in mac80211 does
      not have the capability of sending the appropriate action
      frames to signal a change in HT behaviour so the AP has
      no clue we can no longer receive frames encoded this way.
      In some broken AP implementations, this can leave us
      effectively deaf if the AP never retries in lower HT rates.
      
      This change breaks up the channel_type parameter in the
      ieee80211_enable_ht function into a separate receive and
      transmit part.  It honors the channel flags set by regulatory
      in order to configure the rate control algorithm, but uses
      the capability flags to configure the channel on the radio,
      since these were used in association to set the AP's transmit
      rate.
      Signed-off-by: NPaul Stewart <pstew@chromium.org>
      Cc: Sam Leffler <sleffler@chromium.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Reviewed-by: NLuis R Rodriguez <mcgrof@frijolero.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3117bbdb
    • J
      mac80211: rename bss_conf timestamp to last_tsf · e9ac0745
      Johannes Berg 提交于
      This value is not really very useful by itself,
      yet some drivers (including iwlwifi until I can
      figure out what it should do) use it. At least
      rename it to "last_tsf" to indicate the meaning
      and add a note that it may be really old.
      
      I suspect the value may become useful combined
      with the rx_status->mactime, but we don't (yet)
      store that value and pass it to the driver.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e9ac0745
  22. 13 3月, 2012 1 次提交
    • J
      mac80211: set basic rates earlier · 5d6a1b06
      Johannes Berg 提交于
      The authentication and association handshake
      already happens in the context of the new BSS,
      and the basic rates are needed at least for
      the ACK response frame to the authentication
      or association response frames. Therefore the
      basic rates should already be configured into
      the driver when those frames are sent.
      
      Change the logic to set up the basic rates in
      the connection preparation that happens for
      authentication and association (if needed).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5d6a1b06