1. 18 6月, 2008 17 次提交
    • D
      Revert "mac80211: Use skb_header_cloned() on TX path." · 3a5be7d4
      David S. Miller 提交于
      This reverts commit 608961a5.
      
      The problem is that the mac80211 stack not only needs to be able to
      muck with the link-level headers, it also might need to mangle all of
      the packet data if doing sw wireless encryption.
      
      This fixes kernel bugzilla #10903.  Thanks to Didier Raboud (for the
      bugzilla report), Andrew Prince (for bisecting), Johannes Berg (for
      bringing this bisection analysis to my attention), and Ilpo (for
      trying to analyze this purely from the TCP side).
      
      In 2.6.27 we can take another stab at this, by using something like
      skb_cow_data() when the TX path of mac80211 ends up with a non-NULL
      tx->key.  The ESP protocol code in the IPSEC stack can be used as a
      model for implementation.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a5be7d4
    • R
      af_unix: fix 'poll for write'/ connected DGRAM sockets · 3c73419c
      Rainer Weikusat 提交于
      The unix_dgram_sendmsg routine implements a (somewhat crude)
      form of receiver-imposed flow control by comparing the length of the
      receive queue of the 'peer socket' with the max_ack_backlog value
      stored in the corresponding sock structure, either blocking
      the thread which caused the send-routine to be called or returning
      EAGAIN. This routine is used by both SOCK_DGRAM and SOCK_SEQPACKET
      sockets. The poll-implementation for these socket types is
      datagram_poll from core/datagram.c. A socket is deemed to be writeable
      by this routine when the memory presently consumed by datagrams
      owned by it is less than the configured socket send buffer size. This
      is always wrong for connected PF_UNIX non-stream sockets when the
      abovementioned receive queue is currently considered to be full.
      'poll' will then return, indicating that the socket is writeable, but
      a subsequent write result in EAGAIN, effectively causing an
      (usual) application to 'poll for writeability by repeated send request
      with O_NONBLOCK set' until it has consumed its time quantum.
      
      The change below uses a suitably modified variant of the datagram_poll
      routines for both type of PF_UNIX sockets, which tests if the
      recv-queue of the peer a socket is connected to is presently
      considered to be 'full' as part of the 'is this socket
      writeable'-checking code. The socket being polled is additionally
      put onto the peer_wait wait queue associated with its peer, because the
      unix_dgram_sendmsg routine does a wake up on this queue after a
      datagram was received and the 'other wakeup call' is done implicitly
      as part of skb destruction, meaning, a process blocked in poll
      because of a full peer receive queue could otherwise sleep forever
      if no datagram owned by its socket was already sitting on this queue.
      Among this change is a small (inline) helper routine named
      'unix_recvq_full', which consolidates the actual testing code (in three
      different places) into a single location.
      Signed-off-by: NRainer Weikusat <rweikusat@mssgmbh.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c73419c
    • D
    • A
      tun: Proper handling of IPv6 header in tun driver when TUN_NO_PI is set · f09f7ee2
      Ang Way Chuang 提交于
      By default, tun.c running in TUN_TUN_DEV mode will set the protocol of
      packet to IPv4 if TUN_NO_PI is set. My program failed to work when I
      assumed that the driver will check the first nibble of packet,
      determine IP version and set the appropriate protocol.
      Signed-off-by: NAng Way Chuang <wcang@nav6.org>
      Acked-by: NMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f09f7ee2
    • R
      atl1: relax eeprom mac address error check · 58c7821c
      Radu Cristescu 提交于
      The atl1 driver tries to determine the MAC address thusly:
      
      	- If an EEPROM exists, read the MAC address from EEPROM and
      	  validate it.
      	- If an EEPROM doesn't exist, try to read a MAC address from
      	  SPI flash.
      	- If that fails, try to read a MAC address directly from the
      	  MAC Station Address register.
      	- If that fails, assign a random MAC address provided by the
      	  kernel.
      
      We now have a report of a system fitted with an EEPROM containing all
      zeros where we expect the MAC address to be, and we currently handle
      this as an error condition.  Turns out, on this system the BIOS writes
      a valid MAC address to the NIC's MAC Station Address register, but we
      never try to read it because we return an error when we find the all-
      zeros address in EEPROM.
      
      This patch relaxes the error check and continues looking for a MAC
      address even if it finds an illegal one in EEPROM.
      Signed-off-by: NRadu Cristescu <advantis@gmx.net>
      Signed-off-by: NJay Cliburn <jacliburn@bellsouth.net>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      58c7821c
    • D
      net/enc28j60: low power mode · 7dac6f8d
      David Brownell 提交于
      Keep enc28j60 chips in low-power mode when they're not in use.
      At typically 120 mA, these chips run hot even when idle; this
      low power mode cuts that power usage by a factor of around 100.
      
      This version provides a generic routine to poll a register until
      its masked value equals some value ... e.g. bit set or cleared.
      It's basically what the previous wait_phy_ready() did, but this
      version is generalized to support the handshaking needed to
      enter and exit low power mode.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NClaudio Lanconelli <lanconelli.claudio@eptar.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      7dac6f8d
    • D
      net/enc28j60: section fix · 6fd65882
      David Brownell 提交于
      Minor bugfixes to the enc28j60 driver ... wrong section marking,
      indentation, and bogus use of spi_bus_type.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NClaudio Lanconelli <lanconelli.claudio@eptar.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6fd65882
    • S
      sky2: 88E8040T pci device id · a3b4fced
      Stephen Hemminger 提交于
      Missed one pci id for 88E8040T.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a3b4fced
    • D
      netxen: download firmware in pci probe · 439b454e
      Dhananjay Phadke 提交于
      Downloading firmware in pci probe allows recovery in case of
      firmware failure by reloading the driver.
      
      Also reduced delays in firmware load.
      Signed-off-by: NDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      439b454e
    • D
      netxen: cleanup debug messages · dcd56fdb
      Dhananjay Phadke 提交于
      o Remove unnecessary debug prints and functions.
      o Explicitly specify pci class (0x020000) to avoid enabling
        management function.
      Signed-off-by: NDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      dcd56fdb
    • D
      netxen: remove global physical_port array · 3276fbad
      Dhananjay Phadke 提交于
      Store physical port number in netxen_adapter structure.
      Signed-off-by: NDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3276fbad
    • D
      netxen: fix portnum for hp mezz cards · dc515f2e
      Dhananjay Phadke 提交于
      This fixes a the issue where logical port number is set incorrectly
      for HP blade mezz cards.
      Signed-off-by: NDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      dc515f2e
    • J
      ibm_newemac: select CRC32 in Kconfig · 8b8091fb
      Josh Boyer 提交于
      The ibm_newemac driver requires ether_crc to be defined.  Apparently it is
      possible to generate a .config without CONFIG_CRC32 set which causes the
      following link errors if IBM_NEW_EMAC is selected:
      
        LD      .tmp_vmlinux1
      drivers/built-in.o: In function `emac_hash_mc':
      core.c:(.text+0x2f524): undefined reference to `crc32_le'
      core.c:(.text+0x2f528): undefined reference to `bitrev32'
      make: *** [.tmp_vmlinux1] Error 1
      
      This patch has IBM_NEW_EMAC select CRC32 so we don't hit this error.
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      8b8091fb
    • S
      xfrm: fix fragmentation for ipv4 xfrm tunnel · fe833fca
      Steffen Klassert 提交于
      When generating the ip header for the transformed packet we just copy
      the frag_off field of the ip header from the original packet to the ip
      header of the new generated packet. If we receive a packet as a chain
      of fragments, all but the last of the new generated packets have the
      IP_MF flag set. We have to mask the frag_off field to only keep the
      IP_DF flag from the original packet. This got lost with git commit
      36cf9acf ("[IPSEC]: Separate
      inner/outer mode processing on output")
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe833fca
    • P
      netfilter: nf_conntrack_h323: fix module unload crash · a56b8f81
      Patrick McHardy 提交于
      The H.245 helper is not registered/unregistered, but assigned to
      connections manually from the Q.931 helper. This means on unload
      existing expectations and connections using the helper are not
      cleaned up, leading to the following oops on module unload:
      
      CPU 0 Unable to handle kernel paging request at virtual address c00a6828, epc == 802224dc, ra == 801d4e7c
      Oops[#1]:
      Cpu 0
      $ 0   : 00000000 00000000 00000004 c00a67f0
      $ 4   : 802a5ad0 81657e00 00000000 00000000
      $ 8   : 00000008 801461c8 00000000 80570050
      $12   : 819b0280 819b04b0 00000006 00000000
      $16   : 802a5a60 80000000 80b46000 80321010
      $20   : 00000000 00000004 802a5ad0 00000001
      $24   : 00000000 802257a8
      $28   : 802a4000 802a59e8 00000004 801d4e7c
      Hi    : 0000000b
      Lo    : 00506320
      epc   : 802224dc ip_conntrack_help+0x38/0x74     Tainted: P
      ra    : 801d4e7c nf_iterate+0xbc/0x130
      Status: 1000f403    KERNEL EXL IE
      Cause : 00800008
      BadVA : c00a6828
      PrId  : 00019374
      Modules linked in: ip_nat_pptp ip_conntrack_pptp ath_pktlog wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_xauth ath_pci ath_dev ath_dfs ath_rate_atheros wlan ath_hal ip_nat_tftp ip_conntrack_tftp ip_nat_ftp ip_conntrack_ftp pppoe ppp_async ppp_deflate ppp_mppe pppox ppp_generic slhc
      Process swapper (pid: 0, threadinfo=802a4000, task=802a6000)
      Stack : 801e7d98 00000004 802a5a60 80000000 801d4e7c 801d4e7c 802a5ad0 00000004
              00000000 00000000 801e7d98 00000000 00000004 802a5ad0 00000000 00000010
              801e7d98 80b46000 802a5a60 80320000 80000000 801d4f8c 802a5b00 00000002
              80063834 00000000 80b46000 802a5a60 801e7d98 80000000 802ba854 00000000
              81a02180 80b7e260 81a021b0 819b0000 819b0000 80570056 00000000 00000001
              ...
      Call Trace:
       [<801e7d98>] ip_finish_output+0x0/0x23c
       [<801d4e7c>] nf_iterate+0xbc/0x130
       [<801d4e7c>] nf_iterate+0xbc/0x130
       [<801e7d98>] ip_finish_output+0x0/0x23c
       [<801e7d98>] ip_finish_output+0x0/0x23c
       [<801d4f8c>] nf_hook_slow+0x9c/0x1a4
      
      One way to fix this would be to split helper cleanup from the unregistration
      function and invoke it for the H.245 helper, but since ctnetlink needs to be
      able to find the helper for synchonization purposes, a better fix is to
      register it normally and make sure its not assigned to connections during
      helper lookup. The missing l3num initialization is enough for this, this
      patch changes it to use AF_UNSPEC to make it more explicit though.
      Reported-by: Nliannan <liannan@twsz.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a56b8f81
    • P
      netfilter: nf_conntrack_h323: fix memory leak in module initialization error path · 8a548868
      Patrick McHardy 提交于
      Properly free h323_buffer when helper registration fails.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a548868
    • P
      netfilter: nf_nat: fix RCU races · 68b80f11
      Patrick McHardy 提交于
      Fix three ct_extend/NAT extension related races:
      
      - When cleaning up the extension area and removing it from the bysource hash,
        the nat->ct pointer must not be set to NULL since it may still be used in
        a RCU read side
      
      - When replacing a NAT extension area in the bysource hash, the nat->ct
        pointer must be assigned before performing the replacement
      
      - When reallocating extension storage in ct_extend, the old memory must
        not be freed immediately since it may still be used by a RCU read side
      
      Possibly fixes https://bugzilla.redhat.com/show_bug.cgi?id=449315
      and/or http://bugzilla.kernel.org/show_bug.cgi?id=10875Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68b80f11
  2. 17 6月, 2008 16 次提交
  3. 15 6月, 2008 1 次提交
  4. 14 6月, 2008 6 次提交
    • I
      rt2x00: Add D-link DWA111 support · cb62eccd
      Ivo van Doorn 提交于
      Add new rt73usb USB ID for D-Link DWA111
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cb62eccd
    • T
      mac80211: add missing new line in debug print HT_DEBUG · 995ad6c5
      Tomas Winkler 提交于
      This patch adds '\n' in debug printk (wme.c HT DEBUG)
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      995ad6c5
    • A
      mac80211 : fix for iwconfig in ad-hoc mode · 5c5f9664
      Abhijeet Kolekar 提交于
      The patch checks interface status, if it is in IBSS_JOINED mode
      show cell id it is associated with.
      Signed-off-by: NAbhijeet Kolekar <abhijeet.kolekar@intel.com>
      Signed-off-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5c5f9664
    • M
      ssb: Fix coherent DMA mask for PCI devices · e6340361
      Michael Buesch 提交于
      This fixes setting the coherent DMA mask for PCI devices.
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e6340361
    • R
      rt2x00: LEDS build failure · 6847aa5c
      Randy Dunlap 提交于
      Config symbols that select LEDS_CLASS need to depend on NEW_LEDS so that
      undefined symbols are not used in the build.
      
      The alternative is to select NEW_LEDS, which some drivers do.
      
      This patch fixes the led_* symbols build errors.
      
      (.text+0x174cdc): undefined reference to `input_unregister_device'
      (.text+0x174d9f): undefined reference to `input_allocate_device'
      (.text+0x174e2d): undefined reference to `input_register_device'
      (.text+0x174e53): undefined reference to `input_free_device'
      rt2x00rfkill.c:(.text+0x176dc4): undefined reference to `input_allocate_polled_device'
      rt2x00rfkill.c:(.text+0x176e8b): undefined reference to `input_event'
      rt2x00rfkill.c:(.text+0x176e9f): undefined reference to `input_event'
      (.text+0x176eca): undefined reference to `input_unregister_polled_device'
      (.text+0x176efc): undefined reference to `input_free_polled_device'
      (.text+0x176f37): undefined reference to `input_free_polled_device'
      (.text+0x176fd8): undefined reference to `input_register_polled_device'
      (.text+0x1772c0): undefined reference to `led_classdev_resume'
      (.text+0x1772d4): undefined reference to `led_classdev_resume'
      (.text+0x1772e8): undefined reference to `led_classdev_resume'
      (.text+0x17730a): undefined reference to `led_classdev_suspend'
      (.text+0x17731e): undefined reference to `led_classdev_suspend'
      (.text+0x17732f): undefined reference to `led_classdev_suspend'
      rt2x00leds.c:(.text+0x177348): undefined reference to `led_classdev_unregister'
      rt2x00leds.c:(.text+0x1773c0): undefined reference to `led_classdev_register'
      rfkill-input.c:(.text+0x209e4c): undefined reference to `input_close_device'
      rfkill-input.c:(.text+0x209e53): undefined reference to `input_unregister_handle'
      rfkill-input.c:(.text+0x209ea1): undefined reference to `input_register_handle'
      rfkill-input.c:(.text+0x209eae): undefined reference to `input_open_device'
      rfkill-input.c:(.text+0x209ebb): undefined reference to `input_unregister_handle'
      rfkill-input.c:(.init.text+0x17405): undefined reference to `input_register_handler'
      rfkill-input.c:(.exit.text+0x194f): undefined reference to `input_unregister_handler'
      make[1]: *** [vmlinux] Error 1
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6847aa5c
    • R
      rt2x00: INPUT build failure · e76328e4
      Randy Dunlap 提交于
      Config symbols that select RFKILL need to depend on INPUT so that
      undefined symbols are not used in the build.
      
      This patch fixes the input_* symbols build errors.
      
      (.text+0x174cdc): undefined reference to `input_unregister_device'
      (.text+0x174d9f): undefined reference to `input_allocate_device'
      (.text+0x174e2d): undefined reference to `input_register_device'
      (.text+0x174e53): undefined reference to `input_free_device'
      rt2x00rfkill.c:(.text+0x176dc4): undefined reference to `input_allocate_polled_device'
      rt2x00rfkill.c:(.text+0x176e8b): undefined reference to `input_event'
      rt2x00rfkill.c:(.text+0x176e9f): undefined reference to `input_event'
      (.text+0x176eca): undefined reference to `input_unregister_polled_device'
      (.text+0x176efc): undefined reference to `input_free_polled_device'
      (.text+0x176f37): undefined reference to `input_free_polled_device'
      (.text+0x176fd8): undefined reference to `input_register_polled_device'
      (.text+0x1772c0): undefined reference to `led_classdev_resume'
      (.text+0x1772d4): undefined reference to `led_classdev_resume'
      (.text+0x1772e8): undefined reference to `led_classdev_resume'
      (.text+0x17730a): undefined reference to `led_classdev_suspend'
      (.text+0x17731e): undefined reference to `led_classdev_suspend'
      (.text+0x17732f): undefined reference to `led_classdev_suspend'
      rt2x00leds.c:(.text+0x177348): undefined reference to `led_classdev_unregister'
      rt2x00leds.c:(.text+0x1773c0): undefined reference to `led_classdev_register'
      rfkill-input.c:(.text+0x209e4c): undefined reference to `input_close_device'
      rfkill-input.c:(.text+0x209e53): undefined reference to `input_unregister_handle'
      rfkill-input.c:(.text+0x209ea1): undefined reference to `input_register_handle'
      rfkill-input.c:(.text+0x209eae): undefined reference to `input_open_device'
      rfkill-input.c:(.text+0x209ebb): undefined reference to `input_unregister_handle'
      rfkill-input.c:(.init.text+0x17405): undefined reference to `input_register_handler'
      rfkill-input.c:(.exit.text+0x194f): undefined reference to `input_unregister_handler'
      make[1]: *** [vmlinux] Error 1
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e76328e4