19985 Commits

Author SHA1 Message Date
James Sullins
a5c109d37e Kconfig: fix NETFILTER_XT_MATCH_QTAGUID 2012-02-26 16:43:05 -06:00
showp1984
dcf41212a4 compile fixups for netfilter 2012-02-26 16:34:20 -06:00
Linux Build Service Account
3dddea6b7e Merge "Bluetooth: LE sockets not ready until encrypted" into msm-3.0 2012-02-12 15:40:29 -08:00
Archana Ramachandran
d6d25e1962 Bluetooth: Increased the LE connection supervision timeout
Increased the LE supervision timeout to 10 seconds
so that concurrent operations can be performed with LE
connection.

Change-Id: I34cc53d1a0eb8943de11fc35580a27b037b87b2f
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
2012-02-09 16:31:25 -07:00
Brian Gix
416db90511 Bluetooth: LE sockets not ready until encrypted
If encryption fails during socket setup, the L2CAP channel should not
be marked as Ready until after re-pairing takes place.

Change-Id: I57a07ae72d4a57584c9367db9a832f4560629ac7
CRs-fixed: 335988
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2012-02-09 14:01:12 -08:00
Linux Build Service Account
90f22ced6a Merge "Bluetooth: Avoid link entering sniff mode during pairing process." into msm-3.0 2012-02-04 12:59:48 -08:00
Linux Build Service Account
7153197649 Merge changes I649a1e89,Ia75b2f23 into msm-3.0
* changes:
  cfg80211: Validate cipher suite against supported ciphers
  cfg80211: Remove strict validation of AKM suites
2012-02-04 05:23:43 -08:00
Linux Build Service Account
6461378376 Merge "Bluetooth: Ensure full A2MP msg is pulled from skb" into msm-3.0 2012-02-01 06:28:53 -08:00
Linux Build Service Account
14dc5090b9 Merge "Bluetooth: Allow headroom in ACL data packets from HCI socket" into msm-3.0 2012-02-01 06:28:53 -08:00
Srinivas Krovvidi
32ba935d89 Bluetooth: Avoid link entering sniff mode during pairing process.
Found incoming connection issue with IOT devices when link enters
sniff mode during pairing process. The current change avoids link
entering sniff mode when link key is not available for connection.

Change-Id: I26fbbccec8d7b3faa91cba8f976fb0e44d7f5344
CRs-Fixed: 331520
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2012-02-01 08:53:47 +05:30
Peter Krystad
fc60bda779 Bluetooth: Allow headroom in ACL data packets from HCI socket
Need to allocate headroom in ACL data packets destined for the
Qualcomm PAL that are be transmitted via an HCI socket.

The Qualcomm PAL uses extra headroom in skbs to be transmitted to
save a copy when passing to the WLAN driver. This headroom is
allocated by L2CAP. This same headroom must be added for skbs to
be transmitted directly by HCI socket layer. HCI sockets are used
to transmit data during Bluetooth qualification testing.

CRs-fixed: 332866
Change-Id: I173a16c6cb3882bf4155be051e3b3375ea240369
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2012-01-29 19:23:22 -08:00
Peter Krystad
02a952a761 Bluetooth: Ensure full A2MP msg is pulled from skb
Ensure the full A2MP Get Info Response message is pulled from the
skb when the status is not SUCCESS. Also fix similiar scenario in
Get AMP Assoc and remove unneeded check for mismatched id's.

Change-Id: Ia676d89238113e24f06aaa5d9e955afcc4de0307
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2012-01-25 16:50:27 -08:00
Brian Gix
474e0f21f8 Bluetooth: prevent dup DISCOVERY_STOP's pending
It is possible to redundently request Discovery
operations.  This fix cleans up some stored state to
prevent MGMT event overload when discovery finally completes.

Change-Id: I2ffb5c0749df95e40cd39e8c64c87a62a93fb896
CRs-fixed: 329657
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2012-01-24 10:22:29 -08:00
Jack Cheung
976d06b486 cfg80211: Validate cipher suite against supported ciphers
Instead of using a hardcoded list of cipher suites in nl80211.c, use a
shared function in util.c to verify that the driver advertises support
for the specified cipher. This provides more accurate validation of the
values and allows vendor-specific cipher suites to be added in drivers.

Change-Id: I649a1e896cadc1045701a8d5f93a83a7214fcda0
Acked-by: Jim Zmuda <jzmuda@qca.qualcomm.com>
Signed-off-by: Jack Cheung <jackc@codeaurora.org>
2012-01-22 00:44:21 -08:00
Jack Cheung
7878aa18cb cfg80211: Remove strict validation of AKM suites
NL80211_ATTR_AKM_SUITES can be used to configure new AKMs, like FT or
the SHA-256 -based AKMs or FT from 802.11r/802.11w. In addition, vendor
specific AKMs could be used. The current validation code for the connect
command prevents cfg80211-based drivers from using these mechanisms even
if the driver would not actually use this AKM value (i.e., it uses
WPA/RSN IE from user space). mac80211-based drivers allow any AKM to be
used since this value is not used there.

Remove the unnecessary validation step in cfg80211 to allow drivers to
decide what AKMs are supported. In theory, we could handle this by
advertising supported AKMs, but that would not be very effective unless
we enforce all drivers (including mac80211) to advertise the set of
supported AKMs. This would require additional changes in many places
whenever a new AKM is introduced even though no actually functionality
changes may be required in most drivers.

Change-Id: Ia75b2f236b1b016c0f62dc96b03511f5f4d0cf28
Acked-by: Jim Zmuda <jzmuda@qca.qualcomm.com>
Signed-off-by: Jack Cheung <jackc@codeaurora.org>
2012-01-22 00:40:15 -08:00
Linux Build Service Account
820424dee8 Merge "Bluetooth: Reading remote device lmp_version from controller." into msm-3.0 2012-01-21 21:07:06 -08:00
Linux Build Service Account
797bef9b61 Merge "Bluetooth: Fix timeout configuration for AMP channels" into msm-3.0 2012-01-20 08:40:30 -08:00
Srinivas Krovvidi
d352b26f74 Bluetooth: Reading remote device lmp_version from controller.
On ACL connection complete with a remote device, the remote
device lmp version should be available with Controller. The
current change is to read this information from controller to
host and update to bluez userspace through management APIs.

Change-Id: Ie152ed98fa0a6cf9ab170a6bb8c6a05b5b9dfcb0
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2012-01-20 08:22:56 +05:30
Linux Build Service Account
b6dad9fd3d Merge "Bluetooth: Discovery Timer stability fixes" into msm-3.0 2012-01-16 01:17:20 -08:00
Mat Martineau
966dcfae82 Bluetooth: Fix timeout configuration for AMP channels
When doing L2CAP configuration, use the correct retransmit and monitor
timeouts when configuring (or reconfiguring) AMP channels. The host
stack needs to use the timeouts read from incoming configuration
responses, and write appropriate timeouts when sending configuration
responses.

Change-Id: I1271ade93dbfee58a1cac115280704a327e901b2
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2012-01-14 23:55:47 -07:00
Linux Build Service Account
a3f14c0989 Merge "Bluetooth: Support for writing hci flush timeout parameter." into msm-3.0 2012-01-14 18:24:57 -08:00
Srinivas Krovvidi
10734198ae Bluetooth: Support for writing hci flush timeout parameter.
Added Flush Timeout parameter setting for l2cap channel. Bluetooth
profiles using l2cap can set this parameter to flush out the data
when it cannot be sent over the air with in timeout duration.

Change-Id: I60420c5be3a790aff26bc30e8089fdca47a99222
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2012-01-14 16:37:21 -07:00
Brian Gix
568dde90e7 Bluetooth: Discovery Timer stability fixes
This change prevents running timers from being re-initialized
which causes system instablility. Also prevents starting a
discovery operation when already in progress.

CRs-fixed: 328673
Change-Id: Icda36a25fdcb40dab4f95f9cc39ca124b299e308
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2012-01-13 10:07:23 -08:00
Brian Gix
3cd62049b5 Bluetooth: Explicitly stop all timers before frees
As a preventative measure, timers on dynamic memory structures must be
not running, or stopped, prior to freeing. Since it is safe to delete
timers whether running or not, all timers are deleted.

CRs-fixed: 328673
Change-Id: I255d99cb2419fad07caf445920050cf2d05ffe4d
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2012-01-13 09:39:12 -08:00
Mat Martineau
9f8d467343 Bluetooth: Fix HCI channel reference counting
When an incoming HCI logical link event came in at the same time
a socket structure was deleted, it was possible to end up with a stale
pointer to the socket.  The socket and associated HCI channel struct
need to be properly reference counted so they are not freed
prematurely.

CRs-Fixed: 325023
Change-Id: Ia5724a9ce2000acd60a174c354be04029bac5324
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2012-01-09 08:52:39 -08:00
Linux Build Service Account
d5cf63fe92 Merge "Bluetooth: Initialize incoming connection link policy" into msm-3.0 2012-01-05 15:28:47 -08:00
Rahul Kashyap
d5553baa74 Bluetooth: Initialize incoming connection link policy
Upon properly initializing the incoming connection
link policy, the link is able to enter sniff mode.

CRs-fixed: 327571
Change-Id: Ib21c09234f823f011aad158ae232f3060085183e
Signed-off-by: Rahul Kashyap <rkashyap@codeaurora.org>
2012-01-03 11:51:10 +05:30
Srinivas Krovvidi
0916aed523 Bluetooth: Management API changes in Bluetooth to update remote Class.
When connection initiated from the remote device the class of device
information is required to be updated to userspace through this
event.

Change-Id: I97d715a0b80e12d414ecf03d099955c8b12c82b4
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2011-12-29 18:37:27 +05:30
Deepthi Gowri
6f79e1678d nl80211/cfg80211: Add crypto settings into NEW_BEACON
This removes need from drivers to parse the beacon tail/head data
to figure out what crypto settings are to be used in AP mode in case
the Beacon and Probe Response frames are fully constructed in the
driver/firmware.

nl80211/cfg80211: Allow SSID to be specified in new beacon command

This makes it easier for drivers that generate Beacon and Probe Response
frames internally (in firmware most likely) in AP mode.

nl80211/cfg80211: Add extra IE configuration to AP mode setup

The NL80211_CMD_NEW_BEACON command is, in practice, requesting AP mode
operations to be started. Add new attributes to provide extra IEs
(e.g., WPS IE, P2P IE) for drivers that build Beacon, Probe Response,
and (Re)Association Response frames internally (likely in firmware).

Change-Id: Ib91cd3fa2bad68e3724db98985e3f3bac72715f0
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
2011-12-23 20:27:04 +05:30
Linux Build Service Account
fbb897c144 Merge "Bluetooth: Update ERTM state before sending packets" into msm-3.0 2011-12-23 02:36:17 -08:00
Linux Build Service Account
510503d38e Merge "Bluetooth: Send power off notification earlier in the device close process" into msm-3.0 2011-12-23 02:36:17 -08:00
Bhasker Neti
ffdff571cb Bluetooth: Send power off notification earlier in the device close process
Notifying Bluez userspace of a shutdown earlier prevents new commands from
being sent. The extra commands were interfering with reinitialization of
the device

Change-Id: I862a658585ffa69348fbb4bdfba96f3916d0e5ef
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
2011-12-22 13:32:05 -08:00
Mat Martineau
ff10539146 Bluetooth: Update ERTM state before sending packets
Since l2cap_ertm_send() runs in process context, it may be preempted
by incoming data being processed in tasklet context.  In order to
avoid race conditions where a packet is acknowledged before the
transmit queue is properly updated, ERTM state should be set up for
the next transmit before the packet is actually sent.

CRs-fixed: 326238
Change-Id: I3df0e93118a357dbd34ff26ad74d7c0c38bf5121
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-12-22 12:06:08 -08:00
Deepthi Gowri
7ad229d902 cfg80211/nl80211: Send AssocReq IEs to user space in AP mode
When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().

Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.

Change-Id: Ia2220d58ee81c1b7ca905cfc8eb55b6a84779d38
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
2011-12-22 10:53:33 +05:30
Mat Martineau
380dcd40cd Bluetooth: Clear sk_send_head when purging ERTM transmit queue
In ERTM, the outgoing data queue contains both unsent data and unacked
data, and sk_send_head points to the first unsent packet. When
disconnecting a socket, it's possible for a process to attempt a
socket send while a disconnection is in progress and the outgoing data
queue has been purged. When this purge happens, sk_send_head must also
be set to NULL because the packet it was pointing to has been freed.

Change-Id: I87b37a13583fac705241549dfc492950c7c0ec0b
CRs-fixed: 326238
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-12-19 10:11:30 -08:00
Linux Build Service Account
4bdc331fc3 Merge "Bluetooth: Schedule HCI_TX task after connection cleanup" into msm-3.0 2011-12-18 11:16:47 -08:00
AnubhavGupta
01d9e363d8 Bluetooth: Schedule HCI_TX task after connection cleanup
After ACL  disconnection and removal of pending acl
acknowledgement, we have to schedule HCI_TX task. This will
allow other active connection to send ACL packets.

Change-Id: I3ddf61a3c7ff149b05e963159e10af0ab6ef6143
Signed-off-by: AnubhavGupta <anubhavg@codeaurora.org>
2011-12-17 17:26:47 +05:30
Linux Build Service Account
6af1b58f0b Merge "vfs: dont chain pipe/anon/socket on superblock s_inodes list" into msm-3.0 2011-12-16 21:09:57 -08:00
Eric Dumazet
88b3f3dc89 vfs: dont chain pipe/anon/socket on superblock s_inodes list
Workloads using pipes and sockets hit inode_sb_list_lock contention.

superblock s_inodes list is needed for quota, dirty, pagecache and
fsnotify management. pipe/anon/socket fs are clearly not candidates for
these.

Change-Id: I8ed74115fb164a96e5a726d2cb7f476f140c384d
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
2011-12-15 15:57:08 +05:30
Bhakthavatsala Raghavendra
6edb4f19c1 Bluetooth: Setting security level based on remote device capabilities
Security level will be set to MEDIUM in case where the remote device
is 2.0 device. This would prevent it from going to 16 digit pairing
in case where the remote device sends the EIR and still doesn't
support SSP

CRs-fixed: 318469
Change-Id: I9d03b2b628cc188de44f44cfc3f8e81fbf3cb79d
Signed-off-by: Bhakthavatsala Raghavendra <braghave@codeaurora.org>
2011-12-14 21:24:23 +05:30
Mat Martineau
0c04ef9553 Bluetooth: Check for skb copy/clone failures
During normal ERTM sends and resends, buffers are copied or cloned.
If the copy/clone fails, take sensible action rather than causing a
kernel panic.

Change-Id: Ib491cfb38dab30014ed08571dbd721dad0cc3714
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-12-09 22:43:27 -07:00
Peter Krystad
55f8d4ce3b Bluetooth: Check for possible divide by zero
Change-Id: Iee0bdf14f9fe7bfbe21e5344ec407356b23a69f4
CRs-fixed: 319934
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-12-09 08:10:19 -08:00
Peter Krystad
d6a9cebcd1 Bluetooth: Fix possible access of hci_chan after it is deleted
When the connection is not in BT_CONNECTED state it was possible
for code in hci_chan_modify() to attempt to access the hci_chan
structure after it had already been deleted by hci_chan_put().

Change-Id: I5ae352ac12aa3b456e7bcf30633015d98b03e44b
CRs-fixed: 319934
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
2011-12-09 08:10:19 -08:00
Linux Build Service Account
c82aa018a6 Merge "Bluetooth: Use correct endianness in L2CAP configuration fallback" into msm-3.0 2011-12-08 14:54:13 -08:00
Linux Build Service Account
1671f939a5 Merge "Bluetooth: bnep: Fix deadlock in session deletion" into msm-3.0 2011-12-08 10:28:10 -08:00
Mat Martineau
ab043557f7 Bluetooth: Use correct endianness in L2CAP configuration fallback
Default RFC values should use le16 byte ordering. These values are
used only as a fallback when poorly-behaved remote devices do not send
a proper RFC option in an ERTM or streaming configuration response.

Change-Id: I51c9ae892f18229f568b354c92b64e3a8054b619
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2011-12-07 10:46:56 -08:00
Peter Hurley
2db3637b45 Bluetooth: bnep: Fix deadlock in session deletion
Commit f4d7cd4a4c introduced the usage of kthread API.
kthread_stop is a blocking function which returns only when
the thread exits. In this case, the thread can't exit because it's
waiting for the write lock, which is being held by bnep_del_connection()
which is waiting for the thread to exit -- deadlock.

Use atomic_t/wake_up_process instead to signal to the thread to exit.

Change-Id: I538cd17c102cb31b3212c794086a9c2baedb4b14
Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
[skrovvid@codeaurora.org: kthread_should_stop api call is avoided]
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2011-12-07 11:10:29 +05:30
Linux Build Service Account
fc662a1106 Merge "Bluetooth: Do not disconnect channel before failover complete" into msm-3.0 2011-12-06 14:52:29 -08:00
Linux Build Service Account
47dece1c78 Merge "Bluetooth: Move Discovery timers to hci_dev struct" into msm-3.0 2011-12-06 11:36:58 -08:00
Linux Build Service Account
5c5bed0c36 Merge "msm: nl80211: Add WAPI support for cfg80211." into msm-3.0 2011-12-06 11:36:58 -08:00