03 Dec, 2010

1 commit


01 Dec, 2010

34 commits

  • Commit dbbf1755b09eef8ff6dd21c8dafe1606f051ce12 "iwlwifi: use
    antenna information in EEPROM" caused 4965 device breakage with
    "Microcode SW error detected. Restarting 0x82000000." message.
    This patch reverts 4965 part of that commit.

    Signed-off-by: Stanislaw Gruszka
    Acked-by: Johannes Berg
    Acked-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     
  • Remove a superfluous ieee80211_is_data check as that was checked a few
    lines before already and we wont't get here for non-data frames at all.

    Second, the frame was already converted to 802.3 header format and
    reading the fc and addr1 fields was only possible because the 802.3
    header is short enough and didn't overwrite the relevant parts of the
    802.11 header. Make the code more obvious by checking the ethernet
    header's h_dest field.

    Furthermore reorder the conditions to reduce the number of checks
    when dynamic powersave is not needed (AP mode for example).

    Signed-off-by: Helmut Schaa
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Helmut Schaa
     
  • All rt2x00 drivers except rt2800pci call ieee80211_tx_status() from
    a workqueue, which causes "NOHZ: local_softirq_pending 08" messages.

    To fix it, add ieee80211_tx_status_ni() similar to ieee80211_rx_ni()
    which can be called from process context, and call it from
    rt2x00lib_txdone(). For the rt2800pci special case a driver
    flag is introduced.

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

    Johannes Stezenbach
     
  • * A diff between rfbuffer settings of turbo and non-turbo
    modes indicates there is a bit on bank 2 related to turbo operation
    (it's set on turbo modes). This bit is present on all radios except
    RF5413 that seems to have a completely different bank 2. Also
    since 2317 has the same rf-registers locations with 2425 and
    since the bit exists on 2317 I assume it also exists on 2425/2417).
    So in case we use turbo mode (40MHz) enable it on bank modification.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Clean up what's left of turbo mode, since we handle all
    register modifications (rfbuffer comes next) on code there
    is no need to have duplicated arrays.

    * Rename change_channel to skip_pcu on initvals.c as we did
    on reset.c

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Clean up CHANNEL_T(URBO), use AR5K_BWMODE_40MHZ instead

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Use correct clock value when setting OFDM timings on
    non-default bwmodes.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Don't return -EINVAL when trying to set tx power
    on RF5110 because AR5210 reset will fail. We need to
    add support for RF5110 and AR5210 eeprom in the future
    but for now just skip it.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Tweak phy activation -> rx delay for different bwmodes

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Since we set antenna flags on phy init and ack bitrate
    mode on pcu init, there is no need to save/restore sta_id
    flags on ath5k_hw_reset. Also we don't need to re-set our
    mac address because it's not affected by resets.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Add synth-only channel change for AR2413/5413. When we call
    ath5k_reset with a channel ath5k_hw_reset will first try to
    set channel on PHY while PHY is running instead of doing a normal
    full reset. To do this phy_init has to change to implement this
    functionality.

    * Clean up change_channel flag, what it really did was skip PCU
    registers when setting initvals. This is done because on reset
    PCU registers are not affected (except the registers we set
    in pcu init and -due to hw problems- TSF). Use a new skip_pcu
    flag that's not misleading instead. In the future we might use
    that to also skip PCU reset and save us the TSF etc problems
    (needs testing because standard practice is to reset everything).

    * Use fast channel change only when setting channel, and set skip_pcu
    to false only on init. When we reset the card due to DMA or PHY
    problems skip pcu but never do a fast channel change.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Only set power table if we are changing channel/mode
    there is no need to recalculate and reset the power table
    all the time.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Set correct PLL settings for each bwmode

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Add spur mitigation filter support for half/quarter and turbo.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Tweak power detector delays on AR5111/AR5112 when
    using half/quarter modes.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Make sure we always set IFS timings even if no
    coverage class is set. If we don't we'll miss the
    needed changes for different bwmodes.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Set AR5K_DCU_GBL_IFS_MISC_TURBO_MODE flag on DCU when operating
    on 40MHz

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Replace set_slot_time with set_ifs_intervals that also sets
    the various inter-frame space intervals based on current bwmode.

    * Clean up AR5210 mess from reset_tx_queue, AR5210 only has one
    data queue and we set IFS intervals for that queue on set_ifs_intervals
    so there is nothing left to do for 5210 on reset_tx_queue.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Extend ieee80211_generic_frame_duration to support the various
    bwmodes.

    * Better document what's going on with ack bitrates and update
    write_rate_duration to support the standard ack bitrates (when
    we don't set the high bit).

    * Get rid of set_ack_bitrate_high and introduce a flag on ath5k_hw
    for this (we only called the function on init anyway so there is no
    difference).

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Extend get_default_sifs/slot_time to include timings for turbo
    half and quarter rate modes.

    * AR5210 code for now uses timings already on core clock units
    instead of usecs so rename them (we 'll clean it up later).

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Move setting of tx retry limits on a separate function
    (we 'll clean up this AR5210 mess later)

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * On turbo mode increase PHY settling times, note that
    we only increase switch settling time on AR5212 as indicated
    by initvals.

    * A few cleanups: Move frame control settings for AR5210 from
    reset_tx_queue to tweak_initvals and remove phy_scal settings
    from tweak_initvals (we tweak them alread on set_sleep_clock).

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Now that we properly set rx/tx latencies for AR5311 remove
    that old buggy part of code left inside ath5k_hw_tweak_initval_settings
    that was never executed (you can't have an RF5112 radio on a mac older
    than AR5212). Also use a magic value for 5311 PHY_SCAL value.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Handle all usec parameters in one function. It's much cleaner
    this way.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Prepare for half/quarter/turbo support, introduce a new
    ah_bwmode parameter and get rid of ah_turbo. Bwmode stands
    for "bandwidth mode" and can have 4 values, default (20MHz),
    turbo (40MHz), half rate (10MHz), and quarter rate (5MHz).

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Since we only use ath5k_hw_stop_tx_dma to stop the beacon
    queue, introduce a new function ath5k_hw_stop_beacon_queue so
    that we can use that instead and have better control. In the future
    we can add more beacon queue specific stuff there (maybe tweak
    beacon timers or something), for now just call ath5k_hw_stop_tx_dma.

    * Also since we don't call ath5k_hw_stop_rx/tx_dma from outside
    dma.c, make them static.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Make sure we are not trying to set RXDP while RX is active,
    for now ignore the return value.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * DCU early termination should be used to quickly flush QCU
    according to docs so don't enable it for all queues, enable
    it only when stopping each queue and disable it when we are
    done.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Increase timeouts on ath5k_hw_stop_tx_dma and also wait for
    tx queue to stop before checking for pending frames

    * Add a new debug level to debug dma start/stop

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Since we stop rx/tx dma and pcu durring reset there is no need to
    call ath5k_hw_stop_rx/tx_dma before, also there is no need to call
    them durring stop_locked since we can use ath5k_hw_dma_stop for
    both.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Stop PCU receive logic (DRU) durring reset
    We need to be sure pcu is not active when trying to stop rx dma
    right now this is done on ath5k_reset (base.c) but later we are
    going to clean it up.

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * Add a new function to stop rx/tx dma and use in when reset starts

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • * No functional changes

    * Clean up reset:
    Introduce init functions for each unit and call them instead
    of having everything inside ath5k_hw_reset (it's just c/p for
    now so nothing changes except calling order -I tested it with
    various cards and it's ok-)

    * Further cleanups:
    ofdm_timings belongs to phy.c
    rate_duration belongs to pcu.c
    clock functions are general and belong to reset.c (more to follow)

    * Reorder functions for better organization:
    We start with helpers and other functions follow in categories,
    init functions are last

    Signed-off-by: Nick Kossifidis

    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • This feature is to mitigate the problem of certain 3
    stream chips that exceed the PCIe power requirements.An EEPROM flag
    controls which chips have APM enabled which is basically read from
    miscellaneous configuration element of the EEPROM header.

    This workaround will reduce power consumption by using 2 Tx chains for
    Single and Double stream rates (5 GHz only).All self generated frames
    (regardless of rate) are sent on 2 chains when this feature is
    enabled(Chip Limitation).

    Cc: Paul Shaw
    Signed-off-by: Mohammed Shafi Shajakhan
    Tested-by: Mohammed Shafi Shajakhan
    Signed-off-by: John W. Linville

    Mohammed Shafi Shajakhan
     

30 Nov, 2010

5 commits