16 Mar, 2012

1 commit

  • The header includes a lot of stuff, and
    it in turn gets a lot of use just for the basic "struct device"
    which appears so often.

    Clean up the users as follows:

    1) For those headers only needing "struct device" as a pointer
    in fcn args, replace the include with exactly that.

    2) For headers not really using anything from device.h, simply
    delete the include altogether.

    3) For headers relying on getting device.h implicitly before
    being included themselves, now explicitly include device.h

    4) For files in which doing #1 or #2 uncovers an implicit
    dependency on some other header, fix by explicitly adding
    the required header(s).

    Any C files that were implicitly relying on device.h to be
    present have already been dealt with in advance.

    Total removals from #1 and #2: 51. Total additions coming
    from #3: 9. Total other implicit dependencies from #4: 7.

    As of 3.3-rc1, there were 110, so a net removal of 42 gives
    about a 38% reduction in device.h presence in include/*

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

20 Dec, 2011

1 commit

  • When a peer changes SMPS state we should update
    rate control so it doesn't have to detect it by
    itself. It can't detect "dynamic" mode anyway
    since that just requires rts-cts handshaking.

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

    Johannes Berg
     

02 Dec, 2011

1 commit


22 Nov, 2011

1 commit

  • Drivers can usually handle fragmented packets
    much easier when they get the entire list of
    fragments at once. The only thing they need to
    do is keep enough space on the queues for up
    to ten fragments of a single MSDU.

    This allows them to implement this with a new
    operation tx_frags.

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

    Johannes Berg
     

12 Nov, 2011

1 commit

  • Allow setting a probe response template for an interface operating in
    AP mode. Low level drivers are notified about changes in the probe
    response template and are able to retrieve a copy of the current probe
    response. This data can, for example, be uploaded to hardware as a
    template.

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

    Arik Nemtsov
     

10 Nov, 2011

3 commits


09 Nov, 2011

1 commit


05 Nov, 2011

1 commit


15 Oct, 2011

1 commit

  • 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
     

12 Oct, 2011

2 commits

  • We can now move the radiotap header parsing into
    ieee80211_monitor_start_xmit(). This moves it out of
    the hotpath, and also helps the code since now the
    radiotap header will no longer be present in
    ieee80211_xmit() etc. which is easier to understand.

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

    Johannes Berg
     
  • The purpose of this is two-fold:
    1) by moving it out of tx_data.flags, we can in
    another patch move the radiotap parsing so it
    no longer is in the hotpath
    2) if a device implements fragmentation but can
    optionally skip it, the radiotap request for
    not doing fragmentation may be honoured

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

    Johannes Berg
     

04 Oct, 2011

2 commits

  • tx params should be configured per interface.
    add ieee80211_vif param to the conf_tx callback,
    and change all the drivers that use this callback.

    The following spatch was used:
    @rule1@
    struct ieee80211_ops ops;
    identifier conf_tx_op;
    @@
    ops.conf_tx = conf_tx_op;

    @rule2@
    identifier rule1.conf_tx_op;
    identifier hw, queue, params;
    @@
    conf_tx_op (
    - struct ieee80211_hw *hw,
    + struct ieee80211_hw *hw, struct ieee80211_vif *vif,
    u16 queue,
    const struct ieee80211_tx_queue_params *params) {...}

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     
  • Recently mac80211 was changed to use nullfunc instead of probe
    request for connection monitoring for tx ack status reporting
    hardwares. Sometimes in congested network, STA got disconnected
    quickly after the association. It was observered that the rate
    control was not adopted to environment due to minimal transmission.

    As the nullfunc are used for monitoring purpose, these frames should
    not be sacrificed for rate control updation. So it is better to send
    the monitoring null func frames at minimum rate that could help to
    retain the connection.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     

01 Oct, 2011

9 commits

  • With the addition of uAPSD and driver buffering
    the powersave handling has gotten quite complex.
    Add a section to the documentation to explain it
    for anyone wanting to implement it.

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

    Johannes Berg
     
  • iwlwifi has a separate EOSP notification from
    the device, and to make use of that properly
    it needs to be passed to mac80211. To be able
    to mix with tx_status_irqsafe and rx_irqsafe
    it also needs to be an "_irqsafe" version in
    the sense that it goes through the tasklet,
    the actual flag clearing would be IRQ-safe
    but doing it directly would cause reordering
    issues.

    This is needed in the case of a P2P GO going
    into an absence period without transmitting
    any frames that should be driver-released as
    in this case there's no other way to inform
    mac80211 that the service period ended. Note
    that for drivers that don't use the _irqsafe
    functions another version of this function
    will be required.

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

    Johannes Berg
     
  • iwlwifi needs to know the number of frames that are
    going to be sent to a station while it is asleep so
    it can properly handle the uCode blocking of that
    station.

    Before uAPSD, we got by by telling the device that
    a single frame was going to be released whenever we
    encountered IEEE80211_TX_CTL_POLL_RESPONSE. With
    uAPSD, however, that is no longer possible since
    there could be more than a single frame.

    To support this model, add a new callback to notify
    drivers when frames are going to be released.

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

    Johannes Berg
     
  • If a PS-poll frame is retried (but was received)
    there is no way to detect that since it has no
    sequence number. As a consequence, the standard
    asks us to not react to PS-poll frames until the
    response to one made it out (was ACKed or lost).

    Implement this by using the WLAN_STA_SP flags to
    also indicate a PS-Poll "service period" and the
    IEEE80211_TX_STATUS_EOSP flag for the response
    packet to indicate the end of the "SP" as usual.

    We could use separate flags, but that will most
    likely completely confuse drivers, and while the
    standard doesn't exclude simultaneously polling
    using uAPSD and PS-Poll, doing that seems quite
    problematic.

    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
     
  • If there are frames for a station buffered in
    the driver, mac80211 announces those in the TIM
    IE but there's no way to release them. Add new
    API to release such frames and use it when the
    station polls for a frame.

    Since the API will soon also be used for uAPSD
    it is easily extensible.

    Note that before this change drivers announcing
    driver-buffered frames in the TIM bit actually
    will respond to a PS-Poll with a potentially
    lower priority frame (if there are any frames
    buffered in mac80211), after this patch a driver
    that hasn't been changed will no longer respond
    at all. This only affects ath9k, which will need
    to be fixed to implement the new API.

    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
     
  • For uAPSD implementation, it is necessary to know on
    which ACs frames are buffered. mac80211 obviously
    knows about the frames it has buffered itself, but
    with aggregation many drivers buffer frames. Thus,
    mac80211 needs to be informed about this.

    For now, since we don't have APSD in any form, this
    will unconditionally set the TIM bit for the station
    but later with uAPSD only some ACs might cause the
    TIM bit to be set.

    ath9k is the only driver using this API and I only
    modify it in the most basic way, it won't be able
    to implement uAPSD with this yet. But it can't do
    that anyway since there's no way to selectively
    release frames to the peer yet.

    Since drivers will buffer frames per TID, let them
    inform mac80211 on a per TID basis, mac80211 will
    then sort out the AC mapping itself.

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

    Johannes Berg
     
  • Relocate the mesh implementation of adding the (extended) supported
    rates IE to util.c, anticipating its use by other parts of mac80211.

    Signed-off-by: Arik Nemtsov
    Cc: Kalyan C Gaddam
    Signed-off-by: John W. Linville

    Arik Nemtsov
     

28 Sep, 2011

2 commits

  • Whenever the scan request or tx_mgmt is requesting not to
    use CCK rate for managemet frames through
    NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
    select appropriate least non-CCK rate. This could help to
    send P2P probes and P2P action frames at non 11b rates
    without diabling 11b rates globally.

    Cc: Jouni Malinen
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • TSF can be kept per vif.
    Add ieee80211_vif param to set/get/reset_tsf, and move
    the debugfs entries to the per-vif directory.

    Update all the drivers that implement these callbacks.

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     

21 Sep, 2011

1 commit


17 Sep, 2011

1 commit


15 Sep, 2011

2 commits


14 Sep, 2011

1 commit


26 Aug, 2011

1 commit


09 Aug, 2011

2 commits


21 Jul, 2011

1 commit

  • In P2P client mode, the GO (AP) to connect to might
    have periods of time where it is not available due
    to powersave. To allow the driver to sync with it
    and send frames to the GO only when it is available
    add a new callback tx_sync (and the corresponding
    finish_tx_sync). These callbacks can sleep unlike
    the actual TX.

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

    Johannes Berg
     

16 Jul, 2011

2 commits

  • ieee80211_iter_keys() currently returns keys in
    the backward order they were installed in, which
    is a bit confusing. Add them to the tail of the
    key list to make sure iterations go in the same
    order that keys were originally installed in.

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

    Johannes Berg
     
  • When the driver wants to pre-program the TKIP
    RX phase 1 key, it needs to be able to obtain
    it for the peer's TA. Add API to allow it to
    generate it.

    The generation uses a dummy on-stack context
    since it doesn't know the RX queue.

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

    Johannes Berg
     

14 Jul, 2011

1 commit

  • In WoWLAN, devices may use crypto keys for TX/RX
    and could also implement GTK rekeying. If the
    driver isn't able to retrieve replay counters and
    similar information from the device upon resume,
    or if the device isn't responsive due to platform
    issues, it isn't safe to keep the connection up
    as GTK rekey messages from during the sleep time
    could be replayed against it.

    The only protection against that is disconnecting
    from the AP. Modifying mac80211 to do that while
    it is resuming would be very complex and invasive
    in the case that the driver requires a reconfig,
    so do it after it has resumed completely. In that
    case, however, packets might be replayed since it
    can then only happen after TX/RX are up again, so
    mark keys for interfaces that need to disconnect
    as "tainted" and drop all packets that are sent
    or received with those keys.

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

    Johannes Berg
     

12 Jul, 2011

1 commit

  • mac80211 maintains a running average of the RSSI when a STA
    is associated to an AP. Report threshold events to any driver
    that has registered callbacks for getting RSSI measurements.

    Implement callbacks in mac80211 so that driver can set thresholds.
    Add callbacks in mac80211 which is invoked when an RSSI threshold
    event occurs.

    mac80211: add tracing to rssi_reports api and remove extraneous fn argument
    mac80211: scale up rssi thresholds from driver by 16 before storing

    Signed-off-by: Meenakshi Venkataraman
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Meenakshi Venkataraman