mirror of https://gitee.com/openkylin/linux.git
iwmc3200wifi: typo fix and code cleanup
Fix wrong IWM_RX_TICKET_DROP_REASON_MSK macro define, typo and other small cleanups. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
d281fd461d
commit
1da3f88222
|
@ -506,7 +506,7 @@ static int iwm_target_read(struct iwm_priv *iwm, __le32 address,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When succeding, the send_target routine returns the seq number */
|
/* When succeeding, the send_target routine returns the seq number */
|
||||||
seq_num = ret;
|
seq_num = ret;
|
||||||
|
|
||||||
ret = wait_event_interruptible_timeout(iwm->nonwifi_queue,
|
ret = wait_event_interruptible_timeout(iwm->nonwifi_queue,
|
||||||
|
|
|
@ -869,16 +869,15 @@ static int iwm_mlme_remove_bss(struct iwm_priv *iwm, u8 *buf,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < le32_to_cpu(bss_rm->count); i++) {
|
for (i = 0; i < le32_to_cpu(bss_rm->count); i++) {
|
||||||
table_idx = (le16_to_cpu(bss_rm->entries[i])
|
table_idx = le16_to_cpu(bss_rm->entries[i]) &
|
||||||
& IWM_BSS_REMOVE_INDEX_MSK);
|
IWM_BSS_REMOVE_INDEX_MSK;
|
||||||
list_for_each_entry_safe(bss, next, &iwm->bss_list, node)
|
list_for_each_entry_safe(bss, next, &iwm->bss_list, node)
|
||||||
if (bss->bss->table_idx == cpu_to_le16(table_idx)) {
|
if (bss->bss->table_idx == cpu_to_le16(table_idx)) {
|
||||||
struct ieee80211_mgmt *mgmt;
|
struct ieee80211_mgmt *mgmt;
|
||||||
|
|
||||||
mgmt = (struct ieee80211_mgmt *)
|
mgmt = (struct ieee80211_mgmt *)
|
||||||
(bss->bss->frame_buf);
|
(bss->bss->frame_buf);
|
||||||
IWM_DBG_MLME(iwm, ERR,
|
IWM_DBG_MLME(iwm, ERR, "BSS removed: %pM\n",
|
||||||
"BSS removed: %pM\n",
|
|
||||||
mgmt->bssid);
|
mgmt->bssid);
|
||||||
list_del(&bss->node);
|
list_del(&bss->node);
|
||||||
kfree(bss->bss);
|
kfree(bss->bss);
|
||||||
|
|
|
@ -451,7 +451,6 @@ void iwm_tx_worker(struct work_struct *work)
|
||||||
int iwm_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
int iwm_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct iwm_priv *iwm = ndev_to_iwm(netdev);
|
struct iwm_priv *iwm = ndev_to_iwm(netdev);
|
||||||
struct net_device *ndev = iwm_to_ndev(iwm);
|
|
||||||
struct wireless_dev *wdev = iwm_to_wdev(iwm);
|
struct wireless_dev *wdev = iwm_to_wdev(iwm);
|
||||||
struct iwm_tx_info *tx_info;
|
struct iwm_tx_info *tx_info;
|
||||||
struct iwm_tx_queue *txq;
|
struct iwm_tx_queue *txq;
|
||||||
|
@ -518,12 +517,12 @@ int iwm_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||||
|
|
||||||
queue_work(iwm->txq[queue].wq, &iwm->txq[queue].worker);
|
queue_work(iwm->txq[queue].wq, &iwm->txq[queue].worker);
|
||||||
|
|
||||||
ndev->stats.tx_packets++;
|
netdev->stats.tx_packets++;
|
||||||
ndev->stats.tx_bytes += skb->len;
|
netdev->stats.tx_bytes += skb->len;
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
|
||||||
drop:
|
drop:
|
||||||
ndev->stats.tx_dropped++;
|
netdev->stats.tx_dropped++;
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,7 @@ struct iwm_udma_out_wifi_hdr {
|
||||||
#define IWM_RX_TICKET_SPECIAL_SNAP_MSK 0x4
|
#define IWM_RX_TICKET_SPECIAL_SNAP_MSK 0x4
|
||||||
#define IWM_RX_TICKET_AMSDU_MSK 0x8
|
#define IWM_RX_TICKET_AMSDU_MSK 0x8
|
||||||
#define IWM_RX_TICKET_DROP_REASON_POS 4
|
#define IWM_RX_TICKET_DROP_REASON_POS 4
|
||||||
#define IWM_RX_TICKET_DROP_REASON_MSK (0x1F << RX_TICKET_FLAGS_DROP_REASON_POS)
|
#define IWM_RX_TICKET_DROP_REASON_MSK (0x1F << IWM_RX_TICKET_DROP_REASON_POS)
|
||||||
|
|
||||||
#define IWM_RX_DROP_NO_DROP 0x0
|
#define IWM_RX_DROP_NO_DROP 0x0
|
||||||
#define IWM_RX_DROP_BAD_CRC 0x1
|
#define IWM_RX_DROP_BAD_CRC 0x1
|
||||||
|
|
Loading…
Reference in New Issue