aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-tx.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c10
-rw-r--r--net/bluetooth/hci_core.c5
-rw-r--r--net/bluetooth/hci_event.c2
-rw-r--r--net/bluetooth/l2cap_core.c1
-rw-r--r--net/bluetooth/sco.c9
-rw-r--r--net/mac80211/cfg.c2
-rw-r--r--net/mac80211/debugfs_netdev.c4
10 files changed, 32 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index dcd19bc337d1..b29c80def35e 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc)
506 "confusing the DMA engine when we start RX up\n"); 506 "confusing the DMA engine when we start RX up\n");
507 ATH_DBG_WARN_ON_ONCE(!stopped); 507 ATH_DBG_WARN_ON_ONCE(!stopped);
508 } 508 }
509 return stopped || reset; 509 return stopped && !reset;
510} 510}
511 511
512void ath_flushrecv(struct ath_softc *sc) 512void ath_flushrecv(struct ath_softc *sc)
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
index 5c40502f869a..fbec88d48f1b 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
@@ -1127,12 +1127,16 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1127 q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) { 1127 q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) {
1128 1128
1129 tx_info = &txq->txb[txq->q.read_ptr]; 1129 tx_info = &txq->txb[txq->q.read_ptr];
1130 iwl4965_tx_status(priv, tx_info, 1130
1131 txq_id >= IWL4965_FIRST_AMPDU_QUEUE); 1131 if (WARN_ON_ONCE(tx_info->skb == NULL))
1132 continue;
1132 1133
1133 hdr = (struct ieee80211_hdr *)tx_info->skb->data; 1134 hdr = (struct ieee80211_hdr *)tx_info->skb->data;
1134 if (hdr && ieee80211_is_data_qos(hdr->frame_control)) 1135 if (ieee80211_is_data_qos(hdr->frame_control))
1135 nfreed++; 1136 nfreed++;
1137
1138 iwl4965_tx_status(priv, tx_info,
1139 txq_id >= IWL4965_FIRST_AMPDU_QUEUE);
1136 tx_info->skb = NULL; 1140 tx_info->skb = NULL;
1137 1141
1138 priv->cfg->ops->lib->txq_free_tfd(priv, txq); 1142 priv->cfg->ops->lib->txq_free_tfd(priv, txq);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index dfdbea6e8f99..fbbde0712fa5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -335,7 +335,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
335 struct ieee80211_channel *channel = conf->channel; 335 struct ieee80211_channel *channel = conf->channel;
336 const struct iwl_channel_info *ch_info; 336 const struct iwl_channel_info *ch_info;
337 int ret = 0; 337 int ret = 0;
338 bool ht_changed[NUM_IWL_RXON_CTX] = {};
339 338
340 IWL_DEBUG_MAC80211(priv, "changed %#x", changed); 339 IWL_DEBUG_MAC80211(priv, "changed %#x", changed);
341 340
@@ -383,10 +382,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
383 382
384 for_each_context(priv, ctx) { 383 for_each_context(priv, ctx) {
385 /* Configure HT40 channels */ 384 /* Configure HT40 channels */
386 if (ctx->ht.enabled != conf_is_ht(conf)) { 385 if (ctx->ht.enabled != conf_is_ht(conf))
387 ctx->ht.enabled = conf_is_ht(conf); 386 ctx->ht.enabled = conf_is_ht(conf);
388 ht_changed[ctx->ctxid] = true;
389 }
390 387
391 if (ctx->ht.enabled) { 388 if (ctx->ht.enabled) {
392 if (conf_is_ht40_minus(conf)) { 389 if (conf_is_ht40_minus(conf)) {
@@ -455,8 +452,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
455 if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging))) 452 if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
456 continue; 453 continue;
457 iwlagn_commit_rxon(priv, ctx); 454 iwlagn_commit_rxon(priv, ctx);
458 if (ht_changed[ctx->ctxid])
459 iwlagn_update_qos(priv, ctx);
460 } 455 }
461 out: 456 out:
462 mutex_unlock(&priv->mutex); 457 mutex_unlock(&priv->mutex);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index a709d05c5868..2dd7d54a796f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1224,12 +1224,16 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1224 q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { 1224 q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
1225 1225
1226 tx_info = &txq->txb[txq->q.read_ptr]; 1226 tx_info = &txq->txb[txq->q.read_ptr];
1227 iwlagn_tx_status(priv, tx_info, 1227
1228 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE); 1228 if (WARN_ON_ONCE(tx_info->skb == NULL))
1229 continue;
1229 1230
1230 hdr = (struct ieee80211_hdr *)tx_info->skb->data; 1231 hdr = (struct ieee80211_hdr *)tx_info->skb->data;
1231 if (hdr && ieee80211_is_data_qos(hdr->frame_control)) 1232 if (ieee80211_is_data_qos(hdr->frame_control))
1232 nfreed++; 1233 nfreed++;
1234
1235 iwlagn_tx_status(priv, tx_info,
1236 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE);
1233 tx_info->skb = NULL; 1237 tx_info->skb = NULL;
1234 1238
1235 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) 1239 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c83f618282f7..b5a8afc2be33 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -587,10 +587,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
587 hci_req_cancel(hdev, ENODEV); 587 hci_req_cancel(hdev, ENODEV);
588 hci_req_lock(hdev); 588 hci_req_lock(hdev);
589 589
590 /* Stop timer, it might be running */
591 del_timer_sync(&hdev->cmd_timer);
592
593 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 590 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
591 del_timer_sync(&hdev->cmd_timer);
594 hci_req_unlock(hdev); 592 hci_req_unlock(hdev);
595 return 0; 593 return 0;
596 } 594 }
@@ -629,6 +627,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
629 627
630 /* Drop last sent command */ 628 /* Drop last sent command */
631 if (hdev->sent_cmd) { 629 if (hdev->sent_cmd) {
630 del_timer_sync(&hdev->cmd_timer);
632 kfree_skb(hdev->sent_cmd); 631 kfree_skb(hdev->sent_cmd);
633 hdev->sent_cmd = NULL; 632 hdev->sent_cmd = NULL;
634 } 633 }
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index cebe7588469f..b2570159a044 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2387,8 +2387,6 @@ static inline void hci_io_capa_reply_evt(struct hci_dev *hdev, struct sk_buff *s
2387 if (!conn) 2387 if (!conn)
2388 goto unlock; 2388 goto unlock;
2389 2389
2390 hci_conn_hold(conn);
2391
2392 conn->remote_cap = ev->capability; 2390 conn->remote_cap = ev->capability;
2393 conn->remote_oob = ev->oob_data; 2391 conn->remote_oob = ev->oob_data;
2394 conn->remote_auth = ev->authentication; 2392 conn->remote_auth = ev->authentication;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ca27f3a41536..2c8dd4494c63 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1051,6 +1051,7 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq)
1051 tx_skb = skb_clone(skb, GFP_ATOMIC); 1051 tx_skb = skb_clone(skb, GFP_ATOMIC);
1052 bt_cb(skb)->retries++; 1052 bt_cb(skb)->retries++;
1053 control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); 1053 control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
1054 control &= L2CAP_CTRL_SAR;
1054 1055
1055 if (pi->conn_state & L2CAP_CONN_SEND_FBIT) { 1056 if (pi->conn_state & L2CAP_CONN_SEND_FBIT) {
1056 control |= L2CAP_CTRL_FINAL; 1057 control |= L2CAP_CTRL_FINAL;
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 42fdffd1d76c..94954c74f6ae 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -369,6 +369,15 @@ static void __sco_sock_close(struct sock *sk)
369 369
370 case BT_CONNECTED: 370 case BT_CONNECTED:
371 case BT_CONFIG: 371 case BT_CONFIG:
372 if (sco_pi(sk)->conn) {
373 sk->sk_state = BT_DISCONN;
374 sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT);
375 hci_conn_put(sco_pi(sk)->conn->hcon);
376 sco_pi(sk)->conn = NULL;
377 } else
378 sco_chan_del(sk, ECONNRESET);
379 break;
380
372 case BT_CONNECT: 381 case BT_CONNECT:
373 case BT_DISCONN: 382 case BT_DISCONN:
374 sco_chan_del(sk, ECONNRESET); 383 sco_chan_del(sk, ECONNRESET);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 334213571ad0..44049733c4ea 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1504,6 +1504,8 @@ int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
1504 enum ieee80211_smps_mode old_req; 1504 enum ieee80211_smps_mode old_req;
1505 int err; 1505 int err;
1506 1506
1507 lockdep_assert_held(&sdata->u.mgd.mtx);
1508
1507 old_req = sdata->u.mgd.req_smps; 1509 old_req = sdata->u.mgd.req_smps;
1508 sdata->u.mgd.req_smps = smps_mode; 1510 sdata->u.mgd.req_smps = smps_mode;
1509 1511
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index dacace6b1393..9ea7c0d0103f 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -177,9 +177,9 @@ static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
177 if (sdata->vif.type != NL80211_IFTYPE_STATION) 177 if (sdata->vif.type != NL80211_IFTYPE_STATION)
178 return -EOPNOTSUPP; 178 return -EOPNOTSUPP;
179 179
180 mutex_lock(&local->iflist_mtx); 180 mutex_lock(&sdata->u.mgd.mtx);
181 err = __ieee80211_request_smps(sdata, smps_mode); 181 err = __ieee80211_request_smps(sdata, smps_mode);
182 mutex_unlock(&local->iflist_mtx); 182 mutex_unlock(&sdata->u.mgd.mtx);
183 183
184 return err; 184 return err;
185} 185}