提交 d369f7b2 编写于 作者: J John W. Linville
...@@ -578,9 +578,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, ...@@ -578,9 +578,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
/* /*
* Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid
* MCS index values for us are 0 to 7. * MCS index values for us are 0 to 15.
*/ */
if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 8)) { if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 16)) {
sinfo->txrate.mcs = priv->tx_rate; sinfo->txrate.mcs = priv->tx_rate;
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
/* 40MHz rate */ /* 40MHz rate */
......
...@@ -1665,7 +1665,9 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force) ...@@ -1665,7 +1665,9 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force)
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
if (ieee80211_is_data(wh->frame_control)) { if (ieee80211_is_data(wh->frame_control)) {
sta = info->control.sta; rcu_read_lock();
sta = ieee80211_find_sta_by_ifaddr(hw, wh->addr1,
wh->addr2);
if (sta) { if (sta) {
sta_info = MWL8K_STA(sta); sta_info = MWL8K_STA(sta);
BUG_ON(sta_info == NULL); BUG_ON(sta_info == NULL);
...@@ -1682,6 +1684,7 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force) ...@@ -1682,6 +1684,7 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force)
sta_info->is_ampdu_allowed = true; sta_info->is_ampdu_allowed = true;
} }
} }
rcu_read_unlock();
} }
ieee80211_tx_info_clear_status(info); ieee80211_tx_info_clear_status(info);
......
...@@ -1824,6 +1824,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, ...@@ -1824,6 +1824,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
/* RA TA mDA mSA AE:DA SA */ /* RA TA mDA mSA AE:DA SA */
mesh_da = mppath->mpp; mesh_da = mppath->mpp;
is_mesh_mcast = 0; is_mesh_mcast = 0;
} else if (mpath) {
mesh_da = mpath->dst;
is_mesh_mcast = 0;
} else { } else {
/* DA TA mSA AE:SA */ /* DA TA mSA AE:SA */
mesh_da = bcast; mesh_da = bcast;
...@@ -2721,7 +2724,7 @@ EXPORT_SYMBOL(ieee80211_get_buffered_bc); ...@@ -2721,7 +2724,7 @@ EXPORT_SYMBOL(ieee80211_get_buffered_bc);
void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, int tid) struct sk_buff *skb, int tid)
{ {
int ac = ieee802_1d_to_ac[tid]; int ac = ieee802_1d_to_ac[tid & 7];
skb_set_mac_header(skb, 0); skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0); skb_set_network_header(skb, 0);
......
...@@ -187,6 +187,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate) ...@@ -187,6 +187,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
struct nfc_target *targets; struct nfc_target *targets;
struct sk_buff *atqa_skb = NULL; struct sk_buff *atqa_skb = NULL;
struct sk_buff *sak_skb = NULL; struct sk_buff *sak_skb = NULL;
struct sk_buff *uid_skb = NULL;
int r; int r;
pr_debug("from gate %d\n", gate); 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,6 +223,19 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
targets->sens_res = be16_to_cpu(*(u16 *)atqa_skb->data); targets->sens_res = be16_to_cpu(*(u16 *)atqa_skb->data);
targets->sel_res = sak_skb->data[0]; targets->sel_res = sak_skb->data[0];
r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_RF_READER_A_UID, &uid_skb);
if (r < 0)
goto exit;
if (uid_skb->len == 0 || uid_skb->len > NFC_NFCID1_MAXSIZE) {
r = -EPROTO;
goto exit;
}
memcpy(targets->nfcid1, uid_skb->data, uid_skb->len);
targets->nfcid1_len = uid_skb->len;
if (hdev->ops->complete_target_discovered) { if (hdev->ops->complete_target_discovered) {
r = hdev->ops->complete_target_discovered(hdev, gate, r = hdev->ops->complete_target_discovered(hdev, gate,
targets); targets);
...@@ -257,6 +271,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate) ...@@ -257,6 +271,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
kfree(targets); kfree(targets);
kfree_skb(atqa_skb); kfree_skb(atqa_skb);
kfree_skb(sak_skb); kfree_skb(sak_skb);
kfree_skb(uid_skb);
return r; return r;
} }
...@@ -695,13 +710,12 @@ EXPORT_SYMBOL(nfc_hci_register_device); ...@@ -695,13 +710,12 @@ EXPORT_SYMBOL(nfc_hci_register_device);
void nfc_hci_unregister_device(struct nfc_hci_dev *hdev) void nfc_hci_unregister_device(struct nfc_hci_dev *hdev)
{ {
struct hci_msg *msg; struct hci_msg *msg, *n;
skb_queue_purge(&hdev->rx_hcp_frags); skb_queue_purge(&hdev->rx_hcp_frags);
skb_queue_purge(&hdev->msg_rx_queue); skb_queue_purge(&hdev->msg_rx_queue);
while ((msg = list_first_entry(&hdev->msg_tx_queue, struct hci_msg, list_for_each_entry_safe(msg, n, &hdev->msg_tx_queue, msg_l) {
msg_l)) != NULL) {
list_del(&msg->msg_l); list_del(&msg->msg_l);
skb_queue_purge(&msg->msg_frags); skb_queue_purge(&msg->msg_frags);
kfree(msg); kfree(msg);
......
...@@ -105,7 +105,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe, ...@@ -105,7 +105,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
} }
mutex_lock(&hdev->msg_tx_mutex); mutex_lock(&hdev->msg_tx_mutex);
list_add_tail(&hdev->msg_tx_queue, &cmd->msg_l); list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
mutex_unlock(&hdev->msg_tx_mutex); mutex_unlock(&hdev->msg_tx_mutex);
queue_work(hdev->msg_tx_wq, &hdev->msg_tx_work); queue_work(hdev->msg_tx_wq, &hdev->msg_tx_work);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ #define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/completion.h> #include <linux/completion.h>
...@@ -880,3 +881,5 @@ static void nci_cmd_work(struct work_struct *work) ...@@ -880,3 +881,5 @@ static void nci_cmd_work(struct work_struct *work)
jiffies + msecs_to_jiffies(NCI_CMD_TIMEOUT)); jiffies + msecs_to_jiffies(NCI_CMD_TIMEOUT));
} }
} }
MODULE_LICENSE("GPL");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册