26 Feb, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (41 commits)
    HID: usbhid: initialize interface pointers early enough
    HID: extend mask for BUTTON usage page
    HID: hid-ntrig: Single touch mode tap
    HID: hid-ntrig: multitouch cleanup and fix
    HID: n-trig: remove unnecessary tool switching
    HID: hid-ntrig add multi input quirk and clean up
    HID: usbhid: introduce timeout for stuck ctrl/out URBs
    HID: magicmouse: coding style and probe failure fixes
    HID: remove MODULE_VERSION from new drivers
    HID: fix up Kconfig entry for MagicMouse
    HID: add a device driver for the Apple Magic Mouse.
    HID: Export hid_register_report
    HID: Support for MosArt multitouch panel
    HID: add pressure support for the Stantum multitouch panel
    HID: fixed bug in single-touch emulation on the stantum panel
    HID: fix typo in error message
    HID: add mapping for "AL Network Chat" usage
    HID: use multi input quirk for TouchPack touchscreen
    HID: make full-fledged hid-bus drivers properly selectable
    HID: make Wacom modesetting failures non-fatal
    ...

    Linus Torvalds
     

06 Feb, 2010

1 commit

  • The report descriptor is read by user space (via the Service
    Discovery Protocol), so it is only available during the ioctl
    to connect. However, the HID probe function that needs the
    descriptor might not be called until a specific module is
    loaded. Keep a copy of the descriptor so it is available for
    later use.

    Signed-off-by: Michael Poole
    Signed-off-by: Marcel Holtmann

    Michael Poole
     

04 Feb, 2010

4 commits

  • When in sniff mode with a long interval time (1.28s) it can take 4+ seconds
    to establish a SCO link. Fix by requesting active mode before requesting
    SCO connection. This improves SCO setup time to ~500ms.

    Bluetooth headsets that use a long interval time, and exhibit the long
    SCO connection time include Motorola H790, HX1 and H17. They have a
    CSR 2.1 chipset.

    Verified this behavior and fix with host Bluetooth chipsets: BCM4329 and
    TI1271.

    2009-10-13 14:17:46.183722 > HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 1 mode 0x02 interval 2048
    Mode: Sniff
    2009-10-13 14:17:53.436285 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
    2009-10-13 14:17:53.445593 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
    2009-10-13 14:17:57.788855 > HCI Event: Synchronous Connect Complete 0x2c) plen 17
    status 0x00 handle 257 bdaddr 00:1A:0E:F1:A4:7F type eSCO
    Air mode: CVSD

    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     
  • When processing a RFCOMM UA frame when the socket is closed and we were
    not the RFCOMM initiator would cause rfcomm_session_put() to be called
    twice during rfcomm_process_rx(). This would cause a kernel panic in
    rfcomm_session_close() then.

    This could be easily reproduced during disconnect with devices such as
    Motorola H270 that send RFCOMM UA followed quickly by L2CAP disconnect
    request. This trace for this looks like:

    2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
    RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
    2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
    2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
    RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
    2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
    RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
    2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
    2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
    RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
    2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041

    Avoid calling rfcomm_session_put() twice by skipping this call
    in rfcomm_recv_ua() if the socket is closed.

    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     
  • With the commit 9e726b17422bade75fba94e625cd35fd1353e682 the
    rfcomm_session_put() gets accidentially called from a timeout
    callback and results in this:

    BUG: sleeping function called from invalid context at net/core/sock.c:1897
    in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
    Pid: 0, comm: swapper Tainted: P 2.6.32 #31
    Call Trace:
    [] __might_sleep+0xf8/0xfa
    [] lock_sock_nested+0x29/0xc4
    [] lock_sock+0xb/0xd [l2cap]
    [] l2cap_sock_shutdown+0x1c/0x76 [l2cap]
    [] ? clockevents_program_event+0x75/0x7e
    [] ? tick_dev_program_event+0x37/0xa5
    [] l2cap_sock_release+0x27/0x67 [l2cap]
    [] sock_release+0x1a/0x67
    [] rfcomm_session_del+0x34/0x53 [rfcomm]
    [] rfcomm_session_put+0x14/0x16 [rfcomm]
    [] rfcomm_session_timeout+0xe/0x1a [rfcomm]
    [] run_timer_softirq+0x1e2/0x29a
    [] ? rfcomm_session_timeout+0x0/0x1a [rfcomm]
    [] __do_softirq+0xfe/0x1c5
    [] ? timer_interrupt+0x1a/0x21
    [] call_softirq+0x1c/0x28
    [] do_softirq+0x33/0x6b
    [] irq_exit+0x36/0x85
    [] do_IRQ+0xa6/0xbd
    [] ret_from_intr+0x0/0xa
    [] ? acpi_idle_enter_bm+0x269/0x294
    [] ? acpi_idle_enter_bm+0x25f/0x294
    [] ? cpuidle_idle_call+0x97/0x107
    [] ? cpu_idle+0x53/0xaa
    [] ? rest_init+0x7a/0x7c
    [] ? start_kernel+0x389/0x394
    [] ? x86_64_start_reservations+0xac/0xb0
    [] ? x86_64_start_kernel+0xe4/0xeb

    To fix this, the rfcomm_session_put() needs to be moved out of
    rfcomm_session_timeout() into rfcomm_process_sessions(). In that
    context it is perfectly fine to sleep and disconnect the socket.

    Signed-off-by: Marcel Holtmann
    Tested-by: David John

    Marcel Holtmann
     
  • General Motors carkits that use LGE BT chipsets return this error code
    when an eSCO is attempted, despite advertising eSCO support.

    2009-08-13 14:41:39.755518 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
    2009-08-13 14:41:39.757563 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
    2009-08-13 14:41:39.789484 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x1a handle 257 bdaddr 00:1E:B2:23:5E:B3 type eSCO
    Error: Unsupported Remote Feature / Unsupported LMP Feature

    Signed-off-by: Jaikumar Ganesh
    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     

03 Feb, 2010

1 commit

  • In commit 2da31939a42 ("Bluetooth: Implement raw output support for HIDP
    layer"), support for Bluetooth hid_output_raw_report was added, but it
    pushes the data to the intr socket instead of the ctrl one. This has been
    fixed by 6bf8268f9a91f1 ("Bluetooth: Use the control channel for raw HID reports")

    Still, it is necessary to distinguish whether the report in question should be
    either FEATURE or OUTPUT. For this, we have to extend the generic HID API,
    so that hid_output_raw_report() callback provides means to specify this
    value so that it can be passed down to lower level hardware drivers (currently
    Bluetooth and USB).

    Based on original patch by Bastien Nocera
    Acked-by: Marcel Holtmann
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

30 Jan, 2010

3 commits


18 Dec, 2009

4 commits


10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

08 Dec, 2009

1 commit


04 Dec, 2009

13 commits

  • fix some typos and punctuation in comments

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: Jiri Kosina

    Thadeu Lima de Souza Cascardo
     
  • By default the RFCOMM layer would still use L2CAP basic mode. For testing
    purposes this option enables RFCOMM to select enhanced retransmission
    mode.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • For testing purposes it is important to modify the max transmit value.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • SendRRorRNR needs to acknowledge received I-frames (actually every packet
    needs to acknowledge received I-frames by sending the proper packet
    sequence number), so ReqSeq is set to the next I-frame number sequence to
    be pulled by the reassembly function.
    SendRRorRNR tells the remote side about local busy conditions, it sends
    a Receiver Ready frame if local busy is false or a Receiver Not Ready
    if local busy is true.
    ReqSeq is the packet's field to send the number of the acknowledged
    packets.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • RejActioned is used to prevent retransmission when a entity is on the
    WAIT_F state, i.e., waiting for a frame with F-bit set due local busy
    condition or a expired retransmission timer. (When these two events raise
    they send a frame with the Poll bit set and enters in the WAIT_F state to
    wait for a frame with the Final bit set.)
    The local entity doesn't send I-frames(the data frames) until the receipt
    of a frame with F-bit set. When that happens it also set RejActioned to false.
    RejActioned is a mandatory feature of ERTM spec.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • As specified by ERTM spec an ERTM channel can acknowledge received
    I-frames(the data frames) by sending an I-frame with the proper ReqSeq
    value (i.e. ReqSeq is set to BufferSeq). Until now we aren't setting the
    ReqSeq value on I-frame control bits. That way we can save sending
    S-frames(Supervise frames) only to acknowledge receipt of I-frames. It
    is very helpful to the full-duplex channel.
    ReqSeq is the packet sequence number sent in an acknowledgement frame to
    acknowledge receipt of frames up to (ReqSeq - 1).
    BufferSeq controls the receiver buffer, it is used to delay
    acknowledgement of new frames to not cause buffer overflow. BufferSeq
    value is not increased until frames are pulled by reassembly function.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • SrejActioned is a flag that when set prevents local side to retransmit a
    I-frame(the data frame) already retransmitted. The local entity can
    retransmit again only when it receives a SREJ frame with the F-bit set.
    SREJ frame - Selective Reject frame - is sent when an entity wants the
    retransmission of a specific I-frame that was lost or corrupted.
    This bug can put ERTM in an unknown state once the entity can't
    retransmit.
    A frame with the Final bit set is expected when the local side sends a
    frame with the Poll bit set due to a local busy condition or a
    retransmission timer expired. (Receipt of P-bit shall always be replied by
    a frame with the F-bit set).
    pi->conn_state keeps informations about many ERTM flags including
    SrejActioned.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • Fix ERTM's full-duplex channel to work as specified by ERTM spec. ERTM
    needs to handle state vars, timers and counters to send and receive
    I-frames(the data frames), i.e., for both sides of data communication.
    We initialize all of them to the default values here.
    Full-duplex channel is a mandatory feature of ERTM spec.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • According to BNEP test specification the proper response should be sent
    for a setup connection request message after the BNEP connection setup
    has been completed.

    Signed-off-by: Vikram Kandukuri
    Signed-off-by: Marcel Holtmann

    Vikram Kandukuri
     
  • The tasklet schedule function helpers are just an obfuscation. So remove
    them and call the schedule functions directly.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • For future simplification it is important that the hci_recv_frame
    function is no longer an inline function. So move it into the module
    itself and export it.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • Sending commands to a down interface results in a timeout while clearly
    it should just return ENETDOWN. When using the ioctls this works fine,
    but not when using the HCI sockets sendmsg interface.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • Implement raw output callback which is used by hidraw to send raw data to
    the underlying device.

    Without this patch, the userspace hidraw-based applications can't send
    output reports to HID Bluetooth devices.

    Reported-and-tested-by: Brian Gunn
    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann

    Jiri Kosina
     

30 Nov, 2009

1 commit


17 Nov, 2009

1 commit


16 Nov, 2009

3 commits

  • Basic Mode is the default mode of operation of a L2CAP entity. In
    this case the RFC (Retransmission and Flow Control) configuration
    option should not be used at all.

    Normally remote L2CAP implementation should just ignore this option,
    but it can cause various side effects with other Bluetooth stacks
    that are not capable of handling unknown options.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • The default mode for SOCK_SEQPACKET is Basic Mode. So when no
    mode has been specified, Basic Mode shall be used.

    This is important for current application to keep working as
    expected and not cause a regression.

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • This patch fixes double pairing issues with Secure Simple
    Paring support. It was observed that when pairing with SSP
    enabled, that the confirmation will be asked twice.

    http://www.spinics.net/lists/linux-bluetooth/msg02473.html

    This also causes bug when initiating SSP connection from
    Windows Vista.

    The reason is because bluetoothd does not store link keys
    since HCIGETAUTHINFO returns 0. Setting default to general
    bonding fixes these issues.

    Signed-off-by: Andrei Emeltchenko
    Signed-off-by: Marcel Holtmann

    Andrei Emeltchenko
     

06 Nov, 2009

2 commits

  • Before calling capable(CAP_NET_RAW) check if this operations is on behalf
    of the kernel or on behalf of userspace. Do not do the security check if
    it is on behalf of the kernel.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     
  • The generic __sock_create function has a kern argument which allows the
    security system to make decisions based on if a socket is being created by
    the kernel or by userspace. This patch passes that flag to the
    net_proto_family specific create function, so it can do the same thing.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     

27 Oct, 2009

1 commit


20 Oct, 2009

2 commits

  • When shutdown ppp connection, lockdep waring about non-static key
    will happen, it is caused by the lock is not initialized properly
    at that time.

    Fix with tuning the lock/skb_queue_head init order

    [ 94.339261] INFO: trying to register non-static key.
    [ 94.342509] the code is fine but needs lockdep annotation.
    [ 94.342509] turning off the locking correctness validator.
    [ 94.342509] Pid: 0, comm: swapper Not tainted 2.6.31-mm1 #2
    [ 94.342509] Call Trace:
    [ 94.342509] [] register_lock_class+0x58/0x241
    [ 94.342509] [] ? __lock_acquire+0xb57/0xb73
    [ 94.342509] [] __lock_acquire+0xac/0xb73
    [ 94.342509] [] ? lock_release_non_nested+0x17b/0x1de
    [ 94.342509] [] lock_acquire+0x67/0x84
    [ 94.342509] [] ? skb_dequeue+0x15/0x41
    [ 94.342509] [] _spin_lock_irqsave+0x2f/0x3f
    [ 94.342509] [] ? skb_dequeue+0x15/0x41
    [ 94.342509] [] skb_dequeue+0x15/0x41
    [ 94.342509] [] ? _read_unlock+0x1d/0x20
    [ 94.342509] [] skb_queue_purge+0x14/0x1b
    [ 94.342509] [] l2cap_recv_frame+0xea1/0x115a [l2cap]
    [ 94.342509] [] ? __lock_acquire+0xb57/0xb73
    [ 94.342509] [] ? mark_lock+0x1e/0x1c7
    [ 94.342509] [] ? hci_rx_task+0xd2/0x1bc [bluetooth]
    [ 94.342509] [] l2cap_recv_acldata+0xb1/0x1c6 [l2cap]
    [ 94.342509] [] hci_rx_task+0x106/0x1bc [bluetooth]
    [ 94.342509] [] ? l2cap_recv_acldata+0x0/0x1c6 [l2cap]
    [ 94.342509] [] tasklet_action+0x69/0xc1
    [ 94.342509] [] __do_softirq+0x94/0x11e
    [ 94.342509] [] do_softirq+0x36/0x5a
    [ 94.342509] [] irq_exit+0x35/0x68
    [ 94.342509] [] do_IRQ+0x72/0x89
    [ 94.342509] [] common_interrupt+0x2e/0x34
    [ 94.342509] [] ? pm_qos_add_requirement+0x63/0x9d
    [ 94.342509] [] ? acpi_idle_enter_bm+0x209/0x238
    [ 94.342509] [] cpuidle_idle_call+0x5c/0x94
    [ 94.342509] [] cpu_idle+0x4e/0x6f
    [ 94.342509] [] rest_init+0x53/0x55
    [ 94.342509] [] start_kernel+0x2f0/0x2f5
    [ 94.342509] [] i386_start_kernel+0x91/0x96

    Reported-by: Oliver Hartkopp
    Signed-off-by: Dave Young
    Tested-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Dave Young
     
  • Due to driver core changes dev_set_drvdata will call kzalloc which should be
    in might_sleep context, but hci_conn_add will be called in atomic context

    Like dev_set_name move dev_set_drvdata to work queue function.

    oops as following:

    Oct 2 17:41:59 darkstar kernel: [ 438.001341] BUG: sleeping function called from invalid context at mm/slqb.c:1546
    Oct 2 17:41:59 darkstar kernel: [ 438.001345] in_atomic(): 1, irqs_disabled(): 0, pid: 2133, name: sdptool
    Oct 2 17:41:59 darkstar kernel: [ 438.001348] 2 locks held by sdptool/2133:
    Oct 2 17:41:59 darkstar kernel: [ 438.001350] #0: (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.+.}, at: [] lock_sock+0xa/0xc [l2cap]
    Oct 2 17:41:59 darkstar kernel: [ 438.001360] #1: (&hdev->lock){+.-.+.}, at: [] l2cap_sock_connect+0x103/0x26b [l2cap]
    Oct 2 17:41:59 darkstar kernel: [ 438.001371] Pid: 2133, comm: sdptool Not tainted 2.6.31-mm1 #2
    Oct 2 17:41:59 darkstar kernel: [ 438.001373] Call Trace:
    Oct 2 17:41:59 darkstar kernel: [ 438.001381] [] __might_sleep+0xde/0xe5
    Oct 2 17:41:59 darkstar kernel: [ 438.001386] [] __kmalloc+0x4a/0x15a
    Oct 2 17:41:59 darkstar kernel: [ 438.001392] [] ? kzalloc+0xb/0xd
    Oct 2 17:41:59 darkstar kernel: [ 438.001396] [] kzalloc+0xb/0xd
    Oct 2 17:41:59 darkstar kernel: [ 438.001400] [] device_private_init+0x15/0x3d
    Oct 2 17:41:59 darkstar kernel: [ 438.001405] [] dev_set_drvdata+0x18/0x26
    Oct 2 17:41:59 darkstar kernel: [ 438.001414] [] hci_conn_init_sysfs+0x40/0xd9 [bluetooth]
    Oct 2 17:41:59 darkstar kernel: [ 438.001422] [] ? hci_conn_add+0x128/0x186 [bluetooth]
    Oct 2 17:41:59 darkstar kernel: [ 438.001429] [] hci_conn_add+0x177/0x186 [bluetooth]
    Oct 2 17:41:59 darkstar kernel: [ 438.001437] [] hci_connect+0x3c/0xfb [bluetooth]
    Oct 2 17:41:59 darkstar kernel: [ 438.001442] [] l2cap_sock_connect+0x174/0x26b [l2cap]
    Oct 2 17:41:59 darkstar kernel: [ 438.001448] [] sys_connect+0x60/0x7a
    Oct 2 17:41:59 darkstar kernel: [ 438.001453] [] ? lock_release_non_nested+0x84/0x1de
    Oct 2 17:41:59 darkstar kernel: [ 438.001458] [] ? might_fault+0x47/0x81
    Oct 2 17:41:59 darkstar kernel: [ 438.001462] [] ? might_fault+0x47/0x81
    Oct 2 17:41:59 darkstar kernel: [ 438.001468] [] ? __copy_from_user_ll+0x11/0xce
    Oct 2 17:41:59 darkstar kernel: [ 438.001472] [] sys_socketcall+0x82/0x17b
    Oct 2 17:41:59 darkstar kernel: [ 438.001477] [] syscall_call+0x7/0xb

    Signed-off-by: Dave Young
    Signed-off-by: David S. Miller

    Dave Young
     

13 Oct, 2009

1 commit

  • Create a new socket level option to report number of queue overflows

    Recently I augmented the AF_PACKET protocol to report the number of frames lost
    on the socket receive queue between any two enqueued frames. This value was
    exported via a SOL_PACKET level cmsg. AFter I completed that work it was
    requested that this feature be generalized so that any datagram oriented socket
    could make use of this option. As such I've created this patch, It creates a
    new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
    SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
    overflowed between any two given frames. It also augments the AF_PACKET
    protocol to take advantage of this new feature (as it previously did not touch
    sk->sk_drops, which this patch uses to record the overflow count). Tested
    successfully by me.

    Notes:

    1) Unlike my previous patch, this patch simply records the sk_drops value, which
    is not a number of drops between packets, but rather a total number of drops.
    Deltas must be computed in user space.

    2) While this patch currently works with datagram oriented protocols, it will
    also be accepted by non-datagram oriented protocols. I'm not sure if thats
    agreeable to everyone, but my argument in favor of doing so is that, for those
    protocols which aren't applicable to this option, sk_drops will always be zero,
    and reporting no drops on a receive queue that isn't used for those
    non-participating protocols seems reasonable to me. This also saves us having
    to code in a per-protocol opt in mechanism.

    3) This applies cleanly to net-next assuming that commit
    977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted

    Signed-off-by: Neil Horman
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Neil Horman