01 Nov, 2008

40 commits

  • "Clearing" the rate control algorithm is pointless, none of
    the algorithms actually uses this operation and it's not even
    invoked properly for all channel switching. Also, there's no
    need to since rate control algorithms work per station.

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

    Johannes Berg
     
  • This patch protects iwl-csr.h and iwl-fh.h from double inclusion
    by ifndef define endif idiom

    Signed-off-by: Tomas Winkler
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • This patch enhances minstrel's performance for non-MRR setups,
    by preventing it from sampling slower rates with >95% success
    probability and by putting at least 1 non-sample frame between
    several sample frames.

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

    Felix Fietkau
     
  • NLA_NESTED attributes cannot be empty, but we want to be able to
    specify "no flags" (empty attribute) vs. "no change" (no attribute).
    Therefore, remove the NLA_NESTED policy so it can work as an empty
    attribute.

    I guess I should have used a u32 for these flags instead, but we're
    stuck with it now. Haven't noticed earlier because of a bug in iw...

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

    Johannes Berg
     
  • This patch removes most/all? of the "magic" numbers and unknown structure
    variables inside the code and replaces them with meaningful prototypes.

    (Plus a one line warning fix from Larry Finger .)

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

    John W. Linville
     
  • This patch initialize all remaining values which are necessary for
    SPI firmwares.

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

    Christian Lamparter
     
  • We have to be careful if multiple "control frames" are passed in a very short intervals to
    the device's firmware. As p54_assign_address always put them into same memory location.
    To guarantee that this won't happen anymore, we have to treat control frames like normal
    data frames in the devices own memory management.

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

    Christian Lamparter
     
  • the long names and the nesting in p54_rx_frame_sent really
    became a "line longer than 80 characters" problem.

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

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

    Christian Lamparter
     
  • This patch series hopefully increases p54's "longterm" stability.

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

    Christian Lamparter
     
  • This patch makes clear that tx command is attached to the same tfd as
    the tx packet

    Signed-off-by: Tomas Winkler
    Signed-off-by: Zhu Yi
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • This patch:
    1. fixes command DMA unmapping, this might be visible only
    on platforms where DMA unmapping is no noop such as PPC64 (not tested)
    2. attaches correctly high memory part of the host command buffer
    3. changes structure of TFD TB
    instead of describing transmit buffer (TB) tuple it describes single
    TB and makes code more readable on price of one unaligned access
    4. eliminates using of IWL_GET/SET_BITs for TFD handling
    5. renames TFD structures to mach the HW spec
    6. reduces iwl_tx_info size by reserving first TB to the host command

    This patch should not have any visible effect on x86 32

    This patch is rework of
    iwlwifi: fix DMA code and bugs from
    Johannes Berg

    Signed-off-by: Tomas Winkler
    Cc: Johannes Berg
    Reviewed-by: Zhu Yi
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • TX antenna toggling is requested for management frames in tx and
    scanning. I addition toggling in scanning was incorrect;

    Signed-off-by: Tomas Winkler
    Reviewed-by: Zhu Yi
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • This patch adds iwl_cmd_queue_free function and
    separate cmd queue freeing from regular tx queue freeing.
    This improves readability and adds one more step in
    restructuring of cmd queue handling

    Signed-off-by: Tomas Winkler
    Reviewed-by: Zhu Yi
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • This patch removes host commands structures from iwl_cmd
    to make more HW oblivious
    tx cmd was left it needs special treatment.

    Signed-off-by: Tomas Winkler
    Reviewed-by: Zhu Yi
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • change desc_lookup from hard coded switch to a simple lookup table and expand
    list to include all errors. Also corrected output using this string so info
    is aligned and easier to read when debugging issues.

    Signed-off-by: Jay Sternberg
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Jay Sternberg
     
  • string repeated for definition of ucode firmware file and in preparation for
    multiple firmware files need to consolidate location for their definition.

    Signed-off-by: Jay Sternberg
    Acked-by: Tomas Winkler
    Signed-off-by: John W. Linville

    Jay Sternberg
     
  • This makes CONFIG_IEEE80211 invisible. The drivers that require it
    (ipw2100, ipw2200, hostap) select it, and everybody else really
    shouldn't even think about using it. Also, since there really is
    no point in compiling anything without crypto support these days,
    remove the crypto options and just enable them, leaving only the
    debugging option which only shows up when a driver is select that
    requires it. This makes it hard to enable, but most people wouldn't
    want to anyway.

    Signed-off-by: Johannes Berg
    Acked-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Do not attempt association until directed to do so by a user space
    application. In particular, this avoids race conditions with
    NetworkManager association state.

    Signed-off-by: Tim Gardner
    Acked-by: Dan Williams
    Signed-off-by: John W. Linville

    Tim Gardner
     
  • This implements multi-rate retry in p54. With lots of help
    and testing from Christian and the limiting idea from nbd.

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

    Johannes Berg
     
  • So after the previous changes we were still unhappy with how
    convoluted the API is and decided to make things simpler for
    everybody. This completely changes the rate control API, now
    taking into account 802.11n with MCS rates and more control,
    most drivers don't support that though.

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

    Johannes Berg
     
  • Just to catch bugs when changing mac80211.

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

    Johannes Berg
     
  • We have some reasons to kill netdev->priv:
    1. netdev->priv is equal to netdev_priv().
    2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
    netdev_priv() is more flexible than netdev->priv.
    But we cann't kill netdev->priv, because so many drivers reference to it
    directly.

    OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
    and I want to kill netdev->priv later, I decided to convert all the direct
    reference of netdev->priv first.

    In this driver, I don't simply use netdev_priv() to replace netdev->priv.

    The reason is:
    Pointer netdev->priv was changed in this driver, but it shouldn't.
    Because the memory was allocated when alloc_netdev() and netdev->priv
    should always point to that memory.

    So I use netdev->ml_priv to replace netdev->priv.
    After replacing, both ai and ai->wifidev->ml_priv point to the same memory.

    Signed-off-by: Wang Chen
    Cc: John W. Linville
    Cc: Dan Williams
    Signed-off-by: John W. Linville

    Wang Chen
     
  • This patch fixes mesh point operation (thanks to YanBo for pointing
    out the problem): make mesh point interfaces start beaconing when
    they come up and configure the RX filter in mesh mode so that mesh
    beacons and action frames are received. Add mesh point to the check
    in ath5k_add_interface. Tested with multiple AR5211 cards.

    Signed-off-by: Andrey Yurovsky
    Acked-by: Nick Kossifidis
    Signed-off-by: John W. Linville

    Andrey Yurovsky
     
  • This adjusts ath5k's signal quality reporting taking into
    consideration received beacons at an RSSI of 35 should indicate
    you can use of 54 Mbps on a single stream card (all ath5k cards)
    reliably.

    Signed-off-by: Luis R. Rodriguez
    Acked-by: Nick Kossifidis
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • This adjusts ath9k's signal quality reporting taking into
    consideration received beacons at an RSSI of 45 should indicate
    you can use of MCS 15 rate (144 Mbps) reliably on dual stream card.
    Keep in mind mac80211 does not yet have aggregation fixed but this
    should still provide more accurate results.

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

    Luis R. Rodriguez
     
  • Now that we officially are supporting ath5k I can do this
    at work hours.

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

    Luis R. Rodriguez
     
  • This change adds short slot handling for 8187B variant of rtl8187 chips.
    Some things to note about changes done:
    * Values used are chosen to met 802.11-2007 spec. This raised a question
    about SIFS value used with 8187L: 0x22 (34) doesn't match any spec
    value. For now just don't change 8187L, but is something to be
    looked at.
    * On 8187B, the location of EIFS register is at the same place as BRSR+1
    of struct rtl818x_csr. Unfortunately there is no clean way to
    accomodate 8187B differences currently, just use address of BRSR+1 and
    comment about it. The same thing happens for Ack timeout register,
    that is on CARRIER_SENSE_COUNTER location of 8187L. The eifs and ack
    timeout values are in units of 4us. All these registers information
    was gathered from references being the vendor gpl driver and 8180
    datasheet, unfortunately there is no information about this on 8187B
    datasheet. Also the ack timeout value was inspired by the same
    calculation as done on rt2x00.

    Signed-off-by: Herton Ronaldo Krzesinski
    Signed-off-by: John W. Linville

    Herton Ronaldo Krzesinski
     
  • This updates 8187L handling for short slot after "mac80211: fix short
    slot handling". For 8187B, there was no handling done for short slot
    timing so nothing done, support for it will come in a following patch.

    Signed-off-by: Herton Ronaldo Krzesinski
    Signed-off-by: John W. Linville

    Herton Ronaldo Krzesinski
     
  • Add support for AP mode. This involves:
    - enablement in ath5k_beacon_config -- initialize beacon timer
    - add AP to the supported modes in ath5k_add_interface
    - handle beacon change even for AP in ath5k_config_interface
    - remove useless test for IBSS in ath5k_beacon_update

    Note that it doesn't enable the AP mode for the driver. It must
    be enabled by NL80211_IFTYPE_AP bit added to interface_modes.

    v2:
    Fixed opmode constant (IEEE80211_ to NL80211_)

    Signed-off-by: Jiri Slaby
    Cc: Nick Kossifidis
    Cc: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Jiri Slaby
     
  • Sorry about that, for some reason I didn't notice that I'd
    left some unused variables in there.

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

    Johannes Berg
     
  • The HT handling has the following deficiencies, which I've
    (partially) fixed:
    * it always uses the AP info even if there is no AP,
    hence has no chance of working as an AP
    * it pretends to be HW config, but really is per-BSS
    * channel sanity checking is left to the drivers
    * it generally lets the driver control too much

    HT enabling is still wrong with this patch if you have more than
    one virtual STA mode interface, but that never happens currently.
    Once WDS, IBSS or AP/VLAN gets HT capabilities, it will also be
    wrong, see the comment in ieee80211_enable_ht().

    Additionally, this fixes a number of bugs:
    * mac80211: ieee80211_set_disassoc doesn't notify the driver any
    more since the refactoring
    * iwl-agn-rs: always uses the HT capabilities from the wrong stuff
    mac80211 gives it rather than the actual peer STA
    * ath9k: a number of bugs resulting from the broken HT API

    I'm not entirely happy with putting the HT capabilities into
    struct ieee80211_sta as restricted to our own HT TX capabilities,
    but I see no cleaner solution for now.

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

    Johannes Berg
     
  • Move bss_conf into the vif struct so that drivers can
    access it during ->tx without having to store it in
    the private data or similar. No driver updates because
    this is only for when they want to start using it.

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

    Johannes Berg
     
  • Instead of having a separate callback, use the HW config callback
    with a new flag to change retry limits.

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

    Johannes Berg
     
  • Probably bugs I added.

    Signed-off-by: Johannes Berg
    Acked-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This exports the local HT capabilities in nl80211.

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

    Johannes Berg
     
  • I've come to think that not providing sequence numbers for
    the normal STA mode case was a mistake, at least two drivers
    now had to implement code they wouldn't otherwise need, and
    I believe at76_usb and adm8211 might be broken.

    This patch makes mac80211 assign a sequence number to all
    those frames that need one except beacons. That means that
    if a driver only implements modes that do not do beaconing
    it need not worry about the sequence number.

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

    Johannes Berg
     
  • The patch entitled "[PATCH] p54: Fix sparse warnings" added the __le16
    variable rx_mtu to struct bootrec, but it could equally well be placed
    in the struct bootrec_desc, which overlays the 'data' section of bootrec.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • Limit the number of "expensive" rfkill workqueue operations per second, in
    order to not hog system resources too much when faced with a rogue source
    of rfkill input events.

    The old rfkill-input code (before it was refactored) had such a limit in
    place. It used to drop new events that were past the rate limit. This
    behaviour was not implemented as an anti-DoS measure, but rather as an
    attempt to work around deficiencies in input device drivers which would
    issue multiple KEY_FOO events too soon for a given key FOO (i.e. ones that
    do not implement mechanical debouncing properly).

    However, we can't really expect such issues to be worked around by every
    input handler out there, and also by every userspace client of input
    devices. It is the input device driver's responsability to do debouncing
    instead of spamming the input layer with bogus events.

    The new limiter code is focused only on anti-DoS behaviour, and tries to
    not lose events (instead, it coalesces them when possible).

    The transmitters are updated once every 200ms, maximum. Care is taken not
    to delay a request to _enter_ rfkill transmitter Emergency Power Off (EPO)
    mode.

    If mistriggered (e.g. by a jiffies counter wrap), the code delays processing
    *once* by 200ms.

    Signed-off-by: Henrique de Moraes Holschuh
    Cc: Ivo van Doorn
    Cc: Dmitry Torokhov
    Signed-off-by: John W. Linville

    Henrique de Moraes Holschuh
     
  • rfkill_resume() would always restore the rfkill controller state to its
    pre-suspend state.

    Now that we know when we are under EPO, kick the rfkill controller to
    SOFT_BLOCKED state instead of to its pre-suspend state when it is resumed
    while EPO mode is active.

    Signed-off-by: Henrique de Moraes Holschuh
    Cc: Ivo van Doorn
    Signed-off-by: John W. Linville

    Henrique de Moraes Holschuh