1. 12 Nov, 2010 11 commits
    • Hao Zheng's avatar
      ixgbe: Look inside vlan when determining offload protocol. · 5e09a105
      Hao Zheng authored
      Currently the skb->protocol field is used to setup various
      offloading parameters on transmit for the correct protocol.
      However, if vlan offloading is disabled or otherwise not used,
      the protocol field will be ETH_P_8021Q, not the actual protocol.
      This will cause the offloading to be not performed correctly,
      even though the hardware is capable of looking inside vlan tags.
      Instead, look inside the header if necessary to determine the
      correct protocol type.
      
      To some extent this fixes a regression from 2.6.36 because it
      was previously not possible to disable vlan offloading and this
      error case was not exposed.
      Signed-off-by: default avatarHao Zheng <hzheng@nicira.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Alex Duyck <alexander.h.duyck@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e09a105
    • Hao Zheng's avatar
      bnx2x: Look inside vlan when determining checksum proto. · d0d9d8ef
      Hao Zheng authored
      Currently the skb->protocol field is used to setup checksum
      offloading on transmit for the correct protocol.  However, if
      vlan offloading is disabled or otherwise not used, the protocol
      field will be ETH_P_8021Q, not the actual protocol.  This will
      cause the checksum to be not computed correctly, even though the
      hardware is capable of looking inside vlan tags.  Instead,
      look inside the header if necessary to determine the correct
      protocol type.
      
      To some extent this fixes a regression from 2.6.36 because it
      was previously not possible to disable vlan offloading and this
      error case was not exposed.
      Signed-off-by: default avatarHao Zheng <hzheng@nicira.com>
      CC: Eilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0d9d8ef
    • Hao Zheng's avatar
      vlan: Add function to retrieve EtherType from vlan packets. · 0a85df00
      Hao Zheng authored
      Depending on how a packet is vlan tagged (i.e. hardware accelerated or
      not), the encapsulated protocol is stored in different locations.  This
      provides a consistent method of accessing that protocol, which is needed
      by drivers, security checks, etc.
      Signed-off-by: default avatarHao Zheng <hzheng@nicira.com>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a85df00
    • Jason Wang's avatar
      virtio-net: init link state correctly · 167c25e4
      Jason Wang authored
      For device that supports VIRTIO_NET_F_STATUS, there's no need to
      assume the link is up and we need to call nerif_carrier_off() before
      querying device status, otherwise we may get wrong operstate after
      diver was loaded because the link watch event was not fired as
      expected.
      
      For device that does not support VIRITO_NET_F_STATUS, we could not get
      its status through virtnet_update_status() and what we can only do is
      always assuming the link is up.
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      167c25e4
    • Joakim Tjernlund's avatar
      ucc_geth: Fix deadlock · 75e60474
      Joakim Tjernlund authored
      This script:
       while [ 1==1 ] ; do ifconfig eth0 up; usleep 1950000 ;ifconfig eth0 down; dmesg -c ;done
      causes in just a second or two:
      INFO: task ifconfig:572 blocked for more than 120 seconds.
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      ifconfig      D 0ff65760     0   572    369 0x00000000
      Call Trace:
      [c6157be0] [c6008460] 0xc6008460 (unreliable)
      [c6157ca0] [c0008608] __switch_to+0x4c/0x6c
      [c6157cb0] [c028fecc] schedule+0x184/0x310
      [c6157ce0] [c0290e54] __mutex_lock_slowpath+0xa4/0x150
      [c6157d20] [c0290c48] mutex_lock+0x44/0x48
      [c6157d30] [c01aba74] phy_stop+0x20/0x70
      [c6157d40] [c01aef40] ucc_geth_stop+0x30/0x98
      [c6157d60] [c01b18fc] ucc_geth_close+0x9c/0xdc
      [c6157d80] [c01db0cc] __dev_close+0xa0/0xd0
      [c6157d90] [c01deddc] __dev_change_flags+0x8c/0x148
      [c6157db0] [c01def54] dev_change_flags+0x1c/0x64
      [c6157dd0] [c0237ac8] devinet_ioctl+0x678/0x784
      [c6157e50] [c0239a58] inet_ioctl+0xb0/0xbc
      [c6157e60] [c01cafa8] sock_ioctl+0x174/0x2a0
      [c6157e80] [c009a16c] vfs_ioctl+0xcc/0xe0
      [c6157ea0] [c009a998] do_vfs_ioctl+0xc4/0x79c
      [c6157f10] [c009b0b0] sys_ioctl+0x40/0x74
      [c6157f40] [c00117c4] ret_from_syscall+0x0/0x38
      
      The reason appears to be ucc_geth_stop meets adjust_link as the
      PHY reports PHY changes. I belive adjust_link hangs somewhere,
      holding the PHY lock, because ucc_geth_stop disabled the
      controller HW.
      Fix is to stop the PHY before disabling the controller.
      Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Reviewed-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75e60474
    • Joakim Tjernlund's avatar
      ucc_geth: Do not bring the whole IF down when TX failure. · 2040bd57
      Joakim Tjernlund authored
      ucc_geth_close lacks a cancel_work_sync(&ugeth->timeout_work)
      to stop any outstanding processing of TX fail. However, one
      can not call cancel_work_sync without fixing the timeout function
      otherwise it will deadlock. This patch brings ucc_geth in line with
      gianfar:
      
      Don't bring the interface down and up, just reinit controller HW
      and PHY.
      Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Reviewed-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2040bd57
    • Mariusz Kozlowski's avatar
      net: Fix header size check for GSO case in recvmsg (af_packet) · 1f18b717
      Mariusz Kozlowski authored
      Parameter 'len' is size_t type so it will never get negative.
      Signed-off-by: default avatarMariusz Kozlowski <mk@lab.zgora.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f18b717
    • David S. Miller's avatar
    • Thomas Graf's avatar
      rtnetlink: Fix message size calculation for link messages · 369cf77a
      Thomas Graf authored
      nlmsg_total_size() calculates the length of a netlink message
      including header and alignment. nla_total_size() calculates the
      space an individual attribute consumes which was meant to be used
      in this context.
      
      Also, ensure to account for the attribute header for the
      IFLA_INFO_XSTATS attribute as implementations of get_xstats_size()
      seem to assume that we do so.
      
      The addition of two message headers minus the missing attribute
      header resulted in a calculated message size that was larger than
      required. Therefore we never risked running out of skb tailroom.
      Signed-off-by: default avatarThomas Graf <tgraf@infradead.org>
      Acked-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      369cf77a
    • Shan Wei's avatar
      netfilter: ipv6: fix overlap check for fragments · 22e091e5
      Shan Wei authored
      The type of FRAG6_CB(prev)->offset is int, skb->len is *unsigned* int,
      and offset is int.
      
      Without this patch, type conversion occurred to this expression, when
      (FRAG6_CB(prev)->offset + prev->len) is less than offset.
      Signed-off-by: default avatarShan Wei <shanwei@cn.fujitsu.com>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      22e091e5
    • Eric Paris's avatar
      netfilter: NF_HOOK_COND has wrong conditional · ac5aa2e3
      Eric Paris authored
      The NF_HOOK_COND returns 0 when it shouldn't due to what I believe to be an
      error in the code as the order of operations is not what was intended.  C will
      evalutate == before =.  Which means ret is getting set to the bool result,
      rather than the return value of the function call.  The code says
      
      if (ret = function() == 1)
      when it meant to say:
      if ((ret = function()) == 1)
      
      Normally the compiler would warn, but it doesn't notice it because its
      a actually complex conditional and so the wrong code is wrapped in an explict
      set of () [exactly what the compiler wants you to do if this was intentional].
      Fixing this means that errors when netfilter denies a packet get propagated
      back up the stack rather than lost.
      
      Problem introduced by commit 2249065f (netfilter: get rid of the grossness
      in netfilter.h).
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      ac5aa2e3
  2. 11 Nov, 2010 2 commits
  3. 10 Nov, 2010 4 commits
  4. 09 Nov, 2010 13 commits
  5. 08 Nov, 2010 10 commits
    • Rajkumar Manoharan's avatar
      ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure · 48a7c3df
      Rajkumar Manoharan authored
      The allocated externel radio banks have to be freed in
      case of ath9k_hw_rf_alloc_ext_banks failure.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      48a7c3df
    • Rajkumar Manoharan's avatar
      ath9k_htc: Fix probe failure if CONFIG_USB_DEBUG enabled · 490b3f4e
      Rajkumar Manoharan authored
      Since the endpoint descriptors (EP3 & EP4) were changed from Interrupt
      to Bulk type by firmware, the urb submission done on Bulk pipes.
      And the recent commit "check the endpoint type against the pipe type"
      added aditional error checking against pipe types under CONFIG_USB_DEBUG.
      
      So bmAttribute has to be updated for both EP3 & EP4 before submitting
      urbs on that pipe. This patch resolves the following failure.
      
      [ 2215.710936] usb 1-1: usb_probe_device
      [ 2215.710945] usb 1-1: configuration #1 chosen from 1 choice
      [ 2215.711152] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
      [ 2215.711252] ath9k_hif_usb 1-1:1.0: usb_probe_interface
      [ 2215.711255] ath9k_hif_usb 1-1:1.0: usb_probe_interface - got id
      [ 2215.712780] usb 1-1: BOGUS urb xfer, pipe 3 != type 1
      [ 2215.713782] usb 1-1: ath9k_htc: Unable to allocate URBs
      [ 2215.713801] ath9k_hif_usb: probe of 1-1:1.0 failed with error -22
      Reported-by: default avatarMing Lei <tom.leiming@gmail.com>
      Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      490b3f4e
    • Haitao Zhang's avatar
      ath9k_htc: Add support for device ID 3346 · ac618d70
      Haitao Zhang authored
      This patch adds support for USB dongle with device ID 3346 from IMC Networks.
      Signed-off-by: default avatarHaitao Zhang <minipanda@linuxrobot.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      ac618d70
    • Vasanthakumar Thiagarajan's avatar
      ath9k_hw: Fix AR9280 surprise removal during frequent idle on/off · f119da30
      Vasanthakumar Thiagarajan authored
      Bit 22 of AR_WA should be set to fix the situation where chip reset
      is asynchronous to clock of analog shift registers, such that when
      reset is released, it could mess up the values of analog shift registers
      and cause some hw issue on AR9280.
      
      This bit is write only, but the driver does a read-modify-write
      on AR_WA without setting bit 22 in ar9002_hw_configpcipowersave()
      during radio disable. This causes surprise removal of hw. It can
      never recover from this state and the hw will become usable only
      after a power on/off cycle, and sometimes only during a cold reboot.
      
      This issue can be triggered by doing frequent roaming with the
      simple/test-roam script available from the wifi-test project [1]
      when roaming between APs quickly. When roaming there is a is a high
      possibility that the device being put into idle (radio disable) state
      by mac80211 during AUTH->ASSOC. A device hardware reset would fail
      and the kernel would output:
      
      [40251.363799] ath: AWAKE -> FULL-SLEEP
      [40251.363815] ieee80211 phy17: device no longer idle - working
      [40251.363817] ath: Marking phy17 as not-idle
      [40251.363819] ath: FULL-SLEEP -> AWAKE
      [40251.415978] pciehp 0000:00:1c.3:pcie04: Card not present on Slot(3)
      [40251.419896] ath: ah->misc_mode 0x4
      [40251.428138] pciehp 0000:00:1c.3:pcie04: Card present on Slot(3)
      [40251.532247] ath: timeout (100000 us) on reg 0x9860: 0xffffffff & 0x00000001 != 0x00000000
      [40251.532250] ath: Unable to reset channel (2462 MHz), reset status -5
      [40251.532422] ath: Set channel: 5745 MHz
      [40251.540639] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.548826] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.557023] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.565211] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.573415] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.581603] ath: Failed to stop TX DMA in 100 msec after killing last frame
      [40251.581606] ath: Failed to stop TX DMA. Resetting hardware!
      [40251.592679] ath: DMA failed to stop in 10 ms AR_CR=0xffffffff AR_DIAG_SW=0xffffffff
      [40251.703330] ath: timeout (100000 us) on reg 0x7000: 0xffffffff & 0x00000003 != 0x00000000
      [40251.703333] ath: RTC stuck in MAC reset
      [40251.703334] ath: Chip reset failed
      [40251.703335] ath: Unable to reset hardware; reset status -22
      
      This is currently only reproducible with some HB92 (Half Mini-PCIE)
      cards but the fix applies to all AR9280 cards. This patch fixes this
      issue by setting bit 22 during radio disable.
      
      This patch has fixes for all kernels that has ath9k.
      
      [1] http://wireless.kernel.org/en/developers/Testing/wifi-test
      
      Cc: kyungwan.nam@atheros.com
      Cc: amod.bodas@atheros.com
      Cc: david.quan@atheros.com
      Cc: stable@kernel.org
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      f119da30
    • Daniel Drake's avatar
      libertas: terminate scan when stopping interface · 2e30168b
      Daniel Drake authored
      There are currently no provisions in place to ensure that the scanning
      task has been stopped when the interface is stopped or removed.
      
      This can result in a WARNING at net/wireless/core.c:643 and other badness
      when you remove the module while a scan is happening.
      
      Terminate the scanning task during interface stop.
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Acked-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      2e30168b
    • Brian Cavagnolo's avatar
      mac80211: unset SDATA_STATE_OFFCHANNEL when cancelling a scan · 352ffad6
      Brian Cavagnolo authored
      For client STA interfaces, ieee80211_do_stop unsets the relevant
      interface's SDATA_STATE_RUNNING state bit prior to cancelling an
      interrupted scan.  When ieee80211_offchannel_return is invoked as
      part of cancelling the scan, it doesn't bother unsetting the
      SDATA_STATE_OFFCHANNEL bit because it sees that the interface is
      down.  Normally this doesn't matter because when the client STA
      interface is brought back up, it will probably issue a scan.  But
      in some cases (e.g., the user changes the interface type while it
      is down), the SDATA_STATE_OFFCHANNEL bit will remain set.  This
      prevents the interface queues from being started.  So we
      cancel the scan before unsetting the SDATA_STATE_RUNNING bit.
      Signed-off-by: default avatarBrian Cavagnolo <brian@cozybit.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      352ffad6
    • Felix Fietkau's avatar
      ath9k: check old power mode before clearing cycle counters · fbb078fc
      Felix Fietkau authored
      ath9k_ps_wakeup() clears the cycle counters after waking up the
      hardware using ath9k_hw_setpower, however if power save is disabled,
      then the counters will contain useful data, which then gets discarded.
      Fix this by checking the old power mode before discarding any data.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      fbb078fc
    • Felix Fietkau's avatar
      cfg80211: fix a crash in dev lookup on dump commands · 3cc25e51
      Felix Fietkau authored
      IS_ERR and PTR_ERR were called with the wrong pointer, leading to a
      crash when cfg80211_get_dev_from_ifindex fails.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      3cc25e51
    • Christian Lamparter's avatar
      carl9170: usbid table updates · 8df86db9
      Christian Lamparter authored
      This patch includes the following updates:
       * add D-Link DWA-130 Rev D
       * Netgear has three WNDA3100 versions.
         the original WNDA3100 is now called WNDA3100v1.
      Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      8df86db9
    • Vivek Natarajan's avatar
      ath9k: Fix a DMA latency issue for Intel Pinetrail platforms. · 10598c12
      Vivek Natarajan authored
      Throughput was severely affected in Intel Pinetrail platforms
      because of a DMA problem in C3 state. This patch fixes this
      issue.
      Signed-off-by: default avatarVivek Natarajan <vnatarajan@atheros.com>
      CC: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      10598c12