1. 22 12月, 2009 1 次提交
    • J
      mac80211: make station management completely depend on vif · abe60632
      Johannes Berg 提交于
      The station management currently uses the virtual
      interface, but you cannot add the same station to
      multiple virtual interfaces if you're communicating
      with it in multiple ways.
      
      This restriction should be lifted so that in the
      future we can, for instance, support bluetooth 3
      with an access point that mac80211 is already
      associated to.
      
      We can do that by requiring all sta_info_get users
      to provide the virtual interface and making the RX
      code aware that an address may match more than one
      station struct. Thanks to the previous patches this
      one isn't all that large and except for the RX and
      TX status paths changes has low complexity.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      abe60632
  2. 05 12月, 2009 1 次提交
  3. 30 11月, 2009 1 次提交
  4. 29 11月, 2009 3 次提交
  5. 20 11月, 2009 1 次提交
    • J
      cfg80211: introduce capability for 4addr mode · 9bc383de
      Johannes Berg 提交于
      It's very likely that not many devices will support
      four-address mode in station or AP mode so introduce
      capability bits for both modes, set them in mac80211
      and check them when userspace tries to use the mode.
      Also, keep track of 4addr in cfg80211 (wireless_dev)
      and not in mac80211 any more. mac80211 can also be
      improved for the VLAN case by not looking at the
      4addr flag but maintaining the station pointer for
      it correctly. However, keep track of use_4addr for
      station mode in mac80211 to avoid all the derefs.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9bc383de
  6. 19 11月, 2009 5 次提交
  7. 14 11月, 2009 1 次提交
  8. 12 11月, 2009 3 次提交
  9. 07 11月, 2009 1 次提交
    • J
      mac80211: async station powersave handling · af818581
      Johannes Berg 提交于
      Some devices require that all frames to a station
      are flushed when that station goes into powersave
      mode before being able to send frames to that
      station again when it wakes up or polls -- all in
      order to avoid reordering and too many or too few
      frames being sent to the station when it polls.
      
      Normally, this is the case unless the station
      goes to sleep and wakes up very quickly again.
      But in that case, frames for it may be pending
      on the hardware queues, and thus races could
      happen in the case of multiple hardware queues
      used for QoS/WMM. Normally this isn't a problem,
      but with the iwlwifi mechanism we need to make
      sure the race doesn't happen.
      
      This makes mac80211 able to cope with the race
      with driver help by a new WLAN_STA_PS_DRIVER
      per-station flag that can be controlled by the
      driver and tells mac80211 whether it can transmit
      frames or not. This flag must be set according to
      very specific rules outlined in the documentation
      for the function that controls it.
      
      When we buffer new frames for the station, we
      normally set the TIM bit right away, but while
      the driver has blocked transmission to that sta
      we need to avoid that as well since we cannot
      respond to the station if it wakes up due to the
      TIM bit. Once the driver unblocks, we can set
      the TIM bit.
      
      Similarly, when the station just wakes up, we
      need to wait until all other frames are flushed
      before we can transmit frames to that station,
      so the same applies here, we need to wait for
      the driver to give the OK.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      af818581
  10. 31 10月, 2009 6 次提交
  11. 28 10月, 2009 1 次提交
  12. 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
  13. 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
  14. 29 8月, 2009 3 次提交
  15. 20 8月, 2009 1 次提交
  16. 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
  17. 30 7月, 2009 1 次提交
  18. 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
  19. 25 7月, 2009 3 次提交
  20. 11 7月, 2009 1 次提交
    • J
      mac80211: rework MLME for multiple authentications · 77fdaa12
      Johannes Berg 提交于
      Sit tight. This shakes up the world as you know
      it. Let go of your spaghetti tongs, they will no
      longer be required, the horrible statemachine in
      net/mac80211/mlme.c is no more...
      
      With the cfg80211 SME mac80211 now has much less
      to keep track of, but, on the other hand, for FT
      it needs to be able to keep track of at least one
      authentication being in progress while associated.
      So convert from a single state machine to having
      small ones for all the different things we need to
      do. For real FT it will still need work wrt. PS,
      but this should be a good step.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      77fdaa12