1. 27 7月, 2010 16 次提交
  2. 23 7月, 2010 10 次提交
  3. 22 7月, 2010 6 次提交
    • J
      mac80211: proper IBSS locking · 7a17a33c
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7a17a33c
    • J
      mac80211: fix IBSS lockdep complaint · bc05d19f
      Johannes Berg 提交于
      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: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bc05d19f
    • J
      mac80211: refuse shared key auth when WEP is unavailable · 9dca9c49
      Johannes Berg 提交于
      When WEP is not available, we should reject shared
      key authentication because it could never succeed.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9dca9c49
    • M
      cfg80211: fix race between sysfs and cfg80211 · 5a652052
      Maxime Bizon 提交于
      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: NMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5a652052
    • L
      b43: silence phy_n sparse warnings · acd82aa8
      Larry Finger 提交于
      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: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      acd82aa8
    • J
      b43: silence most sparse warnings · 41950bdf
      John W. Linville 提交于
        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: NJohn W. Linville <linville@tuxdriver.com>
      41950bdf
  4. 21 7月, 2010 8 次提交
    • J
      rtl8180: improve signal reporting for rtl8185 hardware · 8b74964c
      John W. Linville 提交于
      The existing code seemed to be somewhat based on the datasheet, but
      varied substantially from the vendor-provided driver.  This mirrors the
      handling of the rtl8185 case from that driver, but still neglects the
      specifics for the rtl8180 hardware.  Those details are a bit muddled...
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8b74964c
    • J
      mwl8k: correct/silence sparse warnings · b603742f
      John W. Linville 提交于
      drivers/net/wireless/mwl8k.c:1541:21: warning: incorrect type in assignment (different base types)
      drivers/net/wireless/mwl8k.c:1541:21:    expected restricted __le16 [usertype] result
      drivers/net/wireless/mwl8k.c:1541:21:    got int
      drivers/net/wireless/mwl8k.c:1575:42:    expected unsigned short [unsigned] [usertype] cmd
      drivers/net/wireless/mwl8k.c:1575:42:    got restricted __le16 [usertype] code
      drivers/net/wireless/mwl8k.c:1587:50: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1587:50:    expected unsigned short [unsigned] [usertype] cmd
      drivers/net/wireless/mwl8k.c:1587:50:    got restricted __le16 [usertype] code
      drivers/net/wireless/mwl8k.c:1592:50: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1592:50:    expected unsigned short [unsigned] [usertype] cmd
      drivers/net/wireless/mwl8k.c:1592:50:    got restricted __le16 [usertype] code
      drivers/net/wireless/mwl8k.c:1845:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1845:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1845:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1848:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1848:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1848:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1851:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1851:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1851:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1854:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1854:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1854:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1857:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1857:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1857:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1860:27: warning: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mwl8k.c:1860:27:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/net/wireless/mwl8k.c:1860:27:    got restricted __le32 [usertype] <noident>
      drivers/net/wireless/mwl8k.c:3055:20: warning: incorrect type in assignment (different base types)
      drivers/net/wireless/mwl8k.c:3055:20:    expected restricted __le16 [usertype] ht_caps
      drivers/net/wireless/mwl8k.c:3055:20:    got unsigned short [unsigned] [usertype] cap
      
      At least the last one looks like a real bug...
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Acked-by: NLennert Buytenhek <buytenh@wantstofly.org>
      b603742f
    • J
      wireless: remove unnecessary reg_same_country_ie_hint · 34782e9e
      John W. Linville 提交于
      "Might as well remove  reg_same_country_ie_hint() completely since we
      already dealt with suspend/resume through the regulatory hint
      disconnect." -- Luis
      Reported-by: NLuis R. Rodriguez <mcgrof@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      34782e9e
    • J
      rt2x00: correct sparse warning in rt2x00debug.c · 16124541
      John W. Linville 提交于
        CHECK   drivers/net/wireless/rt2x00/rt2x00debug.c
      drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: warning: incorrect type in assignment (different base types)
      drivers/net/wireless/rt2x00/rt2x00debug.c:193:28:    expected restricted __le32 [usertype] chip_rev
      drivers/net/wireless/rt2x00/rt2x00debug.c:193:28:    got restricted __le16 [usertype] <noident>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      16124541
    • J
      libipw: correct sparse warnings and mark some variables static · cc40cc56
      John W. Linville 提交于
        CHECK   drivers/net/wireless/ipw2x00/libipw_module.c
      drivers/net/wireless/ipw2x00/libipw_module.c:65:21: warning: symbol 'libipw_config_ops' was not declared. Should it be static?
      drivers/net/wireless/ipw2x00/libipw_module.c:66:6: warning: symbol 'libipw_wiphy_privid' was not declared. Should it be static?
        CHECK   drivers/net/wireless/ipw2x00/libipw_wx.c
      drivers/net/wireless/ipw2x00/libipw_wx.c:415:17: warning: symbol 'ssid' shadows an earlier one
      drivers/net/wireless/ipw2x00/libipw_wx.c:324:9: originally declared here
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cc40cc56
    • J
      ipw2100: mark ipw2100_pm_qos_req static · d267be30
      John W. Linville 提交于
        CHECK   drivers/net/wireless/ipw2x00/ipw2100.c
      drivers/net/wireless/ipw2x00/ipw2100.c:177:28: warning: symbol 'ipw2100_pm_qos_req' was not declared. Should it be static?
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d267be30
    • J
      ath9k: correct sparse identified endian bug in ath_paprd_calibrate · a3d3da14
      John W. Linville 提交于
      drivers/net/wireless/ath/ath9k/main.c:282:26: warning: incorrect type in assignment (different base types)
      drivers/net/wireless/ath/ath9k/main.c:282:26:    expected restricted __le16 [usertype] duration_id
      drivers/net/wireless/ath/ath9k/main.c:282:26:    got int
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a3d3da14
    • J
      wireless: mark cfg80211_is_all_idle as static · 20925fee
      John W. Linville 提交于
        CHECK   net/wireless/sme.c
      net/wireless/sme.c:38:6: warning: symbol 'cfg80211_is_all_idle' was not declared. Should it be static?
      
      It is not used elsewhere, so mark it static.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      20925fee