1. 17 5月, 2013 1 次提交
    • J
      cfg80211: fix wiphy_register error path · 03cd7e4e
      Johannes Berg 提交于
      If rfkill_register() fails in wiphy_register() the struct device
      is unregistered but everything else isn't (regulatory, debugfs)
      and we even leave the wiphy instance on all internal lists even
      though it will likely be freed soon, which is clearly a problem.
      Fix this by cleaning up properly.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      03cd7e4e
  2. 30 4月, 2013 1 次提交
  3. 22 4月, 2013 3 次提交
  4. 19 4月, 2013 1 次提交
  5. 16 4月, 2013 2 次提交
    • J
      cfg80211: add ieee80211_operating_class_to_band · 1ce3e82b
      Johannes Berg 提交于
      This function converts a (global only!) operating
      class to an internal band identifier. This will
      be needed for extended channel switch support.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1ce3e82b
    • J
      wireless: regulatory: fix channel disabling race condition · 990de49f
      Johannes Berg 提交于
      When a full scan 2.4 and 5 GHz scan is scheduled, but then the 2.4 GHz
      part of the scan disables a 5.2 GHz channel due to, e.g. receiving
      country or frequency information, that 5.2 GHz channel might already
      be in the list of channels to scan next. Then, when the driver checks
      if it should do a passive scan, that will return false and attempt an
      active scan. This is not only wrong but can also lead to the iwlwifi
      device firmware crashing since it checks regulatory as well.
      
      Fix this by not setting the channel flags to just disabled but rather
      OR'ing in the disabled flag. That way, even if the race happens, the
      channel will be scanned passively which is still (mostly) correct.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      990de49f
  6. 31 3月, 2013 1 次提交
    • A
      cfg80211: sched_scan_mtx lock in cfg80211_conn_work() · 90e0970f
      Artem Savkov 提交于
      Introduced in f9f47529
      ("cfg80211: always check for scan end on P2P device")
      
      cfg80211_conn_scan() which requires sched_scan_mtx to be held can be called
      from cfg80211_conn_work(). Without this we are hitting multiple warnings like
      the following:
      
      WARNING: at net/wireless/sme.c:88 cfg80211_conn_scan+0x1dc/0x3a0 [cfg80211]()
      Hardware name: 0578A21
      Modules linked in: ...
      Pid: 620, comm: kworker/3:1 Not tainted 3.9.0-rc4-next-20130328+ #326
      Call Trace:
       [<c1036992>] warn_slowpath_common+0x72/0xa0
       [<c10369e2>] warn_slowpath_null+0x22/0x30
       [<faa4b0ec>] cfg80211_conn_scan+0x1dc/0x3a0 [cfg80211]
       [<faa4b344>] cfg80211_conn_do_work+0x94/0x380 [cfg80211]
       [<faa4c3b2>] cfg80211_conn_work+0xa2/0x130 [cfg80211]
       [<c1051858>] process_one_work+0x198/0x450
      Signed-off-by: NArtem Savkov <artem.savkov@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      90e0970f
  7. 28 3月, 2013 1 次提交
    • S
      net: add ETH_P_802_3_MIN · e5c5d22e
      Simon Horman 提交于
      Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for
      an 802.3 frame. Frames with a lower value in the ethernet type field
      are Ethernet II.
      
      Also update all the users of this value that David Miller and
      I could find to use the new constant.
      
      Also correct a bug in util.c. The comparison with ETH_P_802_3_MIN
      should be >= not >.
      
      As suggested by Jesse Gross.
      
      Compile tested only.
      
      Cc: David Miller <davem@davemloft.net>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: John W. Linville <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Bart De Schuymer <bart.de.schuymer@pandora.be>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: linux-bluetooth@vger.kernel.org
      Cc: netfilter-devel@vger.kernel.org
      Cc: bridge@lists.linux-foundation.org
      Cc: linux-wireless@vger.kernel.org
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: linux-media@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: dev@openvswitch.org
      Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Acked-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5c5d22e
  8. 24 3月, 2013 1 次提交
    • J
      cfg80211: always check for scan end on P2P device · f9f47529
      Johannes Berg 提交于
      If a P2P device wdev is removed while it has a scan, then the
      scan completion might crash later as it is already freed by
      that time. To avoid the crash always check the scan completion
      when the P2P device is being removed for some reason. If the
      driver already canceled it, don't want and free it, otherwise
      warn and leak it to avoid later crashes.
      
      In order to do this, locking needs to be changed away from the
      rdev mutex (which can't always be guaranteed). For now, use
      the sched_scan_mtx instead, I'll rename it to just scan_mtx in
      a later patch.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f9f47529
  9. 21 3月, 2013 1 次提交
  10. 20 3月, 2013 2 次提交
  11. 07 3月, 2013 2 次提交
  12. 06 3月, 2013 19 次提交
  13. 01 3月, 2013 1 次提交
    • J
      nl80211: increase wiphy dump size dynamically · 645e77de
      Johannes Berg 提交于
      Given a device with many channels capabilities the wiphy
      information can still overflow even though its size in
      3.9 was reduced to 3.8 levels. For new userspace and
      kernel 3.10 we're going to implement a new "split dump"
      protocol that can use multiple messages per wiphy.
      
      For now though, add a workaround to be able to send more
      information to userspace. Since generic netlink doesn't
      have a way to set the minimum dump size globally, and we
      wouldn't really want to set it globally anyway, increase
      the size only when needed, as described in the comments.
      As userspace might not be prepared for large buffers, we
      can only use 4k.
      
      Also increase the size for the get_wiphy command.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      645e77de
  14. 27 2月, 2013 1 次提交
  15. 26 2月, 2013 2 次提交
    • J
      nl80211: remove TCP WoWLAN information · 162589f7
      Johannes Berg 提交于
      Just like the radar information, the TCP WoWLAN capability
      data can increase the wiphy information and make it too
      big. Remove the TCP WoWLAN information; no driver supports
      it and new userspace tools will be required as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      162589f7
    • J
      nl80211: remove radar information · 1c33a059
      Johannes Berg 提交于
      The wiphy information is getting very close to being too
      much for a typical netlink dump message and adding the
      radar attributes to channels and interface combinations
      can push it over the limit, which means userspace gets no
      information whatsoever. Therefore, remove these again for
      now, no driver actually supports radar detection anyway
      and a modified userspace is required as well.
      
      We're working on a solution that will allow userspace to
      request splitting the information across multiple netlink
      messages, which will allow us to add this back.
      
      Cc: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1c33a059
  16. 19 2月, 2013 1 次提交