1. 16 1月, 2010 1 次提交
    • L
      cfg80211: make regulatory_hint_11d() band specific · 84920e3e
      Luis R. Rodriguez 提交于
      In practice APs do not send country IE channel triplets for channels
      the AP is not operating on and if they were to do so they would have
      to use the regulatory extension which we currently do not process.
      No AP has been seen in practice that does this though so just drop
      those country IEs.
      
      Additionally it has been noted the first series of country IE
      channels triplets are specific to the band the AP sends. Propagate
      the band on which the country IE was found on reject the country
      IE then if the triplets are ever oustide of the band.
      
      Although we now won't process country IE information with multiple
      band information we leave the intersection work as is as it is
      technically possible for someone to want to eventually process these
      type of country IEs with regulatory extensions.
      
      Cc: Jouni Malinen <jouni.malinen@atheros.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      84920e3e
  2. 29 11月, 2009 1 次提交
    • A
      wireless : use a dedicated workqueue for cfg80211. · e60d7443
      Alban Browaeys 提交于
      This patch moves the works cleanup, scan and events to a cfg80211
      dedicated workqueue.
      
      Platform driver like eeepc-laptop ought to use works to rfkill (as
      new rfkill does lock in rfkill_unregister and the platform driver is
      called from rfkill_switch_all which also lock the same mutex).
      This raise a new issue in itself that the work scheduled by the platform
      driver to the global worqueue calls wiphy_unregister which flush_work
      scan and event works (which thus flush works on the global workqueue inside
      a work on the global workqueue) and also put on hold the  wdev_cleanup_work
       (which prevents the dev_put on netdev thus indefinite Usage count error on
      wifi device).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NAlban Browaeys <prahal@yahoo.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e60d7443
  3. 03 11月, 2009 1 次提交
  4. 28 10月, 2009 1 次提交
  5. 08 10月, 2009 1 次提交
    • J
      wext: refactor · 3d23e349
      Johannes Berg 提交于
      Refactor wext to
       * split out iwpriv handling
       * split out iwspy handling
       * split out procfs support
       * allow cfg80211 to have wireless extensions compat code
         w/o CONFIG_WIRELESS_EXT
      
      After this, drivers need to
       - select WIRELESS_EXT	- for wext support
       - select WEXT_PRIV	- for iwpriv support
       - select WEXT_SPY	- for iwspy support
      
      except cfg80211 -- which gets new hooks in wext-core.c
      and can then get wext handlers without CONFIG_WIRELESS_EXT.
      
      Wireless extensions procfs support is auto-selected
      based on PROC_FS and anything that requires the wext core
      (i.e. WIRELESS_EXT or CFG80211_WEXT).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d23e349
  6. 29 9月, 2009 1 次提交
    • J
      cfg80211: always get BSS · 8bb89485
      Johannes Berg 提交于
      Multiple problems were reported due to interaction
      between wpa_supplicant and the wext compat code in
      cfg80211, which appear to be due to it not getting
      any bss pointer here when wpa_supplicant sets all
      parameters -- do that now. We should still get the
      bss after doing an extra scan, but that appears to
      increase the time we need for connecting enough to
      sometimes cause timeouts.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Tested-by: Hin-Tak Leung <hintak.leung@gmail.com>,
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8bb89485
  7. 23 9月, 2009 1 次提交
    • J
      cfg80211: fix SME connect · 90c215c4
      Johannes Berg 提交于
      There's a check saying
      	/* we're good if we have both BSSID and channel */
      	if (wdev->conn->params.bssid && wdev->conn->params.channel) {
      
      but that isn't true -- we need the BSS struct. This leads
      to errors such as
      
          Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz)
          ioctl[SIOCSIWFREQ]: No such file or directory
          ioctl[SIOCSIWESSID]: No such file or directory
          Association request to the driver failed
          Associated with 00:1b:53:11:dc:40
      
      in wpa_supplicant, as reported by Holger.
      
      Instead, we really need to have the BSS struct, and if we
      don't, then we need to initiate a scan for it. But we may
      already have the BSS struct here, so hang on to it if we
      do and scan if we don't.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Tested-by: NHolger Schurig <hs4233@mail.mn-solutions.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      90c215c4
  8. 17 9月, 2009 1 次提交
    • J
      cfg80211: fix SME connect · bbac31f4
      Johannes Berg 提交于
      There's a check saying
      	/* we're good if we have both BSSID and channel */
      	if (wdev->conn->params.bssid && wdev->conn->params.channel) {
      
      but that isn't true -- we need the BSS struct. This leads
      to errors such as
      
          Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz)
          ioctl[SIOCSIWFREQ]: No such file or directory
          ioctl[SIOCSIWESSID]: No such file or directory
          Association request to the driver failed
          Associated with 00:1b:53:11:dc:40
      
      in wpa_supplicant, as reported by Holger.
      
      Instead, we really need to have the BSS struct, and if we
      don't, then we need to initiate a scan for it. But we may
      already have the BSS struct here, so hang on to it if we
      do and scan if we don't.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Tested-by: NHolger Schurig <hs4233@mail.mn-solutions.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bbac31f4
  9. 29 8月, 2009 1 次提交
    • J
      cfg80211: make spurious warnings less likely, configurable · f7969969
      Johannes Berg 提交于
      Bob reported that he got warnings in IBSS mode about
      the ssid_len being zero on a joined event, but only
      when kmemcheck was enabled. This appears to be due
      to a race condition between drivers and userspace,
      when the driver reports joined but the user in the
      meantime decided to leave the IBSS again, the warning
      would trigger. This was made more likely by kmemcheck
      delaying the code that does the check and sends the
      event.
      
      So first, make the warning trigger closer to the
      driver, which means it's not locked, but since only
      the warning depends on it that's ok.
      
      And secondly, users will not want to have spurious
      warnings at all, so make those that are known to be
      racy in such a way configurable.
      Reported-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f7969969
  10. 20 8月, 2009 3 次提交
  11. 14 8月, 2009 5 次提交
    • J
      cfg80211: fix alignment problem in scan request · 5ba63533
      Johannes Berg 提交于
      The memory layout for scan requests was rather wrong,
      we put the scan SSIDs before the channels which could
      lead to the channel pointers being unaligned in memory.
      It turns out that using a pointer to the channel array
      isn't necessary anyway since we can embed a zero-length
      array into the struct.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5ba63533
    • J
      cfg80211: use reassociation when possible · f401a6f7
      Johannes Berg 提交于
      With the move of everything related to the SME from
      mac80211 to cfg80211, we lost the ability to send
      reassociation frames. This adds them back, but only
      for wireless extensions. With the userspace SME, it
      shall control assoc vs. reassoc (it already can do
      so with the nl80211 interface).
      
      I haven't touched the connect() implementation, so
      it is not possible to reassociate with the nl80211
      connect primitive. I think that should be done with
      the NL80211_CMD_ROAM command, but we'll have to see
      how that can be handled in the future, especially
      with fullmac chips.
      
      This patch addresses only the immediate regression
      we had in mac80211, which previously sent reassoc.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f401a6f7
    • J
      cfg80211: validate channel settings across interfaces · 59bbb6f7
      Johannes Berg 提交于
      Currently, there's a problem that affects regulatory
      enforcement and connection stability, in that it is
      possible to switch the channel while connected to a
      network or joined to an IBSS.
      
      The problem comes from the fact that we only validate
      the channel against the current interface's type, not
      against any other interface. Thus, you have any type
      of interface up, additionally bring up a monitor mode
      interface and switch the channel on the monitor. This
      will obviously also switch the channel on the other
      interface.
      
      The problem now is that if you do that while sending
      beacons for IBSS mode, you can switch to a disabled
      channel or a channel that doesn't allow beaconing.
      Combined with a managed mode interface connected to
      an AP instead of an IBSS interface, you can easily
      break the connection that way.
      
      To fix this, this patch validates any channel change
      with all available interfaces, and disallows such
      changes on secondary interfaces if another interface
      is connected to an AP or joined to an IBSS.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      59bbb6f7
    • S
      cfg80211: Set WEP ciphers · bcba8eae
      Samuel Ortiz 提交于
      With iwconfig there is no way to properly set the ciphers when trying to
      connect to a WEP SSID. Although mac80211 based drivers dont need it, several
      fullmac drivers do.
      This patch basically sets the WEP ciphers whenever they're not set at all.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bcba8eae
    • J
      cfg80211: fix SME association after disassociation · b6f0b639
      Johannes Berg 提交于
      When an AP disassociates us, we currently go into a weird
      state because the SME doesn't handle authenticated but not
      associated well unless it's within its own state machine,
      it can't recover from that. However, it shouldn't need to,
      since we don't do any decisions in it really -- so when we
      get disconnected, simply deauthenticate too.
      Reported-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b6f0b639
  12. 05 8月, 2009 3 次提交
  13. 30 7月, 2009 1 次提交
  14. 28 7月, 2009 1 次提交
    • J
      cfg80211: make aware of net namespaces · 463d0183
      Johannes Berg 提交于
      In order to make cfg80211/nl80211 aware of network namespaces,
      we have to do the following things:
      
       * del_virtual_intf method takes an interface index rather
         than a netdev pointer - simply change this
      
       * nl80211 uses init_net a lot, it changes to use the sender's
         network namespace
      
       * scan requests use the interface index, hold a netdev pointer
         and reference instead
      
       * we want a wiphy and its associated virtual interfaces to be
         in one netns together, so
          - we need to be able to change ns for a given interface, so
            export dev_change_net_namespace()
          - for each virtual interface set the NETIF_F_NETNS_LOCAL
            flag, and clear that flag only when the wiphy changes ns,
            to disallow breaking this invariant
      
       * when a network namespace goes away, we need to reparent the
         wiphy to init_net
      
       * cfg80211 users that support creating virtual interfaces must
         create them in the wiphy's namespace, currently this affects
         only mac80211
      
      The end result is that you can now switch an entire wiphy into
      a different network namespace with the new command
      	iw phy#<idx> set netns <pid>
      and all virtual interfaces will follow (or the operation fails).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      463d0183
  15. 25 7月, 2009 5 次提交
  16. 11 7月, 2009 8 次提交