1. 17 6月, 2010 8 次提交
  2. 05 6月, 2010 2 次提交
  3. 03 6月, 2010 6 次提交
  4. 02 6月, 2010 1 次提交
  5. 25 5月, 2010 1 次提交
    • B
      ath5k: consistently use rx_bufsize for RX DMA · b5eae9ff
      Bruno Randolf 提交于
      We should use the same buffer size we set up for DMA also in the hardware
      descriptor. Previously we used common->rx_bufsize for setting up the DMA
      mapping, but used skb_tailroom(skb) for the size we tell to the hardware in the
      descriptor itself. The problem is that skb_tailroom(skb) can give us a larger
      value than the size we set up for DMA before. This allows the hardware to write
      into memory locations not set up for DMA. In practice this should rarely happen
      because all packets should be smaller than the maximum 802.11 packet size.
      
      On the tested platform rx_bufsize is 2528, and we allocated an skb of 2559
      bytes length (including padding for cache alignment) but sbk_tailroom() was
      2592. Just consistently use rx_bufsize for all RX DMA memory sizes.
      
      Also use the return value of the descriptor setup function.
      
      Cc: stable@kernel.org
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Reviewed-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b5eae9ff
  6. 12 5月, 2010 1 次提交
    • L
      ath5k: drop warning on jumbo frames · 9637e516
      Luis R. Rodriguez 提交于
      Jumbo frames are not supported, and if they are seen it is likely
      a bogus frame so just silently discard them instead of warning on
      them all time. Also, instead of dropping them immediately though
      move the check *after* we check for all sort of frame errors. This
      should enable us to discard these frames if the hardware picks
      other bogus items first. Lets see if we still get those jumbo
      counters increasing still with this.
      
      Jumbo frames would happen if we tell hardware we can support
      a small 802.11 chunks of DMA'd frame, hardware would split RX'd
      frames into parts and we'd have to reconstruct them in software.
      This is done with USB due to the bulk size but with ath5k we
      already provide a good limit to hardware and this should not be
      happening.
      
      This is reported quite often and if it fills the logs then this
      needs to be addressed and to avoid spurious reports.
      
      Cc: stable@kernel.org
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9637e516
  7. 01 5月, 2010 1 次提交
  8. 29 4月, 2010 1 次提交
  9. 20 4月, 2010 1 次提交
  10. 15 4月, 2010 2 次提交
    • B
      ath5k: treat RXORN as non-fatal · 87d77c4e
      Bruno Randolf 提交于
      We get RXORN interrupts when all receive buffers are full. This is not
      necessarily a fatal situation. It can also happen when the bus is busy or the
      CPU is not fast enough to process all frames.
      
      Older chipsets apparently need a reset to come out of this situration, but on
      newer chips we can treat RXORN like RX, as going thru a full reset does more
      harm than good, there.
      
      The exact chip revisions which need a reset are unknown - this guess
      AR5K_SREV_AR5212 ("venice") is copied from the HAL.
      
      Inspired by openwrt 413-rxorn.patch:
      "treat rxorn like rx, reset after rxorn seems to do more harm than good"
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      87d77c4e
    • B
      ath5k: Use high bitrates for ACK/CTS · 0edc9a67
      Bruno Randolf 提交于
      There was a confusion in the usage of the bits AR5K_STA_ID1_ACKCTS_6MB and
      AR5K_STA_ID1_BASE_RATE_11B. If they are set (1), we will get lower bitrates for
      ACK and CTS. Therefore ath5k_hw_set_ack_bitrate_high(ah, false) actually
      resulted in high bitrates, which i think is what we want anyways. Cleared the
      confusion and added some documentation.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0edc9a67
  11. 09 4月, 2010 2 次提交
  12. 08 4月, 2010 1 次提交
    • B
      ath5k: Adaptive Noise Immunity (ANI) Implementation · 2111ac0d
      Bruno Randolf 提交于
      This is an Adaptive Noise Imunity (ANI) implementation for ath5k. I have looked
      at both ath9k and HAL sources (they are nearly the same), and even though i
      have implemented some things differently, the basic algorithm is practically
      the same, for now. I hope that this can serve as a clean start to improve the
      algorithm later.
      
      This also adds a possibility to manually control ANI settings, right now only
      thru a debugfs file:
        * set lowest sensitivity (=highest noise immunity):
      	echo sens-low > /sys/kernel/debug/ath5k/phy0/ani
        * set highest sensitivity (=lowest noise immunity):
      	echo sens-high > /sys/kernel/debug/ath5k/phy0/ani
        * automatically control immunity (default):
      	echo ani-on > /sys/kernel/debug/ath5k/phy0/ani
        * to see the parameters in use and watch them change:
      	cat /sys/kernel/debug/ath5k/phy0/ani
      
      Manually setting sensitivity will turn the automatic control off. You can also
      control each of the five immunity parameters (noise immunity, spur immunity,
      firstep, ofdm weak signal detection, cck weak signal detection) manually thru
      the debugfs file.
      
      This is tested on AR5414 and nearly doubles the thruput in a noisy 2GHz band.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2111ac0d
  13. 04 4月, 2010 1 次提交
    • J
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko 提交于
      Converts the list and the core manipulating with it to be the same as uc_list.
      
      +uses two functions for adding/removing mc address (normal and "global"
       variant) instead of a function parameter.
      +removes dev_mcast.c completely.
      +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
       manipulation with lists on a sandbox (used in bonding and 80211 drivers)
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22bedad3
  14. 01 4月, 2010 6 次提交
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 11 3月, 2010 5 次提交
    • B
      ath5k: add debugfs file frameerrors · 7644395f
      Bruno Randolf 提交于
      add a debugfs file to see different RX and TX errors as reported in our status
      descriptors. this can help to diagnose driver problems.
      
      statistics can be cleared by writing 'clear' into the frameerrors file.
      
      example:
      
      # cat /sys/kernel/debug/ath5k/phy0/frameerrors
      RX
      ---------------------
      CRC     27      (11%)
      PHY     3       (1%)
      FIFO    0       (0%)
      decrypt 0       (0%)
      MIC     0       (0%)
      process 0       (0%)
      jumbo   0       (0%)
      [RX all 245]
      
      TX
      ---------------------
      retry   2       (9%)
      FIFO    0       (0%)
      filter  0       (0%)
      [TX all 21]
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7644395f
    • B
      ath5k: remove double opmode definition · ccfe5552
      Bruno Randolf 提交于
      opmode (operating mode) was defined in struct ath5k_hw and struct ath5k_softc.
      remove it from ath5k_hw and use only from ath5k_softc (sc->opmode).
      
      (btw: what's the meaning of opmode when we have multiple interfaces?)
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ccfe5552
    • B
      ath5k: preserve antenna settings · caec9112
      Bruno Randolf 提交于
      save antenna settings and preserve across resets.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      caec9112
    • B
      ath5k: add antenna statistics and debugfs file for antenna settings · 604eeadd
      Bruno Randolf 提交于
      keep statistics about which antenna was used for TX and RX. this is used only
      for debugging right now, but might have other applications later.
      
      add a new file 'antenna' in debugfs (/sys/kernel/debug/ath5k/phy0/antenna) to show
      antenna use statistics and antenna diversity related register values. it can
      also be used to set the antenna mode until we have proper support for that in
      iw:
        - echo diversity > antenna: use default antenna mode (RX and TX diversity)
        - echo fixed-a > antenna: use fixed antenna A for RX and TX
        - echo fixed-b > antenna: use fixed antenna B for RX and TX
        - echo clear > antenna: reset antenna statistics
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      604eeadd
    • B
      ath5k: Fix TX/RX padding for all frames · 8127fbdc
      Benoit Papillault 提交于
      Currently, the padding position is based on
      ieee80211_get_hdrlen_from_skb(). This is not correct since the HW does
      padding on RX (and expect the same padding to be present on TX) at the
      following position :
      
      - management : 24 + 6 if 4-addr format
      - control    : 24 + 6 if 4-addr format
      - data       : 24 + 6 if 4-addr format + 2 if QoS
      - invalid    : 24 + 6 if 4-addr format
      
      whereas ieee80211_get_hdrlen_from_skb() is :
      
      - management : 24
      - control    : 16 except for ACK/CTS where it is 10
      - data       : 24 + 6 if 4-addr format + 2 if QoS + 2 if QoS & order
      - invalid    : 24
      
      So, correct frames are not affected : management frames do not use
      4-addr format, control frames have no body and invalid frames are ...
      not valid by definition. However, in order to use monitor interface for
      debugging purpose, one must be able to send/receive any frames, be it
      correct or not. Such frames are affected by incorrect padding.
      
      Moreover, since padding is added on TX, we need to remove it before
      calling ieee80211_tx_status. This affect TX packets received by monitor
      interfaces.
      
      It has been tested between an ath5k based card (AR5212) and an ar9170usb
      based card (netgear WNDA3100) using a frame generator and a monitor
      interface for each card.
      
      v2: Added ath5k_add_padding / ath5k_remove_padding
      Signed-off-by: NBenoit Papillault <benoit.papillault@free.fr>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8127fbdc