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
     

26 Jan, 2010

1 commit


20 Jan, 2010

2 commits

  • In an earlier commit,

    mac80211: disable software retry for now

    Pavel Roskin reported a problem that seems to be due to
    software retry of already transmitted frames. It turns
    out that we've never done that correctly, but due to
    some recent changes it now crashes in the TX code. I've
    added a comment in the patch that explains the problem
    better and also points to possible solutions -- which
    I can't implement right now.

    I disabled software retry of failed/filtered frames
    because it was broken. With the work of the previous
    patches, it now becomes fairly easy to re-enable it
    by adding a flag indicating that the frame shouldn't
    be modified, but still running it through the transmit
    handlers to populate the control information.

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

    Johannes Berg
     
  • When an skb survived a round-trip through the driver
    and needs to be re-used, its control information is
    definitely not valid any more, the driver will have
    overwritten it.

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

    Johannes Berg
     

29 Dec, 2009

1 commit


23 Dec, 2009

1 commit

  • Enable spatial multiplexing in mac80211 by telling the
    driver what to do and, where necessary, sending action
    frames to the AP to update the requested SMPS mode.

    Also includes a trivial implementation for hwsim that
    just logs the requested mode.

    For now, the userspace interface is in debugfs only,
    and let you toggle the requested mode at any time.

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

    Johannes Berg
     

22 Dec, 2009

2 commits

  • For bluetooth 3, we will most likely not have
    a netdev for a virtual interface (sdata), so
    prepare for that by reducing the reliance on
    having a netdev. This patch moves the name
    and address fields into the sdata struct and
    uses them from there all over. Some work is
    needed to keep them sync'ed, but that's not
    a lot of work and in slow paths anyway.

    In doing so, this also reduces the number of
    pointer dereferences in many places, because
    of things like sdata->dev->dev_addr becoming
    sdata->vif.addr.

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

    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: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

05 Dec, 2009

1 commit

  • An earlier optimization on removing unnecessary traffic on cooked
    monitor interfaces ("mac80211: reduce the amount of unnecessary traffic
    on cooked monitor interfaces ") ended up removing quite a bit more
    than just unnecessary traffic. It was not supposed to remove TX status
    reporting for injected frames, but ended up doing it by checking the
    injected flag in skb->cb only after that field had been cleared with
    memset.. Fix this by taking a local copy of the injected flag before
    skb->cb is cleared.

    This broke user space applications that depend on getting TX status
    notifications for injected data frames. For example, STA inactivity
    poll from hostapd did not work and ended up kicking out stations even
    if they were still present.

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

    Jouni Malinen
     

19 Nov, 2009

1 commit