1. 28 10月, 2009 1 次提交
  2. 13 10月, 2009 1 次提交
    • J
      mac80211: document ieee80211_rx() context requirement · d20ef63d
      Johannes Berg 提交于
      ieee80211_rx() must be called with softirqs disabled
      since the networking stack requires this for netif_rx()
      and some code in mac80211 can assume that it can not
      be processing its own tasklet and this call at the same
      time.
      
      It may be possible to remove this requirement after a
      careful audit of mac80211 and doing any needed locking
      improvements in it along with disabling softirqs around
      netif_rx(). An alternative might be to push all packet
      processing to process context in mac80211, instead of
      to the tasklet, and add other synchronisation.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d20ef63d
  3. 08 10月, 2009 1 次提交
    • J
      mac80211: fix vlan and optimise RX · fbc44bf7
      Johannes Berg 提交于
      When receiving data frames, we can send them only to
      the interface they belong to based on transmitting
      station (this doesn't work for probe requests). Also,
      don't try to handle other frames for AP_VLAN at all
      since those interface should only receive data.
      
      Additionally, the transmit side must check that the
      station we're sending a frame to is actually on the
      interface we're transmitting on, and not transmit
      packets to functions that live on other interfaces,
      so validate that as well.
      
      Another bug fix is needed in sta_info.c where in the
      VLAN case when adding/removing stations we overwrite
      the sdata variable we still need.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fbc44bf7
  4. 29 8月, 2009 3 次提交
  5. 20 8月, 2009 1 次提交
  6. 14 8月, 2009 1 次提交
    • J
      mac80211: Use 3-address format for mesh broadcast frames. · 3c5772a5
      Javier Cardona 提交于
      The 11s task group recently changed the frame mesh multicast/broadcast frame
      format to use 3-address.  This was done to avoid interactions with widely
      deployed lazy-WDS access points.
      
      This patch changes the format of group addressed frames, both mesh-originated
      and proxied, to use the data format defined in draft D2.08 and forward.  The
      address fields used for group addressed frames is:
      
      In 802.11 header
       ToDS:0  FromDS:1
       addr1: DA  (broadcast/multicast address)
       addr2: TA
       addr3: Mesh SA
      
      In address extension header:
       addr4: SA  (only present if frame was proxied)
      
      Note that this change breaks backward compatibility with earlier mesh stack
      versions.
      Signed-off-by: NAndrey Yurovsky <andrey@cozybit.com>
      Signed-off-by: NJavier Cardona <javier@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3c5772a5
  7. 30 7月, 2009 1 次提交
  8. 28 7月, 2009 4 次提交
    • J
      mac80211: fix PS-poll response, race · 3fa52056
      Johannes Berg 提交于
      When a station queries us for a PS-poll response, we wrongly
      queue the frame on the virtual interface's queue rather than
      the pending queue.
      
      Additionally, fix a race condition where we could potentially
      send multiple frames to the sleeping station due to using a
      station flag rather than a packet flag. When converting to a
      packet flag, we can also convert p54 and remove the filter
      clearing we added for it.
      
      (Also remove a now dead function)
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Reported-by: NBob Copeland <me@bobcopeland.com>
      Tested-by: NBob Copeland <me@bobcopeland.com>
      Cc: Christian Lamparter <chunkeey@web.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3fa52056
    • H
      mac80211: implement basic background scanning · 142b9f50
      Helmut Schaa 提交于
      Introduce a new scan flag "SCAN_OFF_CHANNEL" which basically tells us
      that we are currently on a different channel for scanning and cannot
      RX/TX. "SCAN_SW_SCANNING" tells us that we are currently running a
      software scan but we might as well be on the operating channel to RX/TX.
      While "SCAN_SW_SCANNING" is set during the whole scan "SCAN_OFF_CHANNEL"
      is set when leaving the operating channel and unset when coming back.
      
      Introduce two new scan states "SCAN_LEAVE_OPER_CHANNEL" and
      "SCAN_ENTER_OPER_CHANNEL" which basically implement the functionality we
      need to leave the operating channel (send a nullfunc to the AP and stop
      the queues) and enter it again (send a nullfunc to the AP and start the
      queues again).
      
      Enhance the scan state "SCAN_DECISION" to switch back to the operating
      channel after each scanned channel. In the future it sould be simple
      to enhance the decision state to scan as much channels in a row as the
      qos latency allows us.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      142b9f50
    • H
      mac80211: Replace {sw, hw}_scanning variables with a bitfield · fbe9c429
      Helmut Schaa 提交于
      Use a bitfield to store the current scan mode instead of two boolean
      variables {sw,hw}_scanning. This patch does not introduce functional
      changes but allows us to enhance the scan flags later (for example
      for background scanning).
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fbe9c429
    • J
      mac80211: cooperate more with network namespaces · 5061b0c2
      Johannes Berg 提交于
      There are still two places in mac80211 that hardcode
      the initial net namespace (init_net). One of them is
      mandated by cfg80211 and will be removed by a separate
      patch, the other one is used for finding the network
      device of a pending packet via its ifindex.
      
      Remove the latter use by keeping track of the device
      pointer itself, via the vif pointer, and avoid it
      going stale by dropping pending frames for a given
      interface when the interface is removed.
      
      To keep track of the vif pointer for the correct
      interface, change the info->control.vif pointer's
      internal use to always be the correct vif, and only
      move it to the vif the driver expects (or NULL for
      monitor interfaces and injected packets) right before
      giving the packet to the driver.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5061b0c2
  9. 25 7月, 2009 3 次提交
  10. 11 7月, 2009 3 次提交
  11. 11 6月, 2009 2 次提交
  12. 23 5月, 2009 1 次提交
  13. 21 5月, 2009 1 次提交
    • J
      mac80211: move channel switch code · cc32abd4
      Johannes Berg 提交于
      The channel switch code is currently in the spectrum
      management file, where arguably it belongs. However,
      it is for managed mode only and uses the structures
      for that mode only so having it in a more generic
      file can be confusing. Additionally, my next patch
      gets simpler with the code here.
      
      When/if we ever implement this for IBSS or mesh then
      we will need to rework the structures it uses anyway
      at which point we could move the code back.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cc32abd4
  14. 12 5月, 2009 2 次提交
    • J
      mac80211: MFP - Drop unprotected Action frames prior key setup · f2ca3ea4
      Jouni Malinen 提交于
      When management frame protection (IEEE 802.11w) is used, unprotected
      Robust Action frames are not allowed prior to key configuration.
      However, unprotected Deauthentication and Disassociation frames are
      allowed at that point, but not after key configuration.
      
      Make ieee80211_drop_unencrypted() handle the special cases for MFP by
      separating the basic Data frame case from Management frame processing
      and handle the Management frames only if MFP has been negotiated. In
      addition, do not use sdata->drop_unencrypted for Management frames
      since the decision on whether to accept the frame depends on the key
      being configured.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f2ca3ea4
    • J
      mac80211: Drop unencrypted frames based on key setup · 0c7c10c7
      Jouni Malinen 提交于
      When using nl80211, we do not have a mechanism to set
      sdata->drop_unencrypted. Currently, this breaks code that is supposed
      to drop unencrypted frames when protection is expected since
      ieee80211_rx_h_decrypt() is optimized to not set rx->key when the
      frame is not protected.
      
      This patch modifies ieee80211_rx_h_decrypt() to set rx->key for all
      frames and only skip decryption if the frame is not protected. This
      allows ieee80211_drop_unencrypted() to correctly drop frames even if
      drop_unencrypted is not set.
      
      The changes here are not enough to handle all cases, though. Additional
      patches will be needed to implement proper IEEE 802.1X PAE for station
      mode (currently, this is only used for AP mode) and some additional
      rules are needed for MFP to drop unprotected Robust Action frames prior
      to having PTK and IGTK configured.
      
      In theory, the unprotected frames could and should be dropped in
      ieee80211_rx_h_decrypt(). However, due to the special case with EAPOL
      frames that have to be allowed to be received unprotected even when
      keys are set, it is simpler to only set rx->key and allow the
      ieee80211_frame_allowed() function to handle the actual dropping of
      data frames after 802.11->802.3 header conversion. In addition,
      unprotected robust management frames are dropped before they are
      processed.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0c7c10c7
  15. 07 5月, 2009 4 次提交
  16. 23 4月, 2009 1 次提交
    • J
      nl80211: Add Michael MIC failure event · a3b8b056
      Jouni Malinen 提交于
      Define a new nl80211 event, NL80211_CMD_MICHAEL_MIC_FAILURE, to be
      used to notify user space about locally detected Michael MIC failures.
      This matches with the MLME-MICHAELMICFAILURE.indication() primitive.
      
      Since we do not actually have TSC in the skb anymore when
      mac80211_ev_michael_mic_failure() is called, that function is changed
      to take in the TSC as an optional parameter instead of as a
      requirement to include the TSC after the hdr field (which we did not
      really follow). For now, TSC is not included in the events from
      mac80211, but it could be added at some point.
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a3b8b056
  17. 22 4月, 2009 1 次提交
  18. 16 4月, 2009 1 次提交
  19. 28 3月, 2009 5 次提交
  20. 28 2月, 2009 1 次提交
    • J
      mac80211: split IBSS/managed code · 46900298
      Johannes Berg 提交于
      This patch splits out the ibss code and data from managed (station) mode.
      The reason to do this is to better separate the state machines, and have
      the code be contained better so it gets easier to determine what exactly
      a given change will affect, that in turn makes it easier to understand.
      
      This is quite some churn, especially because I split sdata->u.sta into
      sdata->u.mgd and sdata->u.ibss, but I think it's easier to maintain that
      way. I've also shuffled around some code -- null function sending is only
      applicable to managed interfaces so put that into that file, some other
      functions are needed from various places so put them into util, and also
      rearranged the prototypes in ieee80211_i.h accordingly.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      46900298
  21. 14 2月, 2009 2 次提交