1. 30 7月, 2009 3 次提交
  2. 25 7月, 2009 2 次提交
    • Z
      cfg80211: fix NULL dereference in IBSS SIOCGIWAP · 80e5b06a
      Zhu Yi 提交于
      This patch avoids memcpy from wdev->wext.ibss.bssid if it is NULL.
      This could happen if we SIOCGIWAP before SIOCSIWAP.
      Signed-off-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      80e5b06a
    • J
      cfg80211: rework key operation · fffd0934
      Johannes Berg 提交于
      This reworks the key operation in cfg80211, and now only
      allows, from userspace, configuring keys (via nl80211)
      after the connection has been established (in managed
      mode), the IBSS been joined (in IBSS mode), at any time
      (in AP[_VLAN] modes) or never for all the other modes.
      
      In order to do shared key authentication correctly, it
      is now possible to give a WEP key to the AUTH command.
      To configure static WEP keys, these are given to the
      CONNECT or IBSS_JOIN command directly, for a userspace
      SME it is assumed it will configure it properly after
      the connection has been established.
      
      Since mac80211 used to check the default key in IBSS
      mode to see whether or not the network is protected,
      it needs an update in that area, as well as an update
      to make use of the WEP key passed to auth() for shared
      key authentication.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fffd0934
  3. 11 7月, 2009 4 次提交
    • J
      cfg80211: fix locking · 667503dd
      Johannes Berg 提交于
      Over time, a lot of locking issues have crept into
      the smarts of cfg80211, so e.g. scan completion can
      race against a new scan, IBSS join can race against
      leaving an IBSS, etc.
      
      Introduce a new per-interface lock that protects
      most of the per-interface data that we need to keep
      track of, and sprinkle assertions about that lock
      everywhere. Some things now need to be offloaded to
      work structs so that we don't require being able to
      sleep in functions the drivers call. The exception
      to that are the MLME callbacks (rx_auth etc.) that
      currently only mac80211 calls because it was easier
      to do that there instead of in cfg80211, and future
      drivers implementing those calls will, if they ever
      exist, probably need to use a similar scheme like
      mac80211 anyway...
      
      In order to be able to handle _deauth and _disassoc
      properly, introduce a cookie passed to it that will
      determine locking requirements.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      667503dd
    • J
      cfg80211: fix netdev down problem · 78485475
      Johannes Berg 提交于
      We shouldn't be looking at the ssid_len for non-IBSS,
      and for IBSS we should also return an error on trying
      to leave an IBSS while not in or joining an IBSS.
      
      This fixes an issue where we wouldn't disconnect() on
      an interface being taken down since there's no SSID
      configured this way.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      78485475
    • J
      cfg80211: keep track of BSSes · 19957bb3
      Johannes Berg 提交于
      In order to avoid problems with BSS structs going away
      while they're in use, I've long wanted to make cfg80211
      keep track of them. Without the SME, that wasn't doable
      but now that we have the SME we can do this too. It can
      keep track of up to four separate authentications and
      one association, regardless of whether it's controlled
      by the cfg80211 SME or the userspace SME.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19957bb3
    • J
      cfg80211: remove wireless_dev->bssid · 7ebbe6bd
      Johannes Berg 提交于
      This variable isn't necessary -- the wext code keeps
      track of the BSSID itself, and otherwise we have
      current_bss.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7ebbe6bd
  4. 12 5月, 2009 1 次提交
  5. 23 4月, 2009 4 次提交