1. 07 11月, 2008 7 次提交
    • M
      iwl3945: clear scanning bits upon failure · 2420ebc1
      Mohamed Abbas 提交于
      This patch ensures we clear any scan status bit when
      an error occurs while sending the scan command. It is
      the implementation of patch:
      "iwlwifi: clear scanning bits upon failure"
      for iwl3945.
      Signed-off-by: NMohamed Abbas <mohamed.abbas@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2420ebc1
    • B
      ath5k: correct handling of rx status fields · c7930339
      Bob Copeland 提交于
      ath5k_rx_status fields rs_antenna and rs_more are u8s, but we
      were setting them with bitwise ANDs of 32-bit values.
      
      As a consequence, jumbo frames would not be discarded as intended.
      Then, because the hw rate value of such frames is zero, and, since
      "ath5k: rates cleanup", we do not fall back to the basic rate, such
      packets would trigger the following WARN_ON:
      
      ------------[ cut here ]------------
      WARNING: at net/mac80211/rx.c:2192 __ieee80211_rx+0x4d/0x57e [mac80211]()
      Modules linked in: ath5k af_packet sha256_generic aes_i586 aes_generic cbc loop i915 drm binfmt_misc acpi_cpufreq fan container nls_utf8 hfsplus dm_crypt dm_mod kvm_intel kvm fuse sbp2 snd_hda_intel snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss arc4 joydev hid_apple ecb snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device usbhid appletouch mac80211 sky2 snd ehci_hcd ohci1394 bitrev crc32 sr_mod cdrom rtc sg uhci_hcd snd_page_alloc cfg80211 ieee1394 thermal ac battery processor button evdev unix [last unloaded: ath5k]
      Pid: 0, comm: swapper Tainted: G        W  2.6.28-rc2-wl #14
      Call Trace:
       [<c0123d1e>] warn_on_slowpath+0x41/0x5b
       [<c012005d>] ? sched_debug_show+0x31e/0x9c6
       [<c012489f>] ? vprintk+0x369/0x389
       [<c0309539>] ? _spin_unlock_irqrestore+0x54/0x58
       [<c011cd8f>] ? try_to_wake_up+0x14f/0x15a
       [<f81918cb>] __ieee80211_rx+0x4d/0x57e [mac80211]
       [<f828872a>] ath5k_tasklet_rx+0x5a1/0x5e4 [ath5k]
       [<c013b9cd>] ? clockevents_program_event+0xd4/0xe3
       [<c01283a9>] tasklet_action+0x94/0xfd
       [<c0127d19>] __do_softirq+0x8c/0x13e
       [<c0127e04>] do_softirq+0x39/0x55
       [<c0128082>] irq_exit+0x46/0x85
       [<c010576c>] do_IRQ+0x9a/0xb2
       [<c010461c>] common_interrupt+0x28/0x30
       [<f80e934a>] ? acpi_idle_enter_bm+0x2ad/0x31b [processor]
       [<c02976bf>] cpuidle_idle_call+0x65/0x9a
       [<c010262c>] cpu_idle+0x76/0xa6
       [<c02fb402>] rest_init+0x62/0x64
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c7930339
    • D
      zd1211rw: Add 2 device IDs · 0feec9df
      Daniel Drake 提交于
      07fa/1196
      Bewan BWIFI-USB54AR: Tested by night1308, this device is a ZD1211B with
      an AL2230S radio.
      
      0ace/b215
      HP 802.11abg: Tested by Robert Philippe
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0feec9df
    • J
      Fix logic error in rfkill_check_duplicity · 4a9d9167
      Jonathan McDowell 提交于
      > I'll have a prod at why the [hso] rfkill stuff isn't working next
      
      Ok, I believe this is due to the addition of rfkill_check_duplicity in
      rfkill and the fact that test_bit actually returns a negative value
      rather than the postive one expected (which is of course equally true).
      So when the second WLAN device (the hso device, with the EEE PC WLAN
      being the first) comes along rfkill_check_duplicity returns a negative
      value and so rfkill_register returns an error. Patch below fixes this
      for me.
      Signed-Off-By: NJonathan McDowell <noodles@earth.li>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4a9d9167
    • J
      iwlagn: avoid sleep in softirq context · 964d2777
      John W. Linville 提交于
      __ieee80211_tasklet_handler -> __ieee80211_rx ->
      	__ieee80211_rx_handle_packet -> ieee80211_invoke_rx_handlers ->
      	ieee80211_rx_h_decrypt -> ieee80211_crypto_tkip_decrypt ->
      	ieee80211_tkip_decrypt_data -> iwl4965_mac_update_tkip_key ->
      	iwl_scan_cancel_timeout -> msleep
      
      Ooops!
      
      Avoid the sleep by changing iwl_scan_cancel_timeout with
      iwl_scan_cancel and simply returning on failure if the scan persists.
      This will cause hardware decryption to fail and we'll handle a few more
      frames with software decryption.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      964d2777
    • M
      iwlwifi: clear scanning bits upon failure · 502c12e1
      Mohamed Abbas 提交于
      In iwl_bg_request_scan function, if we could not send a
      scan command it will go to done.
      In done it does the right thing to call mac80211 with
      scan complete, but the problem is STATUS_SCAN_HW is still
      set causing any future scan to fail. Fix by clearing the scanning status
      bits if scan fails.
      Signed-off-by: NMohamed Abbas <mohamed.abbas@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      502c12e1
    • J
      Revert "ath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode" · 934f6c3f
      John W. Linville 提交于
      Unfortunately, the result was that mac80211 didn't see all the beacons
      it actually wanted to see.  This caused lost associations.
      
      Hopefully we can revisit this when mac80211 is less greedy about seeing
      beacons directly...
      
      This reverts commit 06327906.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      934f6c3f
  2. 04 11月, 2008 9 次提交
  3. 03 11月, 2008 4 次提交
  4. 02 11月, 2008 5 次提交
  5. 01 11月, 2008 1 次提交
    • A
      key: fix setkey(8) policy set breakage · 920da692
      Alexey Dobriyan 提交于
      Steps to reproduce:
      
      	#/usr/sbin/setkey -f
      	flush;
      	spdflush;
      
      	add 192.168.0.42 192.168.0.1 ah 24500 -A hmac-md5 "1234567890123456";
      	add 192.168.0.42 192.168.0.1 esp 24501 -E 3des-cbc "123456789012123456789012";
      
      	spdadd 192.168.0.42 192.168.0.1 any -P out ipsec
      		esp/transport//require
      		ah/transport//require;
      
      setkey: invalid keymsg length
      
      Policy dump will bail out with the same message after that.
      
      -recv(4, "\2\16\0\0\32\0\3\0\0\0\0\0\37\r\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208
      +recv(4, "\2\16\0\0\36\0\3\0\0\0\0\0H\t\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      920da692
  6. 31 10月, 2008 14 次提交
    • I
      bpa10x: free sk_buff with kfree_skb · cbafe312
      Ilpo Järvinen 提交于
      Inspired by Sergio Luis' similar patches, I finally found
      a case which is trivial enough that spatch won't choke
      on it.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbafe312
    • F
      xfrm: do not leak ESRCH to user space · a4322266
      fernando@oss.ntt.co 提交于
      I noticed that, under certain conditions, ESRCH can be leaked from the
      xfrm layer to user space through sys_connect. In particular, this seems
      to happen reliably when the kernel fails to resolve a template either
      because the AF_KEY receive buffer being used by racoon is full or
      because the SA entry we are trying to use is in XFRM_STATE_EXPIRED
      state.
      
      However, since this could be a transient issue it could be argued that
      EAGAIN would be more appropriate. Besides this error code is not even
      documented in the man page for sys_connect (as of man-pages 3.07).
      Signed-off-by: NFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4322266
    • D
      net: Really remove all of LOOPBACK_TSO code. · 3a8af722
      David S. Miller 提交于
      As noticed by Saikiran Madugula, commit 7447ef63
      ("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
      emulate_large_send_offload() but didn't get rid of the call
      site as well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a8af722
    • D
    • A
      netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys() · 61e57448
      Alexey Dobriyan 提交于
      register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
      also used (compiled in or loaded).
      
      Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
      The former shutdowns and frees GRE piece of netns, however the latter
      absolutely needs it to flush keymap. Oops is inevitable.
      
      Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
      netns ops list.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61e57448
    • A
      netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys · 485ac57b
      Alexey Dobriyan 提交于
      netns ops which are registered with register_pernet_gen_device() are
      shutdown strictly before those which are registered with
      register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
      shutdown ordering between two modules.
      
      Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
      which aren't elite enough for entry in struct net, and which can't use
      register_pernet_gen_device(). PPTP conntracking module is such one.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      485ac57b
    • R
      net: delete excess kernel-doc notation · ad1d967c
      Randy Dunlap 提交于
      Remove excess kernel-doc function parameters from networking header
      & driver files:
      
      Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
      Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
      Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad1d967c
    • D
    • D
    • D
      pppoe: Fix socket leak. · 263e69cb
      David S. Miller 提交于
      Move SKB trim before we lookup the socket so we don't have to
      put it on failure.
      
      Based upon an initial patch by Jarek Poplawski and suggestions
      from Herbert Xu.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      263e69cb
    • T
      gianfar: Don't reset TBI<->SerDes link if it's already up · bdb59f94
      Trent Piepho 提交于
      The link may be up already via the chip's reset strapping, or though action
      of U-Boot, or from the last time the interface was brought up.  Resetting
      the link causes it to go down for several seconds.  This can significantly
      increase the time from power-on to DHCP completion and a device being
      accessible to the network.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Acked-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      bdb59f94
    • T
      gianfar: Fix race in TBI/SerDes configuration · c132419e
      Trent Piepho 提交于
      The init_phy() function attaches to the PHY, then configures the
      SerDes<->TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
      (sort of) and is accessed via the gianfar's MDIO registers, using the
      functions gfar_local_mdio_read/write(), which don't do any locking.
      
      The previously attached PHY will start a work-queue on a timer, and
      probably an irq handler as well, which will talk to the PHY and thus use
      the MDIO bus.  This uses phy_read/write(), which have locking, but not
      against the gfar_local_mdio versions.
      
      The result is that PHY code will try to use the MDIO bus at the same time
      as the SerDes setup code, corrupting the transfers.
      
      Setting up the SerDes before attaching to the PHY will insure that there is
      no race between the SerDes code and *our* PHY, but doesn't fix everything.
      Typically the PHYs for all gianfar devices are on the same MDIO bus, which
      is associated with the first gianfar device.  This means that the first
      gianfar's SerDes code could corrupt the MDIO transfers for a different
      gianfar's PHY.
      
      The lock used by phy_read/write() is contained in the mii_bus structure,
      which is pointed to by the PHY.  This is difficult to access from the
      gianfar drivers, as there is no link between a gianfar device and the
      mii_bus which shares the same MDIO registers.  As far as the device layer
      and drivers are concerned they are two unrelated devices (which happen to
      share registers).
      
      Generally all gianfar devices' PHYs will be on the bus associated with the
      first gianfar.  But this might not be the case, so simply locking the
      gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
      code is going to use.
      
      We solve this by having the code that creates the gianfar platform device
      look in the device tree for an mdio device that shares the gianfar's
      registers.  If one is found the ID of its platform device is saved in the
      gianfar's platform data.
      
      A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
      ID to search through the platform devices for a gianfar_mdio device with
      the right ID.  The platform device's driver data is the mii_bus structure,
      which the SerDes setup code can use to lock the current bus.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c132419e
    • D
      at91_ether: request/free GPIO for PHY interrupt · 71527ef4
      David Brownell 提交于
      When the at91_ether driver is using a GPIO for its PHY interrupt,
      be sure to request (and later, if needed, free) that GPIO.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      71527ef4
    • C
      amd8111e: fix dma_free_coherent context · e83603fd
      Chunbo Luo 提交于
      Acoording commit aa24886e,
      dma_free_coherent() need irqs enabled.
      
      This patch fix following warning messages:
      
      WARNING: at linux/arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0xaa/0xb0()
      
      Call Trace:
       [<ffffffff8023f80f>] warn_on_slowpath+0x5f/0x90
       [<ffffffff80496ffa>] ? __kfree_skb+0x3a/0xa0
       [<ffffffff802a4723>] ? discard_slab+0x23/0x40
       [<ffffffff8021274a>] dma_free_coherent+0xaa/0xb0
       [<ffffffff8043668f>] amd8111e_close+0x10f/0x1b0
       [<ffffffff8049f3ae>] dev_close+0x5e/0xb0
       [<ffffffff8049efa1>] dev_change_flags+0xa1/0x1e0
       [<ffffffff806b2171>] ic_close_devs+0x36/0x4e
       [<ffffffff806b29ee>] ip_auto_config+0x581/0x10f3
       [<ffffffff803a6e19>] ? kobject_add+0x69/0x90
       [<ffffffff803a698a>] ? kobject_get+0x1a/0x30
       [<ffffffff803a785b>] ? kobject_uevent+0xb/0x10
       [<ffffffff803a6c62>] ? kset_register+0x52/0x60
       [<ffffffff803a6f9b>] ? kset_create_and_add+0x6b/0xa0
       [<ffffffff804e2e74>] ? tcp_ca_find+0x24/0x50
       [<ffffffff806b246d>] ? ip_auto_config+0x0/0x10f3
       [<ffffffff8020903c>] _stext+0x3c/0x150
       [<ffffffff802772d3>] ? register_irq_proc+0xd3/0xf0
       [<ffffffff802f0000>] ? mb_cache_create+0x80/0x1f0
       [<ffffffff80688693>] kernel_init+0x141/0x1b8
       [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
       [<ffffffff8020d609>] child_rip+0xa/0x11
       [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
       [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
       [<ffffffff8020d5ff>] ? child_rip+0x0/0x11
      Signed-off-by: NChunbo Luo <chunbo.luo@windriver.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e83603fd