13 Jun, 2009

1 commit


11 Jun, 2009

3 commits

  • We don't want to trigger moving between PS mode during scan,
    because then we will sometimes end up sending nullfunc frames
    during scan. We're supposed to only send one prior to scan
    and after scan.

    This fixes an oops which occured due to an assert in ath9k:

    http://marc.info/?l=linux-wireless&m=124277331319024

    The assert was happening because the rate control algorithm
    figures it should find at least one valid dual stream or
    single stream rate. Since we allow mac80211 to send nullfunc
    frames during scan and dynamic PS was enabled at times we ended
    up trying to send nullfunc frames for the target sta on the
    wrong band for which we have no valid rate to communicate with
    it. This breaks the assumptions in rate control.

    We determine we also need to disable moving between PS modes
    when not associated so lets just add that now as well, and we
    should not have a ps_sdata when that interface cannot actually
    go into PS because it's not associated.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • The return type has more than two values, but it can validly
    only ever return TX_DROP and TX_CONTINUE, so use a bool
    instead of ieee80211_tx_result.

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

    Johannes Berg
     
  • In order to handle powersave frames properly we had needed
    to pass these out to the device queues again, and introduce
    the skb->requeue bit. This, however, also has unnecessary
    overhead by needing to 'clean up' already tried frames, and
    this clean-up code is also buggy when software encryption
    is used.

    Instead of sending the frames via the master netdev queue
    again, simply put them into the pending queue. This also
    fixes a problem where frames for that particular station
    could be reordered when some were still on the software
    queues and older ones are re-injected into the software
    queue after them.

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

    Johannes Berg
     

04 Jun, 2009

1 commit


21 May, 2009

1 commit


14 May, 2009

1 commit

  • There's this internal wifi_wme_noack_test variable that
    we use to set the QoS control if set. For one, it is
    unlikely that it is set. Secondly, if set it needs to
    influence the IEEE80211_TX_CTL_NO_ACK TX control flag,
    and finally we should also be able to set it at all, so
    make it available in debugfs.

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

    Johannes Berg
     


08 May, 2009

1 commit


07 May, 2009

3 commits

  • To deter future rate scaling algorithm writers from requesting NO_ACK
    packets to be retried, throw a WARN_ON_ONCE if the algorithm hands us
    a try count over 1 for NO_ACK packet.

    Signed-off-by: Gábor Stefanik
    Signed-off-by: John W. Linville

    Gábor Stefanik
     
  • In order to later add tracing or verifications to the driver
    calls mac80211 makes, this patch adds static inline wrappers
    for all operations.

    All calls are now written as

    drv_(local, ...);

    instead of

    local->ops->(&local->hw, ...);

    Where necessary, the wrappers also do existence checking and
    return default values as appropriate.

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

    Johannes Berg
     
  • We currently have two beacon interval configuration knobs:
    hw.conf.beacon_int and vif.bss_info.beacon_int. This is
    rather confusing, even though the former is used when we
    beacon ourselves and the latter when we are associated to
    an AP.

    This just deprecates the hw.conf.beacon_int setting in favour
    of always using vif.bss_info.beacon_int. Since it touches all
    the beaconing IBSS code anyway, we can also add support for
    the cfg80211 IBSS beacon interval configuration easily.

    NOTE: The hw.conf.beacon_int setting is retained for now due
    to drivers still using it -- I couldn't untangle all
    drivers, some are updated in this patch.

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

    Johannes Berg
     

05 May, 2009

1 commit

  • The fragmentation threshold is defined to be including the
    FCS, and the code that sets the TX_FRAGMENTED flag correctly
    accounts for those four bytes. The code that verifies this
    doesn't though, which could lead to spurious warnings and
    frames being dropped although everything is ok. Correct the
    code by accounting for the FCS.

    (JWL -- The problem is described here:
    http://article.gmane.org/gmane.linux.kernel.wireless.general/32205 )

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

    Johannes Berg
     

25 Apr, 2009

1 commit

  • net/mac80211/tx.c: In function ‘ieee80211_tx_h_select_key’:
    net/mac80211/tx.c:448: warning: ‘key’ may be used uninitialized in this function

    drivers/net/wireless/ath/ath9k/rc.c: In function ‘ath_rc_rate_getidx’:
    drivers/net/wireless/ath/ath9k/rc.c:815: warning: ‘nextindex’ may be used uninitialized in this function

    drivers/net/wireless/hostap/hostap_plx.c: In function ‘prism2_plx_probe’:
    drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_index’ may be used uninitialized in this function
    drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_offset’ may be used uninitialized in this function

    Signed-off-by: John W. Linville

    John W. Linville
     

23 Apr, 2009

3 commits

  • Add new nl80211 attributes that can be used with NL80211_CMD_SET_WIPHY
    and NL80211_CMD_GET_WIPHY to manage fragmentation/RTS threshold and
    retry limits.

    Since these values are stored in struct wiphy, remove the local copy
    from mac80211 where feasible (frag & rts threshold). The retry limits
    are currently needed in struct ieee80211_conf, but these could be
    eventually removed since the driver should have access to the values
    in struct wiphy.

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

    Jouni Malinen
     
  • This converts mac80211 to the new cfg80211 IBSS API, the
    wext handling functions are called where appropriate.

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

    Johannes Berg
     
  • This patch sets IEEE80211_TX_CTL_CLEAR_PS_FILT for outgoing
    frames for a half-wake station.

    this is necessary if one wants to get ps-poll working properly with a p54 ap.

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     

28 Mar, 2009

9 commits

  • This patch removes all the virtual A-MPDU-queue bookkeeping from
    mac80211. Curiously, iwlwifi already does its own bookkeeping, so
    it doesn't require much changes except where it needs to handle
    starting and stopping the queues in mac80211.

    To handle the queue stop/wake properly, we rewrite the software
    queue number for aggregation frames and internally to iwlwifi keep
    track of the queues that map into the same AC queue, and only talk
    to mac80211 about the AC queue. The implementation requires calling
    two new functions, iwl_stop_queue and iwl_wake_queue instead of the
    mac80211 counterparts.

    Signed-off-by: Johannes Berg
    Cc: Reinette Chattre
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Instead of stopping the entire AC queue when enabling aggregation
    (which was only done for hardware with aggregation queues) buffer
    the packets for each station, and release them to the pending skb
    queue once aggregation is turned on successfully.

    We get a little more code, but it becomes conceptually simpler and
    we can remove the entire virtual queue mechanism from mac80211 in
    a follow-up patch.

    This changes how mac80211 behaves towards drivers that support
    aggregation but have no hardware queues -- those drivers will now
    not be handed packets while the aggregation session is being
    established, but only after it has been fully established.

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

    Johannes Berg
     
  • We just found a bug in zd1211rw where it would reject
    packets in the ->tx() method but leave them modified,
    which would cause retransmit attempts with completely
    bogus skbs, eventually leading to a panic due to not
    having enough headroom in those.

    This patch adds a sanity check to mac80211 to catch
    such driver mistakes; in this case we warn and drop
    the skb.

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

    Johannes Berg
     
  • __ieee80211_tx takes a struct ieee80211_tx_data argument, but only
    uses a few of its members, namely 'skb' and 'sta'. Make that explicit,
    so that less internal knowledge is required in ieee80211_tx_pending
    and the possibility of introducing errors here is removed.

    Signed-off-by: Johannes Berg
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The pending packets code is quite incomprehensible, uses memory barriers
    nobody really understands, etc. This patch reworks it entirely, using
    the queue spinlock, proper stop bits and the skb queues themselves to
    indicate whether packets are pending or not (rather than a separate
    variable like before).

    Signed-off-by: Johannes Berg
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Internally, mac80211 requires the skb's queue mapping to be set
    to the AC queue, not the virtual A-MPDU queue. This is not done
    correctly currently, this patch moves the code down to directly
    before the driver is invoked and adds a comment that it will be
    moved into the driver later.

    Since this requires __ieee80211_tx() to have the sta pointer,
    make sure to provide it in ieee80211_tx_pending().

    Signed-off-by: Johannes Berg
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Fragmentation currently uses an allocated array to store the
    fragment skbs, and then keeps track of which have been sent
    and which are still pending etc. This is rather complicated;
    make it simpler by just chaining the fragments into skb->next
    and removing from that list when sent. Also simplifies all
    code that needs to touch fragments, since it now only needs
    to walk the skb->next list.

    This is a prerequisite for fixing the stored packet code,
    which I need to do for proper aggregation packet storing.

    Signed-off-by: Johannes Berg
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • ieee80211_tx_h_check_assoc() was dropping everything else than probe
    requests during software scan. So the nullfunc frame with the power save
    bit was dropped and AP never received it. This meant that AP never
    buffered any frames for the station during software scan.

    Fix this by allowing to transmit both probe request and nullfunc frames
    during software scan. Tested with stlc45xx.

    Signed-off-by: Kalle Valo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • This inline is useless and actually makes the code _longer_
    rather than shorter.

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

    Johannes Berg
     

18 Mar, 2009

1 commit


17 Mar, 2009

1 commit

  • It was possible to hit a kernel panic on NULL pointer dereference in
    dev_queue_xmit() when sending power save buffered frames to a STA that
    woke up from sleep. This happened when the buffered frame was requeued
    for transmission in ap_sta_ps_end(). In order to avoid the panic, copy
    the skb->dev and skb->iif values from the first fragment to all other
    fragments.

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

    Jouni Malinen
     

28 Feb, 2009

2 commits

  • This patch splits out the ibss code and data from managed (station) mode.
    The reason to do this is to better separate the state machines, and have
    the code be contained better so it gets easier to determine what exactly
    a given change will affect, that in turn makes it easier to understand.

    This is quite some churn, especially because I split sdata->u.sta into
    sdata->u.mgd and sdata->u.ibss, but I think it's easier to maintain that
    way. I've also shuffled around some code -- null function sending is only
    applicable to managed interfaces so put that into that file, some other
    functions are needed from various places so put them into util, and also
    rearranged the prototypes in ieee80211_i.h accordingly.

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

    Johannes Berg
     
  • Hardware with AMPDU queues currently has broken aggregation.

    This patch fixes it by making all A-MPDUs go over the regular AC queues,
    but keeping track of the hardware queues in mac80211. As a first rough
    version, it actually stops the AC queue for extended periods of time,
    which can be removed by adding buffering internal to mac80211, but is
    currently not a huge problem because people rarely use multiple TIDs
    that are in the same AC (and iwlwifi currently doesn't operate as AP).

    This is a short-term fix, my current medium-term plan, which I hope to
    execute soon as well, but am not sure can finish before .30, looks like
    this:
    1) rework the internal queuing layer in mac80211 that we use for
    fragments if the driver stopped queue in the middle of a fragmented
    frame to be able to queue more frames at once (rather than just a
    single frame with its fragments)
    2) instead of stopping the entire AC queue, queue up the frames in a
    per-station/per-TID queue during aggregation session initiation,
    when the session has come up take all those frames and put them
    onto the queue from 1)
    3) push the ampdu queue layer abstraction this patch introduces in
    mac80211 into the driver, and remove the virtual queue stuff from
    mac80211 again

    This plan will probably also affect ath9k in that mac80211 queues the
    frames instead of passing them down, even when there are no ampdu queues.

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

    Johannes Berg
     

15 Feb, 2009

1 commit


14 Feb, 2009

1 commit

  • This issue happens only when we are associated with a 11n AP and power save
    is enabled. In the function 'ieee80211_master_start_xmit', ps_disable_work
    is queued where wake_queues is called. But before this work is executed,
    we check if the queues are stopped in _ieee80211_tx and return TX_AGAIN to
    ieee8011_tx which leads to the warning message.
    This patch fixes this erroneous case.

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

    Vivek Natarajan
     

12 Feb, 2009

1 commit

  • We try to find the correct outgoing interface for injected frames
    based on the TA, but since this is a hack for hostapd 11w, restrict
    the heuristic to AP mode interfaces. At some point we'll add the
    ability to give an interface index in radiotap or so and just
    remove this heuristic again.

    Signed-off-by: Johannes Berg
    Cc: stable@kernel.org [2.6.28.x]
    Signed-off-by: John W. Linville

    Johannes Berg
     

10 Feb, 2009

1 commit

  • Monitor mode is able to TX by using injected frames. We should
    not allow injected frames to be sent unless allowed by regulatory
    rules. Since AP mode uses a monitor interfaces to transmit
    management frames we have to take care to not break AP mode as
    well while resolving this. We can deal with this by allowing compliant
    APs solutions to inform mac80211 if their monitor interface is
    intended to be used for an AP by setting a cfg80211 flag for the
    monitor interface. hostapd, for example, currently does its own
    checks to ensure AP mode is not used on channels which require radar
    detection. Once such solutions are available it can can add this
    flag for monitor interfaces.

    Acked-by: Johannes Berg
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     

30 Jan, 2009

6 commits

  • ADDBA request Action frame was sent out before 4-way handshake was
    completed and the initial 802.11w code ended up dropping the frame
    even if MFP was not enabled. While the sending of Action frames this
    early is not really a good idea (will break with MFP enabled), we
    should not break this for the MFP disabled case.

    This patch fixes ieee80211_tx_h_select_key() not to drop management
    frames if MFP is disabled. If MFP is enabled, Action frames will be
    dropped before keys are set per IEEE 802.11w/D7.0. Other robust
    management frames (i.e., Deauthentication and Disassociation frames)
    are allowed unprotected prior to key configuration.

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

    Jouni Malinen
     
  • Add mechanism for managing BIP keys (IGTK) and integrate BIP into the
    TX/RX paths.

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

    Jouni Malinen
     
  • Extend CCMP to support encryption and decryption of unicast management
    frames.

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

    Jouni Malinen
     
  • This modifies hardware flags for powersave to support three different
    flags:
    * IEEE80211_HW_SUPPORTS_PS - indicates general PS support
    * IEEE80211_HW_PS_NULLFUNC_STACK - indicates nullfunc sending in software
    * IEEE80211_HW_SUPPORTS_DYNAMIC_PS - indicates dynamic PS on the device

    It also adds documentation for all this which explains how to set the
    various flags.

    Additionally, it fixes a few things:
    * a spot where && was used to test flags
    * enable CONF_PS only when associated again

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

    Johannes Berg
     
  • This will be needed for drivers that set the
    IEEE80211_HW_NO_STACK_DYNAMIC_PS flag and still
    want to handle dynamic PS.

    Signed-off-by: Johannes Berg
    Reviewed-by: Kalle Valo
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch removes an unnecessary assignment to info
    in __ieee80211_tx() , tx.c.

    Signed-off-by: Rami Rosen
    Signed-off-by: John W. Linville

    Rami Rosen