1. 26 Jul, 2010 23 commits
  2. 23 Jul, 2010 10 commits
  3. 21 Jul, 2010 6 commits
    • Johannes Berg's avatar
      mac80211: proper IBSS locking · 7a17a33c
      Johannes Berg authored
      IBSS has never had locking, instead relying on some
      memory barriers etc. That's hard to get right, and
      I think we had it wrong too until the previous patch.
      Since this is not performance sensitive, it doesn't
      make sense to have the maintenance overhead of that,
      so add proper locking.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7a17a33c
    • Johannes Berg's avatar
      mac80211: fix IBSS lockdep complaint · bc05d19f
      Johannes Berg authored
      Bob reported a lockdep complaint originating in
      the mac80211 IBSS code due to the common work
      struct patch. The reason is that the IBSS and
      station mode code have different locking orders
      for the cfg80211 wdev lock and the work struct
      (where "locking" implies running/canceling).
      
      Fix this by simply not canceling the work in
      the IBSS code, it is not necessary since when
      the REQ_RUN bit is cleared, the work will run
      without effect if it runs. When the interface
      is set down, it is flushed anyway, so there's
      no concern about it running after memory has
      been invalidated either.
      
      This fixes
      https://bugzilla.kernel.org/show_bug.cgi?id=16419
      
      Additionally, looking into this I noticed that
      there's a small window while the IBSS is torn
      down in which the work may be rescheduled and
      the REQ_RUN bit be set again after leave() has
      cleared it when a scan finishes at exactly the
      same time. Avoid that by setting the ssid_len
      to zero before clearing REQ_RUN which signals
      to the scan finish code that this interface is
      not active.
      Reported-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      bc05d19f
    • Johannes Berg's avatar
      mac80211: refuse shared key auth when WEP is unavailable · 9dca9c49
      Johannes Berg authored
      When WEP is not available, we should reject shared
      key authentication because it could never succeed.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      9dca9c49
    • Maxime Bizon's avatar
      cfg80211: fix race between sysfs and cfg80211 · 5a652052
      Maxime Bizon authored
      device_add() is called before adding the phy to the cfg80211 device
      list.
      
      So if a userspace program uses sysfs uevents to detect new phy
      devices, and queries nl80211 to get phy info, it can get ENODEV even
      though the phy exists in sysfs.
      
      An easy workaround is to hold the cfg80211 mutex until the phy is
      present in sysfs/cfg80211/debugfs.
      Signed-off-by: default avatarMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      5a652052
    • Larry Finger's avatar
      b43: silence phy_n sparse warnings · acd82aa8
      Larry Finger authored
      drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates bits from constant value (ffff0fff becomes fff)
      drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
      drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates bits from constant value (ffff00ff becomes ff)
      drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates bits from constant value (ffff0fff becomes fff)
      drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
      drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates bits from constant value (ffff0fff becomes fff)
      drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates bits from constant value (ffff3fff becomes 3fff)
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      acd82aa8
    • John W. Linville's avatar
      b43: silence most sparse warnings · 41950bdf
      John W. Linville authored
        CHECK   drivers/net/wireless/b43/main.c
      drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static?
        CHECK   drivers/net/wireless/b43/phy_g.c
      drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
        CHECK   drivers/net/wireless/b43/phy_lp.c
      drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static?
      drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
      drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
      drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
        CHECK   drivers/net/wireless/b43/wa.c
      drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff)
      drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
      drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
      drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff)
      
      AFAICT, none of these amount to real bugs.  But this reduces warning
      spam from sparse w/o significantly affecting readability of the code (IMHO).
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      41950bdf
  4. 20 Jul, 2010 1 commit