1. 19 Dec, 2008 17 commits
    • Jouni Malinen's avatar
      mac80211: Add HT rates into RX status reporting · 0fb8ca45
      Jouni Malinen authored
      This patch adds option for HT-enabled drivers to report HT rates
      (HT20/HT40, short GI, MCS index) to mac80211. These rates are
      currently not in the rate table, so the rate_idx is used to indicate
      MCS index.
      Signed-off-by: default avatarJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0fb8ca45
    • Sujith's avatar
      ath9k: Do not use association state to update rate table · 9d8eed12
      Sujith authored
      Now that HT information is made available to the driver through
      config() callback, the channel type can be calculated whenever
      setting the channel. Update the rate table accordingly with the new
      channel type.
      Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      9d8eed12
    • Sujith's avatar
      mac80211: Fix HT channel selection · 094d05dc
      Sujith authored
      HT management is done differently for AP and STA modes, unify
      to just the ->config() callback since HT is fundamentally a
      PHY property and cannot be per-BSS.
      
      Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
      the channel type ( NO_HT, HT20, HT40+, HT40- ).
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      094d05dc
    • Henning Rogge's avatar
      nl80211: Add signal strength and bandwith to nl80211station info · 420e7fab
      Henning Rogge authored
      This patch adds signal strength and transmission bitrate
      to the station_info of nl80211.
      Signed-off-by: default avatarHenning Rogge <rogge@fgan.de>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      420e7fab
    • Anton Vorontsov's avatar
      ucc_geth: Remove UGETH_FILTERING dead code · 221b3d60
      Anton Vorontsov authored
      The code appears to be dead: nobody call these functions, plus build
      breaks when UGETH_FILTERING is enabled:
      
      ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want
      ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash':
      ucc_geth.c:1856: error: dereferencing pointer to incomplete type
      ucc_geth.c:1874: error: dereferencing pointer to incomplete type
      ucc_geth.c:1877: warning: return from incompatible pointer type
      ucc_geth.c: At top level:
      ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash':
      ucc_geth.c:1894: error: dereferencing pointer to incomplete type
      ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
      ucc_geth.c:1909: warning: assignment from incompatible pointer type
      ucc_geth.c:1918: error: dereferencing pointer to incomplete type
      ucc_geth.c: At top level:
      ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash':
      ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
      ucc_geth.c:1947: warning: assignment from incompatible pointer type
      ucc_geth.c:1954: error: dereferencing pointer to incomplete type
      ucc_geth.c: At top level:
      ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr':
      ucc_geth.c:2064: error: dereferencing pointer to incomplete type
      ucc_geth.c:2073: error: dereferencing pointer to incomplete type
      ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type
      make[2]: *** [ucc_geth.o] Error 1
      
      The code is there since the driver was merged, and nobody seem to be
      interested in fixing or actually using it. If we ever want the
      filtering support, we can always revert the patch and fix it, but so
      far it just draws reader's attention.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      221b3d60
    • Anton Vorontsov's avatar
      ucc_geth: Fix IO memory (un)mapping code · 3e73fc9a
      Anton Vorontsov authored
      The driver doesn't check ioremap() return value, and doesn't free the
      remapped memory.
      
      This patch fixes it.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e73fc9a
    • Anton Vorontsov's avatar
      ucc_geth: Cleanup repetitive ucc_geth_memclean() calls · ba574696
      Anton Vorontsov authored
      No need to call ucc_geth_memclean() so many times, just check for
      errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors.
      
      The ucc_geth_stop() may be called anytime and will do the right thing.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba574696
    • Anton Vorontsov's avatar
      ucc_geth: Fix IRQ freeing code in ucc_geth_open() · 67c2fb8f
      Anton Vorontsov authored
      open() routine calls stop() in case of errors, the function will try
      to free the requested IRQ. But we don't know if it was actually
      requested, so the code might issue bogus free_irq(0, dev) call.
      
      Fix this by rearranging the code so that now request_irq() is the last
      call in the open() routine, and move free_irq() into the close().
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67c2fb8f
    • Anton Vorontsov's avatar
      ucc_geth: Fix TX watchdog timeout handling · 1762a29a
      Anton Vorontsov authored
      The timeout handling code is currently broken in several ways:
      
      - It calls stop() (which frees all the memory and IRQ), and then
        calls startup() (which won't re-request IRQ, neither it will
        re-init the Fast UCC structure).
      - It calls these routines from the softirq context, which is wrong,
        since stop() calls free_irq() (which might sleep) and startup()
        allocates things with GFP_KERNEL.
      - It won't soft-reset the PHY. We need the PHY reset for at least
        MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover
        from timeouts w/o the reset.
      
      So the patch fixes these problems by implementing the workqueue for the
      timeout handling, and there we fully re-open the device via close() and
      open() calls. The close/open paths do the right things, and I can see
      that the driver actually survive the timeouts.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1762a29a
    • Anton Vorontsov's avatar
      ucc_geth: Fix endless loop in stop_{tx,rx} routines · b3431c64
      Anton Vorontsov authored
      Currently the routines wait for the various bits w/o an assumption that
      bits may never get set. When timeouts happen I see that these bits never
      get set and so the routines hang the kernel.
      
      With this patch we'll wait the graceful stop for 100 ms, and then will
      simply exit. There is nothing* we can do about that, but it's OK since
      we'll do full reset later.
      
      * Well, actually, there is also not-graceful variant for the TX stop,
        but specs says that we never should use it.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3431c64
    • Matt Mackall's avatar
      tcp: Stop scaring users with "treason uncloaked!" · 6086ebca
      Matt Mackall authored
      The original message was unhelpful and extremely alarming to our poor
      users, despite its charm. Make it less frightening.
      Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6086ebca
    • Jesper Dangaard Brouer's avatar
      NIU: Implement discard counters, optimize · e98def1f
      Jesper Dangaard Brouer authored
      Optimize the lightly loaded case, by only synchronizing discards stats
      when qlen > 10 indicate potential for drops.
      
      Notice Robert Olsson might disagree with this patch.
      Signed-off-by: default avatarJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e98def1f
    • Jesper Dangaard Brouer's avatar
      NIU: Implement discard counters, info/debug statements. · d231776f
      Jesper Dangaard Brouer authored
      Discard packet counter debug statements that can be turned on
      at runtime by users to assist debugging of the driver code.
      Signed-off-by: default avatarJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d231776f
    • Jesper Dangaard Brouer's avatar
      NIU: Implement discard counters · b8a606b8
      Jesper Dangaard Brouer authored
      Implementing discard counters for the NIU driver turned out to be more
      complicated than first assumed.
      
      The discard counters for the NIU neptune chip are only 16-bit (even
      though this is a 64-bit chip).  These 16-bit counters can overflow
      quickly, especially considering this is a 10Gbit/s ethernet card.
      
      The overflow indication bit is, unfortunatly, not usable as the
      counter value does not wrap, but remains at max value 0xFFFF.
      Resulting in lost counts until the counter is reset.
      
      The read and reset scheme also poses a problem. Both in theory and in
      practice counters can be lost in between reading nr64() and clearing
      the counter nw64().  For this reason, the number of counter clearings
      nw64() is limited/reduced.  On the fast-path the counters are only
      syncronized once it exceeds 0x7FFF.  When read by userspace, its
      syncronized fully.
      Signed-off-by: default avatarJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8a606b8
    • Baruch Siach's avatar
      enc28j60: reduce the number of spi transfers in enc28j60_set_bank() · 5664dd55
      Baruch Siach authored
      A major source of overhead in the enc28j60 driver is the SPI transfers. Each
      SPI transfer entails two kernel thread context switches. One major source of
      SPI transfers is the enc28j60_set_bank() functions which runs before every
      register access. This patch reduces the number of SPI transfers that
      enc28j60_set_bank() performs in two ways:
      
        1. removes unnecessary bank switch for the registers that are present in all
      	 banks
      
        2. when switching from banks 0 or 3 to banks 1 or 2 (i.e. only one bit
      	 changes) enc28j60_set_bank() does only one SPI transfer instead of two
      
      According to my tests these changes reduce the number of SPI transfers in
      about 25%.
      Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5664dd55
    • Wang Chen's avatar
      netdevice zd1201: Use after free · b88a2a22
      Wang Chen authored
      | commit 3d29b0c3
      | Author: John W. Linville <linville@tuxdriver.com>
      | Date:   Fri Oct 31 14:13:12 2008 -0400
      |
      |     netdevice zd1201: Convert directly reference of netdev->priv to netdev_priv()
      |
      |     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.
      |
      |     (Original patch posted by Wang Chen <wangchen@cn.fujitsu.com> w/ above
      |     changelog but using dev->ml_priv.  That doesn't seem appropriate
      |     to me for this driver, so I've revamped it to use netdev_priv()
      |     instead. -- JWL)
      
      This commit changed the allocation of netdev, but didn't change
      the free method of it.
      This causes "zd" be used after the memory, which is pointed by "zd", being
      freed by free_netdev().
      Signed-off-by: default avatarWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b88a2a22
    • David S. Miller's avatar
      3de77cf2
  2. 18 Dec, 2008 16 commits
  3. 17 Dec, 2008 7 commits