- 17 5月, 2012 13 次提交
-
-
由 Gustavo Padovan 提交于
defer_setup and suspended are now flags into bt_sk(). Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Gustavo Padovan 提交于
During a security level elevation we need to keep track of the current security level of a connection until the new one is not confirmed. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Mat Martineau 提交于
The ERTM and streaming mode transmit queue must only be accessed while the L2CAP channel lock is held. Locking the channel before calling l2cap_chan_send ensures that multiple threads cannot simultaneously manipulate the queue when sending and receiving concurrently. L2CAP channel locking had previously moved to the l2cap_chan struct instead of the associated socket, so some of the old socket locking can also be removed in this patch. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
As the comment for l2cap_get_chan_by_scid indicated, the function used to return a locked socket. The lock for the socket was acquired while the channel list was also locked. When locking was moved over to the l2cap_chan structure, the channel lock was no longer acquired with the channel list still locked. This made it possible for the l2cap_chan to be deleted after conn->chan_lock was released but before l2cap_chan_lock was called. Making the call to l2cap_chan_lock before releasing conn->chan_lock makes it impossible for the l2cap_chan to be deleted at the wrong time. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Reviewed-by: NUlisses Furquim <ulisses@profusion.mobi> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
The L2CAP MTU for incoming data is verified differently depending on the L2CAP mode, so the check is best performed in a mode-specific context. Checking the incoming MTU before HCI fragment reassembly is a layer violation and assumes all bytes after the standard L2CAP header are L2CAP data. This approach causes issues with unsegmented ERTM or streaming mode frames, where there are additional enhanced or extended headers before the data payload and possible FCS bytes after the data payload. A valid frame could be as many as 10 bytes larger than the MTU. Removing this code is the best fix, because the MTU is checked later on for all L2CAP data frames (connectionless, basic, ERTM, and streaming). This also gets rid of outdated locking (socket instead of l2cap_chan) and an extra lookup of the channel ID. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Reviewed-by: NUlisses Furquim <ulisses@profusion.mobi> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Michael Gruetzner 提交于
Add Foxconn/Hon Hai AR5BBU22 Bluetooth Module( 0x489:0xE03C) to the blacklist of btusb module and add it to the ath3k module to properly load the firmware in Kernel 3.3.4 The device is integrated in e.g. some Acer Aspire 7750G. Output from /sys/kernel/debug/usb/devices: T: Bus=01 Lev=02 Prnt=02 Port=05 Cnt=02 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e03c Rev= 0.02 S: Manufacturer=Atheros Communications S: Product=Bluetooth USB Host Controller S: SerialNumber=Alaska Day 2006 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: NMichael Gruetzner <mgruetzn@gmx.de> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Vishal Agarwal 提交于
The mgmt_device_found function expects to receive only the significant part of the EIR data so it needs to be removed before calling the function. This patch adds a new eir_get_length() helper function to calculate the length of the significant part. Signed-off-by: NVishal Agarwal <vishal.agarwal@stericsson.com> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Johan Hedberg 提交于
The right bit for "Inquiry with RSSI" is 0x02 and not 0x04 (which means "Read Remote Extended Features Complete"). Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Gustavo Padovan 提交于
Removes one indentation level. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Gustavo Padovan 提交于
When we add a fragment to a skb, len and data_len fields need to be updated. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Gustavo Padovan 提交于
When building fragmented skb's skb->len keeps track of the size of head plus all fragments combined, however when queueing the skb for sending we need to report the head size instead of the total size, so we just set skb->len to skb_headlen(). This bug appeared when implementing MSG_MORE support for L2CAP sockets, it never showed up before because l2cap_skbuff_fromiovec() never accounted skb size correctly. A following patch will fix this. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Reviewed-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Gustavo Padovan 提交于
If alloc() fails we let the frags linked list with garbage value (the err ptr value) in its last element. Reported-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 16 5月, 2012 1 次提交
-
-
由 Mat Martineau 提交于
Commit 105bdf9e introduced a regression in L2CAP streaming mode due to rearranged initialization code that is shared between ERTM and streaming mode. This change makes sure the transmit queue is initialized in both modes. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Acked-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
- 15 5月, 2012 4 次提交
-
-
由 Mat Martineau 提交于
Commit 94122bbe introduced a problem where tx_send_head was not set to point to the first skb in the ERTM transmit queue, which stalled data transmission. This change sets that pointer when transmission is not already in progress. Reported-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Johan Hedberg 提交于
The mgmt_ev_device_connected signal must be sent before any event indications happen for sockets associated with the connection. Otherwise e.g. device authorization for the sockets will fail with ENOTCONN as user space things that there is no baseband link. This patch fixes the issue by ensuring that the device_connected event if sent (if it hasn't been so already) as soon as the first ACL data packet arrives from the remote device. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
由 Gustavo Padovan 提交于
It fixes L2CAP socket based security level elevation during a connection. The HID profile needs this (for keyboards) and it is the only way to achieve the security level elevation when using the management interface to talk to the kernel (hence the management enabling patch being the one that exposes this issue). It enables the userspace a security level change when the socket is already connected and create a way to notify the socket the result of the request. At the moment of the request the socket is made non writable, if the request fails the connections closes, otherwise the socket is made writable again, POLL_OUT is emmited. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
由 Larry Finger 提交于
In commit b0302aba, the rtlwifi family of drivers was converted to use asynchronous firmware loading. Unfortumately, the implementation was racy, and the ieee80211 routines could be started before rtl_init_core() was called to setup the data. This patch fixes the bug noted in https://bugzilla.kernel.org/show_bug.cgi?id=43187. Reported-by: NJoshua Roys <Joshua.Roys@gtri.gatech.edu> Tested-by: NNeptune Ning <frostyplanet@gmail.com> Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.3] Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
- 09 5月, 2012 22 次提交
-
-
由 Cristian Chilipirea 提交于
Fixed some checkpatch warnings in mgmt.c. Signed-off-by: NCristian Chilipirea <cristian.chilipirea@gmail.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Eldad Zack 提交于
The dot1q ethertype number (0x8100) is embedded in the code, although it is already defined in included headers. Signed-off-by: NEldad Zack <eldad@fogrefinery.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
Use more common code for ERTM and streaming mode segmentation and transmission, and begin using skb control block data for delaying extended or enhanced header generation until just before the packet is transmitted. This code is also better suited for resegmentation, which is needed when L2CAP links are reconfigured after an AMP channel move. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Reviewed-by: NUlisses Furquim <ulisses@profusion.mobi> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Andrei Emeltchenko 提交于
Remove magic number unneeded calculation since hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Gustavo Padovan 提交于
hlen has a fixed size of L2CAP_HDR_SIZE, use this instead. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
The Bluetooth Low Energy support so far was disabled by default via a module parameter. With this change the module parameter will be removed and Low Energy is enabled by default. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Syam Sidhardhan 提交于
No one is using hci_le_ltk_neg_reply() in bluetooth subsystem. Signed-off-by: NSyam Sidhardhan <s.syam@samsung.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Amitkumar Karwar 提交于
Host sleep is activated using already configured host sleep parameters in suspend handler and it is cancelled in resume handler. Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com> Signed-off-by: NBing Zhao <bzhao@marvell.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Gustavo Padovan 提交于
hlen - L2CAP_HDR_SIZE = 0, so we don't need to add them in the calculation. Signed-off-by: NGustavo Padovan <gustavo@padovan.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Syam Sidhardhan 提交于
In this API, we were using sizeof operator for an array given as function argument, which is invalid. However this API is not used anywhere. Signed-off-by: NSyam Sidhardhan <s.syam@samsung.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
Adding Code Aurora Forum copyright information due to significant additions of code. Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
L2CAP sockets contain a pointer to l2cap_chan that needs to be reference counted in order to prevent a possible dangling pointer when the channel is freed. There were a few other cases where an l2cap_chan pointer on the stack was dereferenced after a call to l2cap_chan_del. Those pointers are also now reference counted. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
l2cap_get_chan_by_ident was not used, but didn't generate a compiler warning because it was an inline function. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
Structure members used by ERTM or streaming mode need to be initialized when an ERTM or streaming mode link is configured. Some duplicate code is also eliminated by moving in to the ERTM init function. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
Moving these functions simplifies future patches by eliminating forward declarations, makes future patches easier to review, and better preserves 'git blame' information. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
These values are now in the nested l2cap_ctrl struct. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Mat Martineau 提交于
Instead of using modular division, the offset can be calculated using only addition and subtraction. The previous calculation did not work as intended and was more difficult to understand, involving unsigned integer underflow and a check for a negative value where one was not possible. Signed-off-by: NMat Martineau <mathewm@codeaurora.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Amitkumar Karwar 提交于
Currently debugfs commands "hscfgcmd" and "gpiogap" are provided for host sleep configuration. But if user doesn't configure host sleep parameters using these commands, host sleep activation is failed during suspend (support for suspend and resume handlers is added in next patch). Default host sleep configuration is done during driver initialisation in this patch. Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com> Signed-off-by: NBing Zhao <bzhao@marvell.com> Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
-
由 Andre Guedes 提交于
User-space pass the remote device address type to kernel through struct sockaddr_l2 what makes the advertising useless. This patch removes all advertising cache code. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Andre Guedes 提交于
In order to establish a LE connection we need the address type information. User-space already pass this information to kernel through struct sockaddr_l2. This patch adds the dst_type parameter to l2cap_chan_connect so we are able to pass the address type info from user-space down to hci_conn layer. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Andre Guedes 提交于
This patch adds the dst_type parameter to hci_connect function. Instead of searching the address type in advertising cache, we use the dst_type parameter to establish LE connections. The dst_type is ignored for BR/EDR connection establishment. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Andre Guedes 提交于
This patch moves the helper function bdaddr_to_le to hci_core, so it can be used in mgmt.c and hci_conn.c. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-