Skip to contentSkip to conversation

pull request: wireless-next 2014-06-06

PATCH John W. Linville 3 participants 3 messages Jun 6, 2014 – Jun 8, 2014

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Dave,

Please accept this batch of fixes intended for the 3.16 stream.

For the bluetooth bits, Gustavo says:

"Here some more patches for 3.16. We know that Linus already opened the merge window, but this is fix only pull request, and most of the patches here are also tagged for stable."

Along with that, Andrea Merello provides a fix for the broken scanning in the venerable at76c50x driver...

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit 9e89fd8b7db71038fd9f70f34e210963fa8fc980:

ipv6: Shrink udp_v6_mcast_next() to one socket variable (2014-06-05 16:23:08 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem

for you to fetch changes up to c6ac68a612783aab0aad62b8edd36791b251aadb:

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2014-06-06 11:59:11 -0400)

----------------------------------------------------------------

Adam Lee (1):
Bluetooth: ath3k: no need to set same pipe multiple times

Andrea Merello (1):

      at76c50x: fix scan does not work with latest mac80211

Johan Hedberg (4):
Bluetooth: Fix properly ignoring LTKs of unknown types
Bluetooth: Fix authentication check for FIPS security level
Bluetooth: Fix requiring SMP MITM for outgoing connections
Bluetooth: Fix missing check for FIPS security level

John W. Linville (2):
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem

Jukka Rissanen (2):
Bluetooth: 6LoWPAN: Fix MAC address universal/local bit handling
Bluetooth: l2cap: Set more channel defaults

Jukka Taimisto (1):
Bluetooth: Fix L2CAP deadlock

 drivers/bluetooth/ath3k.c           |  3 +-
 drivers/net/wireless/at76c50x-usb.c | 53 ++++++++++++++++++++++++++++++
 drivers/net/wireless/at76c50x-usb.h |  1 +
 net/bluetooth/6lowpan.c             | 65 ++++++++++++++++++++-----------------
 net/bluetooth/hci_event.c           |  4 ++-
 net/bluetooth/l2cap_core.c          |  6 ++++
 net/bluetooth/l2cap_sock.c          |  5 ++-
 net/bluetooth/mgmt.c                | 10 ++++--
 net/bluetooth/smp.c                 |  7 ++--
 9 files changed, 116 insertions(+), 38 deletions(-)
drivers/bluetooth/ath3k.c +2 -1
index a83b57e57b63..f98380648cb3 100644
@@ -193,9 +193,10 @@ static int ath3k_load_firmware(struct usb_device *udev,
 	sent += 20;
 	count -= 20;
 
+	pipe = usb_sndbulkpipe(udev, 0x02);
+
 	while (count) {
 		size = min_t(uint, count, BULK_SIZE);
-		pipe = usb_sndbulkpipe(udev, 0x02);
 		memcpy(send_buf, firmware->data + sent, size);
 
 		err = usb_bulk_msg(udev, pipe, send_buf, size,
drivers/net/wireless/at76c50x-usb.c +53 -0

83 lines not on this page · raw message

drivers/net/wireless/at76c50x-usb.h +1 -0
index 4718aa59f051..55090a38ac95 100644
@@ -418,6 +418,7 @@ struct at76_priv {
 	int scan_max_time;	/* scan max channel time */
 	int scan_mode;		/* SCAN_TYPE_ACTIVE, SCAN_TYPE_PASSIVE */
 	int scan_need_any;	/* if set, need to scan for any ESSID */
+	bool scanning;		/* if set, the scan is running */
 
 	u16 assoc_id;		/* current association ID, if associated */
 
net/bluetooth/6lowpan.c +35 -30

120 lines not on this page · raw message

net/bluetooth/hci_event.c +3 -1
index 3454807a40c5..1096e4cd1283 100644
@@ -1453,6 +1453,7 @@ static int hci_outgoing_auth_needed(struct hci_dev *hdev,
 	 * is requested.
 	 */
 	if (!hci_conn_ssp_enabled(conn) && !(conn->auth_type & 0x01) &&
+	    conn->pending_sec_level != BT_SECURITY_FIPS &&
 	    conn->pending_sec_level != BT_SECURITY_HIGH &&
 	    conn->pending_sec_level != BT_SECURITY_MEDIUM)
 		return 0;
@@ -3076,7 +3077,8 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		}
 
 		if (key->type == HCI_LK_COMBINATION && key->pin_len < 16 &&
-		    conn->pending_sec_level == BT_SECURITY_HIGH) {
+		    (conn->pending_sec_level == BT_SECURITY_HIGH ||
+		     conn->pending_sec_level == BT_SECURITY_FIPS)) {
 			BT_DBG("%s ignoring key unauthenticated for high security",
 			       hdev->name);
 			goto not_found;
net/bluetooth/l2cap_core.c +6 -0
index dc4d301d3a72..6eabbe05fe54 100644
@@ -471,8 +471,14 @@ void l2cap_chan_set_defaults(struct l2cap_chan *chan)
 	chan->max_tx = L2CAP_DEFAULT_MAX_TX;
 	chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
 	chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
+	chan->remote_max_tx = chan->max_tx;
+	chan->remote_tx_win = chan->tx_win;
 	chan->ack_win = L2CAP_DEFAULT_TX_WINDOW;
 	chan->sec_level = BT_SECURITY_LOW;
+	chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
+	chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
+	chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
+	chan->conf_state = 0;
 
 	set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
 }
net/bluetooth/l2cap_sock.c +4 -1
index ef5e5b04f34f..ade3fb4c23bc 100644
@@ -1180,13 +1180,16 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
 	/* Check for backlog size */
 	if (sk_acceptq_is_full(parent)) {
 		BT_DBG("backlog full %d", parent->sk_ack_backlog);
+		release_sock(parent);
 		return NULL;
 	}
 
 	sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
 			      GFP_ATOMIC);
-	if (!sk)
+	if (!sk) {
+		release_sock(parent);
 		return NULL;
+        }
 
 	bt_sock_reclassify_lock(sk, BTPROTO_L2CAP);
 
net/bluetooth/mgmt.c +8 -2
index 5e9c21a5525f..0fce54412ffd 100644
@@ -4546,10 +4546,16 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
 		else
 			type = HCI_SMP_LTK_SLAVE;
 
-		if (key->type == MGMT_LTK_UNAUTHENTICATED)
+		switch (key->type) {
+		case MGMT_LTK_UNAUTHENTICATED:
 			authenticated = 0x00;
-		else
+			break;
+		case MGMT_LTK_AUTHENTICATED:
 			authenticated = 0x01;
+			break;
+		default:
+			continue;
+		}
 
 		hci_add_ltk(hdev, &key->addr.bdaddr, addr_type, type,
 			    authenticated, key->val, key->enc_size, key->ediv,
net/bluetooth/smp.c +4 -3
index 4f9662d0fd81..3d1cc164557d 100644
@@ -909,10 +909,11 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
 
 	authreq = seclevel_to_authreq(sec_level);
 
-	/* hcon->auth_type is set by pair_device in mgmt.c. If the MITM
-	 * flag is set we should also set it for the SMP request.
+	/* Require MITM if IO Capability allows or the security level
+	 * requires it.
 	 */
-	if ((hcon->auth_type & 0x01))
+	if (hcon->io_capability != HCI_IO_NO_INPUT_OUTPUT ||
+	    sec_level > BT_SECURITY_MEDIUM)
 		authreq |= SMP_AUTH_MITM;
 
 	if (hcon->link_mode & HCI_LM_MASTER) {
Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#1 lore raw

Hi John,

Quoted 1 line · John W. Linville

Please accept this batch of fixes intended for the 3.16 stream.

I'll be very thankful if you include my fix in the next pull request:
[FIX for 3.16][PATCH] b43: disable 5 GHz on G-PHY
It fixes a regression I unfortunately introduced and that is present in net-next.git.