1. 15 2月, 2013 1 次提交
  2. 12 2月, 2013 6 次提交
    • S
      mac80211: Fix tx queue handling during scans · 6c17b77b
      Seth Forshee 提交于
      Scans currently work by stopping the netdev tx queues but leaving the
      mac80211 queues active. This stops the flow of incoming packets while
      still allowing mac80211 to transmit nullfunc and probe request frames to
      facilitate scanning. However, the driver may try to wake the mac80211
      queues while in this state, which will also wake the netdev queues.
      
      To prevent this, add a new queue stop reason,
      IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, to be used when stopping the tx
      queues for off-channel operation. This prevents the netdev queues from
      waking when a driver wakes the mac80211 queues.
      
      This also stops all frames from being transmitted, even those meant to
      be sent off-channel. Add a new tx control flag,
      IEEE80211_TX_CTL_OFFCHAN_TX_OK, which allows frames to be transmitted
      when the queues are stopped only for the off-channel stop reason. Update
      all locations transmitting off-channel frames to use this flag.
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6c17b77b
    • J
      mac80211: simplify idle handling · fd0f979a
      Johannes Berg 提交于
      Now that we have channel contexts, idle is (pretty
      much) equivalent to not having a channel context.
      Change the code to use this relation so that there
      no longer is a need for a lot of idle recalculate
      calls everywhere.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fd0f979a
    • J
      mac80211: remove dynamic PS driver interface · 09b85568
      Johannes Berg 提交于
      The functions were added for some sort of Bluetooth
      coexistence, but aren't used, so remove them again.
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      09b85568
    • J
      mac80211: introduce beacon-only timing data · ef429dad
      Johannes Berg 提交于
      In order to be able to predict the next DTIM TBTT
      in the driver, add the ability to use timing data
      from beacons only with the new hardware flag
      IEEE80211_HW_TIMING_BEACON_ONLY and the BSS info
      value sync_dtim_count which is only valid if the
      timing data came from a beacon. The data can only
      come from a beacon, and if no beacon was received
      before association it is updated later together
      with the DTIM count notification.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ef429dad
    • J
      mac80211: explicitly copy channels to VLANs where needed · 1f4ac5a6
      Johannes Berg 提交于
      Currently the code assigns channel contexts to VLANs
      (for use by the TX/RX code) when the AP master gets
      its channel context assigned. This works fine, but
      in the upcoming radar detection work the VLANs don't
      require a channel context (during radar detection)
      and assigning one to them anyway causes issues with
      locking and also inconsistencies -- a VLAN interface
      that is added before radar detection would get the
      channel context, while one added during it wouldn't.
      
      Fix these issues moving the channel context copying
      to a new explicit operation that will not be used
      in the radar detection code.
      Acked-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1f4ac5a6
    • C
      mac80211: protect rx-path with spinlock · f9e124fb
      Christian Lamparter 提交于
      This patch fixes the problem which was discussed in
      "mac80211: Fix PN corruption in case of multiple
      virtual interface" [1].
      
      Amit Shakya reported a serious issue with my patch:
      mac80211: serialize rx path workers" [2]:
      
      In case, ieee80211_rx_handlers processing is going on
      for skbs received on one vif and at the same time, rx
      aggregation reorder timer expires on another vif then
      sta_rx_agg_reorder_timer_expired is invoked and it will
      push skbs into the single queue (local->rx_skb_queue).
      
      ieee80211_rx_handlers in the while loop assumes that
      the skbs are for the same sdata and sta. This assumption
      doesn't hold good in this scenario and the PN gets
      corrupted by PN received in other vif's skb, causing
      traffic to stop due to PN mismatch."
      
      [1] Message-Id: http://mid.gmane.org/201302041844.44436.chunkeey@googlemail.com
      [2] Commit-Id: 24a8fdadReported-by: NAmit Shakya <amit.shakya@stericsson.com>
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f9e124fb
  3. 05 2月, 2013 2 次提交
    • M
      mac80211: mesh power save basics · 3f52b7e3
      Marco Porsch 提交于
      Add routines to
      - maintain a PS mode for each peer and a non-peer PS mode
      - indicate own PS mode in transmitted frames
      - track neighbor STAs power modes
      - buffer frames when neighbors are in PS mode
      - add TIM and Awake Window IE to beacons
      - release frames in Mesh Peer Service Periods
      
      Add local_pm to sta_info to represent the link-specific power
      mode at this station towards the remote station. When a peer
      link is established, use the default power mode stored in mesh
      config. Update the PS status if the peering status of a neighbor
      changes.
      Maintain a mesh power mode for non-peer mesh STAs. Set the
      non-peer power mode to active mode during peering. Authenticated
      mesh peering is currently not working when either node is
      configured to be in power save mode.
      
      Indicate the current power mode in transmitted frames. Use QoS
      Nulls to indicate mesh power mode transitions.
      For performance reasons, calls to the function setting the frame
      flags are placed in HWMP routing routines, as there the STA
      pointer is already available.
      
      Add peer_pm to sta_info to represent the peer's link-specific
      power mode towards the local station. Add nonpeer_pm to
      represent the peer's power mode towards all non-peer stations.
      Track power modes based on received frames.
      
      Add the ps_data structure to ieee80211_if_mesh (for TIM map, PS
      neighbor counter and group-addressed frame buffer).
      
      Set WLAN_STA_PS flag for STA in PS mode to use the unicast frame
      buffering routines in the tx path. Update num_sta_ps to buffer
      and release group-addressed frames after DTIM beacons.
      
      Announce the awake window duration in beacons if in light or
      deep sleep mode towards any peer or non-peer. Create a TIM IE
      similarly to AP mode and add it to mesh beacons. Parse received
      Awake Window IEs and check TIM IEs for buffered frames.
      
      Release frames towards peers in mesh Peer Service Periods. Use
      the corresponding trigger frames and monitor the MPSP status.
      Append a QoS Null as trigger frame if neccessary to properly end
      the MPSP. Currently, in HT channels MPSPs behave imperfectly and
      show large delay spikes and frame losses.
      Signed-off-by: NMarco Porsch <marco@cozybit.com>
      Signed-off-by: NIvan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
      Signed-off-by: NMike Krinkin <krinkin.m.u@gmail.com>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3f52b7e3
    • J
      mac80211: remove unused SSID from BSS · 3146a7da
      Johannes Berg 提交于
      The ssid/ssid_len fields in the private BSS
      struct are unused, contrary to the comment
      we do look up the SSID in the few cases we
      need it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3146a7da
  4. 04 2月, 2013 1 次提交
    • J
      mac80211: always allow calling ieee80211_connection_loss() · 682bd38b
      Johannes Berg 提交于
      With multi-channel, there's a corner case where a driver
      doesn't receive a beacon soon enough to be able to sync
      its timers with the AP. In this case, the only recovery
      (after trying again) is to disconnect from the AP. Allow
      calling ieee80211_connection_loss() for such cases. To
      make that possible, modify the work function to not rely
      on the IEEE80211_HW_CONNECTION_MONITOR flag but use new
      state kept in the interface instead.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      682bd38b
  5. 31 1月, 2013 5 次提交
  6. 19 1月, 2013 2 次提交
  7. 16 1月, 2013 1 次提交
    • S
      mac80211: synchronize scan off/on-channel and PS states · aacde9ee
      Stanislaw Gruszka 提交于
      Since:
      
      commit b23b025f
      Author: Ben Greear <greearb@candelatech.com>
      Date:   Fri Feb 4 11:54:17 2011 -0800
      
          mac80211: Optimize scans on current operating channel.
      
      we do not disable PS while going back to operational channel (on
      ieee80211_scan_state_suspend) and deffer that until scan finish.
      But since we are allowed to send frames, we can send a frame to AP
      without PM bit set, so disable PS on AP side. Then when we switch
      to off-channel (in ieee80211_scan_state_resume) we do not enable PS.
      Hence we are off-channel with PS disabled, frames are not buffered
      by AP.
      
      To fix remove offchannel_ps_disable argument and always enable PS when
      going off-channel and disable it when going on-channel, like it was
      before.
      
      Cc: stable@vger.kernel.org # 2.6.39+
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Tested-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      aacde9ee
  8. 03 1月, 2013 10 次提交
  9. 30 11月, 2012 1 次提交
  10. 27 11月, 2012 1 次提交
  11. 26 11月, 2012 2 次提交
    • J
      mac80211: convert to channel definition struct · 4bf88530
      Johannes Berg 提交于
      Convert mac80211 (and where necessary, some drivers a
      little bit) to the new channel definition struct.
      
      This will allow extending mac80211 for VHT, which is
      currently restricted to channel contexts since there
      are no drivers using that which makes it easier. As
      I also don't care about VHT for drivers not using the
      channel context API, I won't convert the previous API
      to VHT support.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4bf88530
    • J
      cfg80211: remove remain-on-channel channel type · 42d97a59
      Johannes Berg 提交于
      As mwifiex (and mac80211 in the software case) are the
      only drivers actually implementing remain-on-channel
      with channel type, userspace can't be relying on it.
      This is the case, as it's used only for P2P operations
      right now.
      
      Rather than adding a flag to tell userspace whether or
      not it can actually rely on it, simplify all the code
      by removing the ability to use different channel types.
      Leave only the validation of the attribute, so that if
      we extend it again later (with the needed capability
      flag), it can't break userspace sending invalid data.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      42d97a59
  12. 23 11月, 2012 1 次提交
  13. 14 11月, 2012 1 次提交
  14. 11 11月, 2012 1 次提交
  15. 06 11月, 2012 1 次提交
  16. 30 10月, 2012 2 次提交
    • J
      mac80211: use a counter for remain-on-channel cookie · 50febf6a
      Johannes Berg 提交于
      Instead of using the pointer which can be re-used
      fairly quickly due to allocator patterns and then
      makes debugging difficult, maintain a counter and
      use its value. Since it's a 64-bit value it can't
      really wrap, but catch that case anyway since it
      most likely points to a bug somewhere.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      50febf6a
    • J
      mac80211: handle TX power per virtual interface · 1ea6f9c0
      Johannes Berg 提交于
      Even before channel contexts/multi-channel, having a
      single global TX power limit was already problematic,
      in particular if two managed interfaces connected to
      two APs with different power constraints. The channel
      context introduction completely broke this though and
      in fact I had disabled TX power configuration there
      for drivers using channel contexts.
      
      Change everything to track TX power per interface so
      that different user settings and different channel
      maxima are treated correctly. Also continue tracking
      the global TX power though for compatibility with
      applications that attempt to configure the wiphy's
      TX power globally.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1ea6f9c0
  17. 19 10月, 2012 1 次提交
    • M
      mac80211: make client powersave independent of interface type · d012a605
      Marco Porsch 提交于
      This patch prepares mac80211 for a later implementation of mesh or
      ad-hoc powersave clients.
      The structures related to powersave (buffer, TIM map, counters) are
      moved from the AP-specific interface structure to a generic structure
      that can be embedded into any interface type.
      The functions related to powersave are prepared to allow easy
      extension with different interface types. For example with:
      
      + } else if (sta->sdata->vif.type == NL80211_IFTYPE_MESH_POINT) {
      +         ps = &sdata->u.mesh.ps;
      
      Some references to the AP's beacon structure are removed where they
      were obviously not used.
      
      The patch compiles without warning and has been briefly tested as AP
      interface with one client in PS mode.
      Signed-off-by: NMarco Porsch <marco.porsch@etit.tu-chemnitz.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d012a605
  18. 18 10月, 2012 1 次提交