1. 13 11月, 2010 7 次提交
  2. 12 11月, 2010 2 次提交
    • S
      netfilter: ipv6: fix overlap check for fragments · 22e091e5
      Shan Wei 提交于
      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: NShan Wei <shanwei@cn.fujitsu.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      22e091e5
    • E
      netfilter: NF_HOOK_COND has wrong conditional · ac5aa2e3
      Eric Paris 提交于
      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: NEric Paris <eparis@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      ac5aa2e3
  3. 11 11月, 2010 6 次提交
  4. 10 11月, 2010 6 次提交
  5. 09 11月, 2010 19 次提交
    • E
      Bluetooth: Add MacBookAir3,1(2) support · 3e3ede7d
      Edgar (gimli) Hucek 提交于
      Adding the new MacBookAir3,1(2) to btusb.
      
      Output without the patch and btusb loaded :
      
      T:  Bus=03 Lev=02 Prnt=03 Port=02 Cnt=01 Dev#=  6 Spd=12  MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=05ac ProdID=821b Rev= 0.34
      S:  Manufacturer=Apple Inc.
      S:  Product=Bluetooth USB Host Controller
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  32 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  32 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      
      Output with the patch and btusb loaded :
      
      T:  Bus=03 Lev=02 Prnt=03 Port=02 Cnt=01 Dev#=  6 Spd=12  MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=05ac ProdID=821b Rev= 0.34
      S:  Manufacturer=Apple Inc.
      S:  Product=Bluetooth USB Host Controller
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  32 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  32 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      Signed-off-by: NEdgar (gimli) Hucek <gimli@dark-green.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      3e3ede7d
    • L
      Bluetooth: fix not setting security level when creating a rfcomm session · 63ce0900
      Luiz Augusto von Dentz 提交于
      This cause 'No Bonding' to be used if userspace has not yet been paired
      with remote device since the l2cap socket used to create the rfcomm
      session does not have any security level set.
      Signed-off-by: NLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>
      Acked-by: NVille Tervo <ville.tervo@nokia.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      63ce0900
    • G
      Bluetooth: fix endianness conversion in L2CAP · 4f8b691c
      Gustavo F. Padovan 提交于
      Last commit added a wrong endianness conversion. Fixing that.
      Reported-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      4f8b691c
    • S
      Bluetooth: fix unaligned access to l2cap conf data · bfaaeb3e
      steven miao 提交于
      In function l2cap_get_conf_opt() and l2cap_add_conf_opt() the address of
      opt->val sometimes is not at the edge of 2-bytes/4-bytes, so 2-bytes/4 bytes
      access will cause data misalignment exeception.  Use get_unaligned_le16/32
      and put_unaligned_le16/32 function to avoid data misalignment execption.
      Signed-off-by: Nsteven miao <realmz6@gmail.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      bfaaeb3e
    • M
      Bluetooth: Enable USB autosuspend by default on btusb · 556ea928
      Matthew Garrett 提交于
      We've done this for a while in Fedora without any obvious problems other
      than some interaction with input devices. Those should be fixed now, so
      let's try this in mainline.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      556ea928
    • J
      Bluetooth: Fix non-SSP auth request for HIGH security level sockets · bdb7524a
      Johan Hedberg 提交于
      When initiating dedicated bonding a L2CAP raw socket with HIGH security
      level is used. The kernel is supposed to trigger the authentication
      request in this case but this doesn't happen currently for non-SSP
      (pre-2.1) devices. The reason is that the authentication request happens
      in the remote extended features callback which never gets called for
      non-SSP devices. This patch fixes the issue by requesting also
      authentiation in the (normal) remote features callback in the case of
      non-SSP devices.
      
      This rule is applied only for HIGH security level which might at first
      seem unintuitive since on the server socket side MEDIUM is already
      enough for authentication. However, for the clients we really want to
      prefer the server side to decide the authentication requrement in most
      cases, and since most client sockets use MEDIUM it's better to be
      avoided on the kernel side for these sockets. The important socket to
      request it for is the dedicated bonding one and that socket uses HIGH
      security level.
      
      The patch is based on the initial investigation and patch proposal from
      Andrei Emeltchenko <endrei.emeltchenko@nokia.com>.
      Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      bdb7524a
    • R
      Bluetooth: fix hidp kconfig dependency warning · 96c99b47
      Randy Dunlap 提交于
      Fix kconfig dependency warning to satisfy dependencies:
      
      warning: (BT_HIDP && NET && BT && BT_L2CAP && INPUT || USB_HID && HID_SUPPORT && USB && INPUT) selects HID which has unmet direct dependencies (HID_SUPPORT && INPUT)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      96c99b47
    • R
      ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure · 48a7c3df
      Rajkumar Manoharan 提交于
      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: NRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      48a7c3df
    • R
      ath9k_htc: Fix probe failure if CONFIG_USB_DEBUG enabled · 490b3f4e
      Rajkumar Manoharan 提交于
      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: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      490b3f4e
    • H
      ath9k_htc: Add support for device ID 3346 · ac618d70
      Haitao Zhang 提交于
      This patch adds support for USB dongle with device ID 3346 from IMC Networks.
      Signed-off-by: NHaitao Zhang <minipanda@linuxrobot.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ac618d70
    • V
      ath9k_hw: Fix AR9280 surprise removal during frequent idle on/off · f119da30
      Vasanthakumar Thiagarajan 提交于
      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: NVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f119da30
    • D
      libertas: terminate scan when stopping interface · 2e30168b
      Daniel Drake 提交于
      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: NDaniel Drake <dsd@laptop.org>
      Acked-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2e30168b
    • B
      mac80211: unset SDATA_STATE_OFFCHANNEL when cancelling a scan · 352ffad6
      Brian Cavagnolo 提交于
      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: NBrian Cavagnolo <brian@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      352ffad6
    • F
      ath9k: check old power mode before clearing cycle counters · fbb078fc
      Felix Fietkau 提交于
      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: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fbb078fc
    • F
      cfg80211: fix a crash in dev lookup on dump commands · 3cc25e51
      Felix Fietkau 提交于
      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: NFelix Fietkau <nbd@openwrt.org>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3cc25e51
    • C
      carl9170: usbid table updates · 8df86db9
      Christian Lamparter 提交于
      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: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8df86db9
    • V
      ath9k: Fix a DMA latency issue for Intel Pinetrail platforms. · 10598c12
      Vivek Natarajan 提交于
      Throughput was severely affected in Intel Pinetrail platforms
      because of a DMA problem in C3 state. This patch fixes this
      issue.
      Signed-off-by: NVivek Natarajan <vnatarajan@atheros.com>
      CC: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      10598c12
    • R
      ath9k: Avoid HW opmode overridden on monitor mode changes · 5f841b41
      Rajkumar Manoharan 提交于
      The HW opmode is blindly set to monitor type on monitor mode
      change notification. This overrides the opmode when one of the
      interfaces is still running as non-monitor iftype. So the monitoring
      information needs to be maintained seperately.
      Signed-off-by: NRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5f841b41
    • L
      libipw: fix proc entry removal · 269e2d77
      Linus Torvalds 提交于
      This bug seems to be due to commit 27ae60f8 ("ipw2x00: replace
      "ieee80211" with "libipw" where appropriate"), where Pavel did this:
      
      -       libipw_proc = proc_mkdir(DRV_NAME, init_net.proc_net);
      +       libipw_proc = proc_mkdir("ieee80211", init_net.proc_net);
      
      but then the cleanup was kept as
      
              remove_proc_entry(DRV_NAME, init_net.proc_net);
      
      in both places (both in the failure case and in the unload case). The
      error string is also total crap, and says
      
           "Unable to create " DRV_NAME " proc directory\n");
      
      Even though it doesn't actually create a proc directory named DRV_NAME at all.
      
      So that patch looks like total and utter crap to me. The commit message says
      
        "Keep /proc/net/ieee80211 under the original name to avoid breaking user
          interface."
      
      but the thing is, it really didn't fix anything but that one create
      thing. It needs to fix all the other cases too.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      269e2d77