1. 20 Apr, 2009 9 commits
  2. 19 Apr, 2009 3 commits
    • Marcel Holtmann's avatar
      Bluetooth: Add workaround for wrong HCI event in eSCO setup · 9499237a
      Marcel Holtmann authored
      The Broadcom chips with 2.1 firmware handle the fallback case to a SCO
      link wrongly when setting up eSCO connections.
      
        < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
            handle 11 voice setting 0x0060
        > HCI Event: Command Status (0x0f) plen 4
            Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
        > HCI Event: Connect Complete (0x03) plen 11
            status 0x00 handle 1 bdaddr 00:1E:3A:xx:xx:xx type SCO encrypt 0x01
      
      The Link Manager negotiates the fallback to SCO, but then sends out
      a Connect Complete event. This is wrong and the Link Manager should
      actually send a Synchronous Connection Complete event if the Setup
      Synchronous Connection has been used. Only the remote side is allowed
      to use Connect Complete to indicate the missing support for eSCO in
      the host stack.
      
      This patch adds a workaround for this which clearly should not be
      needed, but reality is that broken Broadcom devices are deployed.
      
      Based on a report by Ville Tervo <ville.tervo@nokia.com>
      Signed-off-by: default avatarMarcel Holtman <marcel@holtmann.org>
      9499237a
    • Marcel Holtmann's avatar
      Bluetooth: Fallback from eSCO to SCO on unspecified error · 732547f9
      Marcel Holtmann authored
      Some Bluetooth chips (like the ones from Texas Instruments) don't do
      proper eSCO negotiations inside the Link Manager. They just return an
      error code and in case of the Kyocera ED-8800 headset it is just a
      random error.
      
        < HCI Command: Setup Synchronous Connection 0x01|0x0028) plen 17
          handle 1 voice setting 0x0060
        > HCI Event: Command Status (0x0f) plen 4
          Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
        > HCI Event: Synchronous Connect Complete (0x2c) plen 17
          status 0x1f handle 257 bdaddr 00:14:0A:xx:xx:xx type eSCO
          Error: Unspecified Error
      
      In these cases it is up to the host stack to fallback to a SCO setup
      and so retry with SCO parameters.
      
      Based on a report by Nick Pelly <npelly@google.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      732547f9
    • Johan Hedberg's avatar
      Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP · e2139b32
      Johan Hedberg authored
      There is a missing call to rfcomm_dlc_clear_timer in the case that
      DEFER_SETUP is used and so the connection gets disconnected after the
      timeout even if it was successfully accepted previously.
      
      This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
      which will get called when the user accepts the connection by calling
      read() on the socket.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@nokia.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      e2139b32
  3. 17 Apr, 2009 21 commits
  4. 16 Apr, 2009 7 commits
    • David S. Miller's avatar
    • Tony Breeds's avatar
      ixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task() · 2238aff5
      Tony Breeds authored
      GCC warns:
      drivers/net/ixgbe/ixgbe_main.c: In function 'ixgbe_sfp_config_module_task':
      drivers/net/ixgbe/ixgbe_main.c:3920: warning: suggest parantheses around
      operand of '!' or change '&' to '&&' or '!' to '~'
      
      Which I think is right.  Bracket to remove ambiguity.
      Signed-off-by: default avatarTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2238aff5
    • Patrick McHardy's avatar
      netfilter: nf_nat: add support for persistent mappings · 98d500d6
      Patrick McHardy authored
      The removal of the SAME target accidentally removed one feature that is
      not available from the normal NAT targets so far, having multi-range
      mappings that use the same mapping for each connection from a single
      client. The current behaviour is to choose the address from the range
      based on source and destination IP, which breaks when communicating
      with sites having multiple addresses that require all connections to
      originate from the same IP address.
      
      Introduce a IP_NAT_RANGE_PERSISTENT option that controls whether the
      destination address is taken into account for selecting addresses.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12954Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      98d500d6
    • Johannes Berg's avatar
      ar9170: fix struct layout on arm · 1269fa73
      Johannes Berg authored
      arm will pad even between u8's, so mark the structs/unions
      packed. Fixes a build bug on arm due to BUILD_BUG_ON tests
      in the code.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      1269fa73
    • Pavel Roskin's avatar
      orinoco: correct timeout logic in __orinoco_hw_set_tkip_key() · 91fe9ca7
      Pavel Roskin authored
      If the value read from HERMES_RID_TXQUEUEEMPTY becomes 0 after exactly
      100 readings, we wrongly consider it a timeout.  Rewrite the clever
      while loop as a for loop that does the right thing and looks simpler.
      
      Reported by Juha Leppanen <juha_motorsportcom@luukku.com>
      Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      91fe9ca7
    • Gerrit Renker's avatar
      mac80211: Fragmentation threshold (typo) · 23a99840
      Gerrit Renker authored
      mac80211: Fragmentation threshold (typo)
      
      ieee80211_ioctl_siwfrag() sets the fragmentation_threshold to 2352
      when frame fragmentation is to be disabled, yet the corresponding
      'get' function tests for 2353 bytes instead.
      
      This causes user-space tools to display a fragmentation threshold
      of 2352 bytes even if fragmentation has been disabled.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      23a99840
    • Herton Ronaldo Krzesinski's avatar
      rt2x00: prevent double kfree when failing to register hardware · f05faa31
      Herton Ronaldo Krzesinski authored
      In a scenario where there isn't any firmware available, we will have a
      double kfree of rt2x00dev->spec.channels_info when ieee80211_register_hw
      returns an error status inside rt2x00lib_probe_hw.
      
      The problem is that if ieee80211_register_hw fails, we call
      rt2x00lib_remove_hw twice:
      * first inside rt2x00lib_probe_hw upon failure of ieee80211_register_hw
      * error status is returned to rt2x00lib_probe_dev, which then sees it and
        calls in this case rt2x00lib_remove_dev that will again run
        rt2x00lib_remove_hw
      
      Prevent this avoiding calling rt2x00lib_remove_hw inside
      rt2x00lib_probe_hw
      
      Problem was detected with CONFIG_DEBUG_PAGEALLOC=y, CONFIG_SLUB_DEBUG=y,
      CONFIG_SLUB_DEBUG_ON=y, that dumps this with no firmware available:
      
      rt61pci 0000:00:07.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
      wmaster0 (rt61pci): not using net_device_ops yet
      phy0: Selected rate control algorithm 'pid'
      phy0: Failed to initialize wep: -2
      phy0 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
      =============================================================================
      BUG kmalloc-128: Object already free
      -----------------------------------------------------------------------------
      
      INFO: Allocated in rt61pci_probe_hw+0x3e5/0x6e0 [rt61pci] age=340 cpu=0 pid=21
      INFO: Freed in rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] age=0 cpu=0 pid=21
      INFO: Slab 0xc13ac3e0 objects=23 used=10 fp=0xdd59f6e0 flags=0x400000c3
      INFO: Object 0xdd59f6e0 @offset=1760 fp=0xdd59f790
      
      Bytes b4 0xdd59f6d0:  15 00 00 00 b2 8a fb ff 5a 5a 5a 5a 5a 5a 5a 5a ....².ûÿZZZZZZZZ
        Object 0xdd59f6e0:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f6f0:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f700:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f710:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f720:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f730:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f740:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
        Object 0xdd59f750:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkkkkkkkkkk¥
       Redzone 0xdd59f760:  bb bb bb bb                                     »»»»
       Padding 0xdd59f788:  5a 5a 5a 5a 5a 5a 5a 5a                         ZZZZZZZZ
      Pid: 21, comm: stage1 Not tainted 2.6.29.1-desktop-1.1mnb #1
      Call Trace:
       [<c01abbb3>] print_trailer+0xd3/0x120
       [<c01abd37>] object_err+0x37/0x50
       [<c01acf57>] __slab_free+0xe7/0x2f0
       [<c01ad1de>] kfree+0x7e/0xd0
       [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
       [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
       [<e0e4a239>] rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib]
       [<e0e4acc7>] rt2x00lib_remove_dev+0x37/0x50 [rt2x00lib]
       [<e0e4b087>] rt2x00lib_probe_dev+0x1a7/0x3b0 [rt2x00lib]
       [<e0eb288f>] rt2x00pci_probe+0xdf/0x1ee [rt2x00pci]
       [<c026b9ee>] local_pci_probe+0xe/0x10
       [<c026c750>] pci_device_probe+0x60/0x80
       [<c02d5c2a>] driver_probe_device+0x9a/0x2e0
       [<c02d5ef9>] __driver_attach+0x89/0x90
       [<c02d541b>] bus_for_each_dev+0x4b/0x70
       [<c026c690>] ? pci_device_remove+0x0/0x40
       [<c02d59d9>] driver_attach+0x19/0x20
       [<c02d5e70>] ? __driver_attach+0x0/0x90
       [<c02d4cef>] bus_add_driver+0x1cf/0x2a0
       [<c026c690>] ? pci_device_remove+0x0/0x40
       [<c02d60c9>] driver_register+0x69/0x140
       [<c026c9b0>] __pci_register_driver+0x40/0x80
       [<e0ecc000>] ? rt61pci_init+0x0/0x19 [rt61pci]
       [<e0ecc017>] rt61pci_init+0x17/0x19 [rt61pci]
       [<c0101116>] do_one_initcall+0x26/0x1c0
       [<c01ab90c>] ? slab_pad_check+0x3c/0x120
       [<c01ab90c>] ? slab_pad_check+0x3c/0x120
       [<c01ac8da>] ? check_object+0xda/0x210
       [<c01b0026>] ? percpu_free+0x46/0x50
       [<c01ad09e>] ? __slab_free+0x22e/0x2f0
       [<c01b0026>] ? percpu_free+0x46/0x50
       [<c01b0026>] ? percpu_free+0x46/0x50
       [<c01b0026>] ? percpu_free+0x46/0x50
       [<c01687ec>] ? stop_machine_destroy+0x3c/0x40
       [<c015e515>] ? load_module+0xa5/0x1c50
       [<e0ec5000>] ? rt61pci_eepromregister_read+0x0/0x40 [rt61pci]
       [<e0eb2000>] ? rt2x00pci_write_tx_data+0x0/0x90 [rt2x00pci]
       [<c03ac2fb>] ? mutex_lock+0xb/0x20
       [<c03ac2fb>] ? mutex_lock+0xb/0x20
       [<c017ad16>] ? tracepoint_update_probe_range+0x76/0xa0
       [<c017ad6f>] ? tracepoint_module_notify+0x2f/0x40
       [<c03b02ed>] ? notifier_call_chain+0x2d/0x70
       [<c014f0ed>] ? __blocking_notifier_call_chain+0x4d/0x60
       [<c014f11a>] ? blocking_notifier_call_chain+0x1a/0x20
       [<c0160156>] sys_init_module+0x96/0x1d0
       [<c019dad6>] ? sys_munmap+0x46/0x60
       [<c0105546>] syscall_call+0x7/0xb
      FIX kmalloc-128: Object at 0xdd59f6e0 not freed
      rt61pci 0000:00:07.0: PCI INT A disabled
      rt61pci: probe of 0000:00:07.0 failed with error -2
      Signed-off-by: default avatarHerton Ronaldo Krzesinski <herton@mandriva.com.br>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      f05faa31