23 Nov, 2011

1 commit


22 Nov, 2011

1 commit


01 Nov, 2011

1 commit


15 Oct, 2011

2 commits

  • mac80211 already filled in the MCS rate info for rx'ed frames but tx'ed
    frames that are sent to a monitor interface during the status callback
    lack this information.

    Add the radiotap fields for MCS info to ieee80211_tx_status_rtap_hdr
    and populate them when sending tx'ed frames to the monitors.

    The needed headroom is only extended by one byte since we don't include
    legacy rate information in the rtap header for HT frames.

    Signed-off-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Helmut Schaa
     
  • Get rid of the ieee80211_tx_status_rtap_hdr struct and instead build the
    rtap header dynamically. This makes it easier to extend the rtap header
    generation in the future.

    Add ieee80211_tx_radiotap_len to calculate the expected size of the
    rtap header before generating it. Since we can't check if the rtap
    header fits into the requested headroom during compile time anymore
    add a WARN_ON_ONCE.

    Also move the actual rtap header generation into its own function.

    Signed-off-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Helmut Schaa
     

12 Oct, 2011

1 commit

  • When I introduced in-kernel off-channel TX I
    introduced a bug -- the work can't be canceled
    again because the code clear the skb pointer.
    Fix this by keeping track separately of whether
    TX status has already been reported.

    Cc: stable@kernel.org [2.6.38+]
    Reported-by: Jouni Malinen
    Tested-by: Jouni Malinen
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

01 Oct, 2011

6 commits

  • The flaglock in struct sta_info has long been
    something that I wanted to get rid of, this
    finally does the conversion to atomic bitops.

    The conversion itself is straight-forward in
    most places, a few things needed to change a
    bit since we can no longer use multiple bits
    at the same time.

    On x86-64, this is a fairly significant code
    size reduction:
    text data bss dec hex
    427861 23648 1008 452517 6e7a5 before
    425383 23648 976 450007 6ddd7 after

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Add uAPSD support to mac80211. This is probably not
    possible with all devices, so advertising it with
    the cfg80211 flag will be left up to drivers that
    want it.

    Due to my previous patches it is now a fairly
    straight-forward extension. Drivers need to have
    accurate TX status reporting for the EOSP frame.
    For drivers that buffer themselves, the provided
    APIs allow releasing the right number of frames,
    but then drivers need to set EOSP and more-data
    themselves. This is documented in more detail in
    the new code itself.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • It doesn't seem likely, but maybe possible, that the
    more-data bit needs to be recomputed due to changes
    in the queued frames. Clear it for filtered frames
    to ensure that we never send it incorrectly. It'll
    be set again as necessary when we retransmit this
    frame.

    The more likely case is maybe where the station woke
    up after the filtered frame in which case more-data
    should be clear when the frame is transmitted to the
    station since it is now awake.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • For uAPSD support we'll need to have per-AC PS
    buffers. As this is a major undertaking, split
    the buffers before really adding support for
    uAPSD. This already makes some reference to the
    uapsd_queues variable, but for now that will
    never be non-zero.

    Since book-keeping is complicated, also change
    the logic for keeping a maximum of frames only
    and allow 64 frames per AC (up from 128 for a
    station).

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • mac80211 will expire normal PS-buffered frames, but
    if the device rejected some frames for a sleeping
    station, these won't be on the ps_tx_buf queue but
    on the tx_filtered queue instead; this is done to
    avoid reordering.

    However, mac80211 will not expire frames from the
    filtered queue, let's fix that.

    Also add a more comments to what all this expiry is
    doing and how it works.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Currently, the TIM bit for a given station is set
    and cleared all over the place. Since the logic to
    set/clear it will become much more complex when we
    add uAPSD support, as a first step let's collect
    the entire logic in one place. This requires a few
    small adjustments to other places.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

17 Sep, 2011

1 commit


15 Sep, 2011

1 commit


14 Sep, 2011

1 commit

  • Unfortunately failed BAR tx attempts happen more frequently than I
    expected, and the resulting aggregation teardowns cause performance
    issues, as the aggregation session does not always get re-established
    properly.
    Instead of tearing down the entire aggr session, we can simply store the
    SSN of the last failed BAR tx attempt, wait for the first successful
    tx status event, and then send another BAR with the same SSN.

    Signed-off-by: Felix Fietkau
    Cc: Helmut Schaa
    Signed-off-by: John W. Linville

    Felix Fietkau
     

23 Aug, 2011

1 commit

  • As described at [1] some STAs (i.e. Intel 5100 Windows) can end up
    correctly BlockAcking incoming frames without delivering them to user
    space if a AMPDU subframe got lost and we don't flush the receipients
    reorder buffer with a BlockAckReq. This in turn results in stuck
    connections.

    According to 802.11n-2009 it is not necessary to send a BAR to flush
    the recepients RX reorder buffer but we still do that to be polite.

    However, assume the following frame exchange:

    AP -> STA, AMPDU (failed)
    AP -> STA, BAR (failed)

    The client in question then ends up in the same situation and won't
    deliver frames to userspace anymore since we weren't able to flush
    its reorder buffer.

    This is not a hypothetical situation but I was able to observe this
    exact behavior during a stress test between a rt2800pci AP and a Intel
    5100 Windows client.

    In order to work around this issue just tear down the BA session as
    soon as a BAR failed to be TX'ed.

    [1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/66867

    Signed-off-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Helmut Schaa
     

09 Aug, 2011

1 commit

  • For iwlwifi, I decided not to use this API since
    it just increased the complexity for little gain.
    Since nobody else intends to use it, let's kill
    it again. If anybody later needs to have it, we
    can always revive it then.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

29 Apr, 2011

1 commit


31 Mar, 2011

1 commit

  • ieee80211_tx_status iterates over all tx rates the driver reports back
    in order to
    1) mark tx rates as invalid if the driver cannot have tried that rate
    2) find the actually used tx rate for the final retransmission

    By leaving the for loop when the first invalid rate index is found we
    can move the rates_idx assignment after the loop and therefore save
    a few assignments and conditionals.

    Signed-off-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Helmut Schaa
     

26 Feb, 2011

1 commit

  • For devices supported by iwlwifi sometimes
    off-channel transmissions need to be handled
    by the device completely. To support this
    mac80211 needs to pass the frame directly
    to the driver and not through the TX path
    as the driver needs the frame and channel
    information at the same time.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

24 Feb, 2011

1 commit

  • There is a race on sending a data frame before the tx completion
    of nullfunc frame for enabling power save. As the data quickly
    follows the nullfunc frame, the AP thinks that the station is out
    of power save and continues to send the frames. Whereas in the
    station, the nullfunc ack will be processed after the tx completion
    of data frame and mac80211 goes to powersave. Thus the power
    save state mismatch between the station and the AP causes some
    data loss and some applications fail because of that. This patch
    fixes this issue.

    Signed-off-by: Vivek Natarajan
    Signed-off-by: John W. Linville

    Vivek Natarajan
     

19 Feb, 2011

1 commit


04 Feb, 2011

1 commit

  • When operating in AP mode the wl1271 hardware filters out null-data
    packets as well as management packets. This makes it impossible for
    mac80211 to monitor the PS mode by using the PM bit of incoming frames.

    Implement a HW flag to indicate that mac80211 should ignore the PM bit.
    In addition, expose ieee80211_sta_ps_transition() to make low-level
    drivers capable of controlling PS-mode.

    Signed-off-by: Arik Nemtsov
    Signed-off-by: John W. Linville

    Arik Nemtsov
     

03 Feb, 2011

1 commit

  • When the off-channel TX is done with remain-on-channel
    offloaded to hardware, the reported cookie is wrong as
    in that case we shouldn't use the SKB as the cookie but
    need to instead use the corresponding r-o-c cookie
    (XOR'ed with 2 to prevent API mismatches).

    Fix this by keeping track of the hw_roc_skb pointer
    just for the status processing and use the correct
    cookie to report in this case. We can't use the
    hw_roc_skb pointer itself because it is NULL'ed when
    the frame is transmitted to prevent it being used
    twice.

    This fixes a bug where the P2P state machine in the
    supplicant gets stuck because it never gets a correct
    result for its transmitted frame.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

07 Dec, 2010

1 commit

  • If the nullfunc frame used to probe the AP was not acked, there is no point
    in waiting for the probe timeout, so advance to the next try (or disconnect)
    immediately.
    If we do reach the probe timeout without having received a tx status, the
    connection is probably really bad and worth disconnecting.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

30 Nov, 2010

1 commit

  • This implements the new off-channel TX API
    in mac80211 with a new work item type. The
    operation doesn't add a new work item when
    we're on the right channel and there's no
    wait time so that for example p2p probe
    responses will be transmitted without delay.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

25 Nov, 2010

2 commits

  • For drivers that have accurate TX status reporting
    we can report the number of consecutive lost packets
    to userspace using the new cfg80211 CQM event. The
    threshold is fixed right now, this may need to be
    improved in the future.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • nullfunc frames are better for connection monitoring, because probe requests
    are answered even if the AP has already dropped the connection, whereas
    nullfunc frames from an unassociated station will trigger a disassoc/deauth
    frame from the AP (WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA), which allows
    the station to reconnect immediately instead of waiting until it attempts to
    transmit the next unicast frame.

    This only works on hardware with reliable tx ACK reporting, any other hardware
    needs to fall back to the probe request method.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

08 Oct, 2010

1 commit


07 Oct, 2010

1 commit


06 Oct, 2010

1 commit

  • Some drivers cannot handle multiple retry rates specified by the rc
    algorithm but instead use their own retry table (for example rt2800).
    However, if such a device registers itself with a max_rates value of 1
    the rc algorithm cannot make use of the extended information the device
    can provide about retried rates. On the other hand, if a device
    registers itself with a max_rates value > 1 the rc algorithm assumes
    that the device can handle multi rate retries.

    Fix this issue by introducing another hw parameter max_report_rates that
    can be set to a different value then max_rates to indicate if a device
    is capable of reporting more rates then specified in max_rates.

    Signed-off-by: Helmut Schaa
    Signed-off-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Helmut Schaa
     

25 Sep, 2010

1 commit

  • This patch fixes stale mac80211_tx_control_flags for
    filtered / retried frames.

    Because ieee80211_handle_filtered_frame feeds skbs back
    into the tx path, they have to be stripped of some tx
    flags so they won't confuse the stack, driver or device.

    Cc:
    Acked-by: Johannes Berg
    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     

26 Aug, 2010

1 commit


25 Aug, 2010

1 commit

  • Allow userspace to register for more than just
    action frames by giving the frame subtype, and
    make it possible to use this in various modes
    as well.

    With some tweaks and some added functionality
    this will, in the future, also be usable in AP
    mode and be able to replace the cooked monitor
    interface currently used in that case.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

29 Jun, 2010

1 commit


03 Jun, 2010

1 commit


27 Apr, 2010

1 commit

  • The sta->last_tx_rate is traditionally updated just before transmitting a
    frame based on information from the rate control algorithm. However, for
    hardware drivers with IEEE80211_HW_HAS_RATE_CONTROL this is not performed,
    as the rate control algorithm is not executed, and because the used rate is
    not known before the frame has actually been transmitted.

    This causes atleast a fixed 1Mb/s to be reported to user space. A few other
    instances of code also rely on this information.

    Fix this by setting the sta->last_tx_rate in tx_status handling. There, look
    for last rates entry set by the driver, and use that as value for
    sta->last_tx_rate.

    Signed-off-by: Juuso Oikarinen
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     

16 Mar, 2010

1 commit

  • When a cooked monitor interface is active, ieee80211_tx_status()
    generates a radiotap header for every single frame, even if it wasn't
    injected and thus won't be sent to a monitor interface.
    This patch reduces cpu utilization by moving the cooked monitor check a
    bit earlier, before it generates the rtap header.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

16 Feb, 2010

1 commit

  • This implements a new command to register for action frames
    that userspace wants to handle instead of the in-kernel
    rejection. It is then responsible for rejecting ones that
    it decided not to handle. There is no unregistration, but
    the socket can be closed for that.

    Frames that are not registered for will not be forwarded
    to userspace and will be rejected by the kernel, the
    cfg80211 API helps implementing that.

    Additionally, this patch adds a new command that allows
    doing action frame transmission from userspace. It can be
    used either to exchange action frames on the current
    operational channel (e.g., with the AP with which we are
    currently associated) or to exchange off-channel Public
    Action frames with the remain-on-channel command.

    Signed-off-by: Jouni Malinen
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Jouni Malinen
     

10 Feb, 2010

1 commit

  • Even if the null data frame is not acked by the AP, mac80211
    goes into power save. This might lead to loss of frames
    from the AP.
    Prevent this by restarting dynamic_ps_timer when ack is not
    received for null data frames.

    Cc: Johannes Berg
    Signed-off-by: Vivek Natarajan
    Signed-off-by: John W. Linville

    Vivek Natarajan