aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c4
-rw-r--r--drivers/net/wireless/mwl8k.c5
-rw-r--r--net/mac80211/tx.c5
-rw-r--r--net/nfc/hci/core.c20
-rw-r--r--net/nfc/hci/hcp.c2
-rw-r--r--net/nfc/nci/core.c3
6 files changed, 31 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 2969f74faa42..657841da740b 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -578,9 +578,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
578 578
579 /* 579 /*
580 * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid 580 * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid
581 * MCS index values for us are 0 to 7. 581 * MCS index values for us are 0 to 15.
582 */ 582 */
583 if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 8)) { 583 if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 16)) {
584 sinfo->txrate.mcs = priv->tx_rate; 584 sinfo->txrate.mcs = priv->tx_rate;
585 sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; 585 sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
586 /* 40MHz rate */ 586 /* 40MHz rate */
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index cf7bdc66f822..224e03ade145 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1665,7 +1665,9 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force)
1665 1665
1666 info = IEEE80211_SKB_CB(skb); 1666 info = IEEE80211_SKB_CB(skb);
1667 if (ieee80211_is_data(wh->frame_control)) { 1667 if (ieee80211_is_data(wh->frame_control)) {
1668 sta = info->control.sta; 1668 rcu_read_lock();
1669 sta = ieee80211_find_sta_by_ifaddr(hw, wh->addr1,
1670 wh->addr2);
1669 if (sta) { 1671 if (sta) {
1670 sta_info = MWL8K_STA(sta); 1672 sta_info = MWL8K_STA(sta);
1671 BUG_ON(sta_info == NULL); 1673 BUG_ON(sta_info == NULL);
@@ -1682,6 +1684,7 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force)
1682 sta_info->is_ampdu_allowed = true; 1684 sta_info->is_ampdu_allowed = true;
1683 } 1685 }
1684 } 1686 }
1687 rcu_read_unlock();
1685 } 1688 }
1686 1689
1687 ieee80211_tx_info_clear_status(info); 1690 ieee80211_tx_info_clear_status(info);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b755e778b0c4..acf712ffb5e6 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1824,6 +1824,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1824 /* RA TA mDA mSA AE:DA SA */ 1824 /* RA TA mDA mSA AE:DA SA */
1825 mesh_da = mppath->mpp; 1825 mesh_da = mppath->mpp;
1826 is_mesh_mcast = 0; 1826 is_mesh_mcast = 0;
1827 } else if (mpath) {
1828 mesh_da = mpath->dst;
1829 is_mesh_mcast = 0;
1827 } else { 1830 } else {
1828 /* DA TA mSA AE:SA */ 1831 /* DA TA mSA AE:SA */
1829 mesh_da = bcast; 1832 mesh_da = bcast;
@@ -2721,7 +2724,7 @@ EXPORT_SYMBOL(ieee80211_get_buffered_bc);
2721void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, 2724void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
2722 struct sk_buff *skb, int tid) 2725 struct sk_buff *skb, int tid)
2723{ 2726{
2724 int ac = ieee802_1d_to_ac[tid]; 2727 int ac = ieee802_1d_to_ac[tid & 7];
2725 2728
2726 skb_set_mac_header(skb, 0); 2729 skb_set_mac_header(skb, 0);
2727 skb_set_network_header(skb, 0); 2730 skb_set_network_header(skb, 0);
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index 36717cebfbb6..1ac7b3fac6c9 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -187,6 +187,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
187 struct nfc_target *targets; 187 struct nfc_target *targets;
188 struct sk_buff *atqa_skb = NULL; 188 struct sk_buff *atqa_skb = NULL;
189 struct sk_buff *sak_skb = NULL; 189 struct sk_buff *sak_skb = NULL;
190 struct sk_buff *uid_skb = NULL;
190 int r; 191 int r;
191 192
192 pr_debug("from gate %d\n", gate); 193 pr_debug("from gate %d\n", gate);
@@ -222,6 +223,19 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
222 targets->sens_res = be16_to_cpu(*(u16 *)atqa_skb->data); 223 targets->sens_res = be16_to_cpu(*(u16 *)atqa_skb->data);
223 targets->sel_res = sak_skb->data[0]; 224 targets->sel_res = sak_skb->data[0];
224 225
226 r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE,
227 NFC_HCI_RF_READER_A_UID, &uid_skb);
228 if (r < 0)
229 goto exit;
230
231 if (uid_skb->len == 0 || uid_skb->len > NFC_NFCID1_MAXSIZE) {
232 r = -EPROTO;
233 goto exit;
234 }
235
236 memcpy(targets->nfcid1, uid_skb->data, uid_skb->len);
237 targets->nfcid1_len = uid_skb->len;
238
225 if (hdev->ops->complete_target_discovered) { 239 if (hdev->ops->complete_target_discovered) {
226 r = hdev->ops->complete_target_discovered(hdev, gate, 240 r = hdev->ops->complete_target_discovered(hdev, gate,
227 targets); 241 targets);
@@ -257,6 +271,7 @@ exit:
257 kfree(targets); 271 kfree(targets);
258 kfree_skb(atqa_skb); 272 kfree_skb(atqa_skb);
259 kfree_skb(sak_skb); 273 kfree_skb(sak_skb);
274 kfree_skb(uid_skb);
260 275
261 return r; 276 return r;
262} 277}
@@ -695,13 +710,12 @@ EXPORT_SYMBOL(nfc_hci_register_device);
695 710
696void nfc_hci_unregister_device(struct nfc_hci_dev *hdev) 711void nfc_hci_unregister_device(struct nfc_hci_dev *hdev)
697{ 712{
698 struct hci_msg *msg; 713 struct hci_msg *msg, *n;
699 714
700 skb_queue_purge(&hdev->rx_hcp_frags); 715 skb_queue_purge(&hdev->rx_hcp_frags);
701 skb_queue_purge(&hdev->msg_rx_queue); 716 skb_queue_purge(&hdev->msg_rx_queue);
702 717
703 while ((msg = list_first_entry(&hdev->msg_tx_queue, struct hci_msg, 718 list_for_each_entry_safe(msg, n, &hdev->msg_tx_queue, msg_l) {
704 msg_l)) != NULL) {
705 list_del(&msg->msg_l); 719 list_del(&msg->msg_l);
706 skb_queue_purge(&msg->msg_frags); 720 skb_queue_purge(&msg->msg_frags);
707 kfree(msg); 721 kfree(msg);
diff --git a/net/nfc/hci/hcp.c b/net/nfc/hci/hcp.c
index 7212cf2c5785..f4dad1a89740 100644
--- a/net/nfc/hci/hcp.c
+++ b/net/nfc/hci/hcp.c
@@ -105,7 +105,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
105 } 105 }
106 106
107 mutex_lock(&hdev->msg_tx_mutex); 107 mutex_lock(&hdev->msg_tx_mutex);
108 list_add_tail(&hdev->msg_tx_queue, &cmd->msg_l); 108 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
109 mutex_unlock(&hdev->msg_tx_mutex); 109 mutex_unlock(&hdev->msg_tx_mutex);
110 110
111 queue_work(hdev->msg_tx_wq, &hdev->msg_tx_work); 111 queue_work(hdev->msg_tx_wq, &hdev->msg_tx_work);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 5bb4da680427..f81efe13985a 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -27,6 +27,7 @@
27 27
28#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ 28#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
29 29
30#include <linux/module.h>
30#include <linux/types.h> 31#include <linux/types.h>
31#include <linux/workqueue.h> 32#include <linux/workqueue.h>
32#include <linux/completion.h> 33#include <linux/completion.h>
@@ -880,3 +881,5 @@ static void nci_cmd_work(struct work_struct *work)
880 jiffies + msecs_to_jiffies(NCI_CMD_TIMEOUT)); 881 jiffies + msecs_to_jiffies(NCI_CMD_TIMEOUT));
881 } 882 }
882} 883}
884
885MODULE_LICENSE("GPL");