1. 13 Jun, 2008 6 commits
    • Randy Dunlap's avatar
      rt2x00: LEDS build failure · 6847aa5c
      Randy Dunlap authored
      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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      6847aa5c
    • Randy Dunlap's avatar
      rt2x00: INPUT build failure · e76328e4
      Randy Dunlap authored
      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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      e76328e4
    • Michael Buesch's avatar
      b43: Fix noise calculation WARN_ON · 98a3b2fe
      Michael Buesch authored
      This removes a WARN_ON that is responsible for the following koops:
      http://www.kerneloops.org/searchweek.php?search=b43_generate_noise_sample
      
      The comment in the patch describes why it's safe to simply remove
      the check.
      Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      98a3b2fe
    • Michael Buesch's avatar
      b43: Fix possible NULL pointer dereference in DMA code · 028118a5
      Michael Buesch authored
      This fixes a possible NULL pointer dereference in an error path of the
      DMA allocation error checking code. This is also necessary for a future
      DMA API change that is on its way into the mainline kernel that adds
      an additional dev parameter to dma_mapping_error().
      
      This patch moves the whole struct b43_dmaring struct initialization
      right before any DMA allocation operation.
      Reported-by: default avatarMiles Lane <miles.lane@gmail.com>
      Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      028118a5
    • Gertjan van Wingerde's avatar
      rt2x00: Restrict DMA to 32-bit addresses. · 051c256f
      Gertjan van Wingerde authored
      None of the rt2x00 PCI devices support 64-bit DMA addresses (they all
      only accept 32-bit buffer addresses). Hence it makes no sense to try to
      enable 64-bit DMA addresses. Only try to enable 32-bit DMA addresses.
      Signed-off-by: default avatarGertjan van Wingerde <gwingerde@kpnplanet.nl>
      Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      051c256f
    • Ivo van Doorn's avatar
      rt2x00: Don't kill guardian_urb when it wasn't created · edfa78b2
      Ivo van Doorn authored
      This fixes a "BUG: unable to handle kernel paging request"
      bug in rt73usb which was caused by killing the guardian_urb
      while it had never been allocated for rt73usb.
      Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      edfa78b2
  2. 12 Jun, 2008 17 commits
  3. 11 Jun, 2008 6 commits
    • Gerrit Renker's avatar
      dccp: Bug in initial acknowledgment number assignment · be4c798a
      Gerrit Renker authored
      Step 8.5 in RFC 4340 says for the newly cloned socket
      
                 Initialize S.GAR := S.ISS,
      
      but what in fact the code (minisocks.c) does is
      
                 Initialize S.GAR := S.ISR,
      
      which is wrong (typo?) -- fixed by the patch.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      be4c798a
    • Gerrit Renker's avatar
      dccp ccid-3: X truncated due to type conversion · 7deb0f85
      Gerrit Renker authored
      This fixes a bug in computing the inter-packet-interval t_ipi = s/X: 
      
       scaled_div32(a, b) uses u32 for b, but in "scaled_div32(s, X)" the type of the
       sending rate `X' is u64. Since X is scaled by 2^6, this truncates rates greater
       than 2^26 Bps (~537 Mbps).
      
      Using full 64-bit division now.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      7deb0f85
    • Gerrit Renker's avatar
      dccp ccid-3: TFRC reverse-lookup Bug-Fix · 1e8a287c
      Gerrit Renker authored
      This fixes a bug in the reverse lookup of p: given a value f(p), instead of p,
      the function returned the smallest tabulated value f(p).
      
      The smallest tabulated value of
      	 
         10^6 * f(p) =  sqrt(2*p/3) + 12 * sqrt(3*p/8) * (32 * p^3 + p) 
      
      for p=0.0001 is 8172. 
      
      Since this value is scaled by 10^6, the outcome of this bug is that a loss
      of 8172/10^6 = 0.8172% was reported whenever the input was below the table
      resolution of 0.01%.
      
      This means that the value was over 80 times too high, resulting in large spikes
      of the initial loss interval, thus unnecessarily reducing the throughput.
      
      Also corrected the printk format (%u for u32).
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      1e8a287c
    • Gerrit Renker's avatar
      dccp ccid-2: Bug-Fix - Ack Vectors need to be ignored on request sockets · 65907a43
      Gerrit Renker authored
      This fixes an oversight from an earlier patch, ensuring that Ack Vectors
      are not processed on request sockets.
      
      The issue is that Ack Vectors must not be parsed on request sockets, since
      the Ack Vector feature depends on the selection of the (TX) CCID. During the
      initial handshake the CCIDs are undefined, and so RFC 4340, 10.3 applies:
      
       "Using CCID-specific options and feature options during a negotiation
        for the corresponding CCID feature is NOT RECOMMENDED [...]"
      
      And it is not even possible: when the server receives the Request from the 
      client, the CCID and Ack vector features are undefined; when the Ack finalising
      the 3-way hanshake arrives, the request socket has not been cloned yet into a
      full socket. (This order is necessary, since otherwise the newly created socket
      would have to be destroyed whenever an option error occurred - a malicious
      hacker could simply send garbage options and exploit this.)
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      65907a43
    • Gerrit Renker's avatar
      dccp: Fix sparse warnings · 1e2f0e5e
      Gerrit Renker authored
      This patch fixes the following sparse warnings:
       * nested min(max()) expression:
         net/dccp/ccids/ccid3.c:91:21: warning: symbol '__x' shadows an earlier one
         net/dccp/ccids/ccid3.c:91:21: warning: symbol '__y' shadows an earlier one
         
       * Declaration of function prototypes in .c instead of .h file, resulting in
         "should it be static?" warnings. 
      
       * Declared "struct dccpw" static (local to dccp_probe).
       
       * Disabled dccp_delayed_ack() - not fully removed due to RFC 4340, 11.3
         ("Receivers SHOULD implement delayed acknowledgement timers ...").
      
       * Used a different local variable name to avoid
         net/dccp/ackvec.c:293:13: warning: symbol 'state' shadows an earlier one
         net/dccp/ackvec.c:238:33: originally declared here
      
       * Removed unused functions `dccp_ackvector_print' and `dccp_ackvec_print'.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      1e2f0e5e
    • Gerrit Renker's avatar
      dccp ccid-3: Bug-Fix - Zero RTT is possible · 3294f202
      Gerrit Renker authored
      In commit $(825de27d) (from 27th May, commit
      message `dccp ccid-3: Fix "t_ipi explosion" bug'), the CCID-3 window counter
      computation was fixed to cope with RTTs < 4 microseconds.
      
      Such RTTs can be found e.g. when running CCID-3 over loopback. The fix removed
      a check against RTT < 4, but introduced a divide-by-zero bug.
      
      All steady-state RTTs in DCCP are filtered using dccp_sample_rtt(), which
      ensures non-zero samples. However, a zero RTT is possible on initialisation,
      when there is no RTT sample from the Request/Response exchange.
      
      The fix is to use the fallback-RTT from RFC 4340, 3.4.
      
      This is also better than just fixing update_win_count() since it allows other
      parts of the code to always assume that the RTT is non-zero during the time
      that the CCID is used.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      3294f202
  4. 10 Jun, 2008 11 commits