diff options
Diffstat (limited to 'drivers/net/wireless/p54/txrx.c')
-rw-r--r-- | drivers/net/wireless/p54/txrx.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index f618b9623e5a..7834c26c2954 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c | |||
@@ -273,11 +273,9 @@ void p54_tx(struct p54_common *priv, struct sk_buff *skb) | |||
273 | 273 | ||
274 | static int p54_rssi_to_dbm(struct p54_common *priv, int rssi) | 274 | static int p54_rssi_to_dbm(struct p54_common *priv, int rssi) |
275 | { | 275 | { |
276 | int band = priv->hw->conf.channel->band; | ||
277 | |||
278 | if (priv->rxhw != 5) { | 276 | if (priv->rxhw != 5) { |
279 | return ((rssi * priv->rssical_db[band].mul) / 64 + | 277 | return ((rssi * priv->cur_rssi->mul) / 64 + |
280 | priv->rssical_db[band].add) / 4; | 278 | priv->cur_rssi->add) / 4; |
281 | } else { | 279 | } else { |
282 | /* | 280 | /* |
283 | * TODO: find the correct formula | 281 | * TODO: find the correct formula |
@@ -369,7 +367,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) | |||
369 | rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32; | 367 | rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32; |
370 | priv->tsf_low32 = tsf32; | 368 | priv->tsf_low32 = tsf32; |
371 | 369 | ||
372 | rx_status->flag |= RX_FLAG_TSFT; | 370 | rx_status->flag |= RX_FLAG_MACTIME_MPDU; |
373 | 371 | ||
374 | if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN)) | 372 | if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN)) |
375 | header_len += hdr->align[0]; | 373 | header_len += hdr->align[0]; |
@@ -698,7 +696,7 @@ static u8 p54_convert_algo(u32 cipher) | |||
698 | } | 696 | } |
699 | } | 697 | } |
700 | 698 | ||
701 | int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) | 699 | void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) |
702 | { | 700 | { |
703 | struct p54_common *priv = dev->priv; | 701 | struct p54_common *priv = dev->priv; |
704 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 702 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
@@ -719,12 +717,8 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
719 | &hdr_flags, &aid, &burst_allowed); | 717 | &hdr_flags, &aid, &burst_allowed); |
720 | 718 | ||
721 | if (p54_tx_qos_accounting_alloc(priv, skb, queue)) { | 719 | if (p54_tx_qos_accounting_alloc(priv, skb, queue)) { |
722 | if (!IS_QOS_QUEUE(queue)) { | 720 | dev_kfree_skb_any(skb); |
723 | dev_kfree_skb_any(skb); | 721 | return; |
724 | return NETDEV_TX_OK; | ||
725 | } else { | ||
726 | return NETDEV_TX_BUSY; | ||
727 | } | ||
728 | } | 722 | } |
729 | 723 | ||
730 | padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3; | 724 | padding = (unsigned long)(skb->data - (sizeof(*hdr) + sizeof(*txhdr))) & 3; |
@@ -867,5 +861,4 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
867 | p54info->extra_len = extra_len; | 861 | p54info->extra_len = extra_len; |
868 | 862 | ||
869 | p54_tx(priv, skb); | 863 | p54_tx(priv, skb); |
870 | return NETDEV_TX_OK; | ||
871 | } | 864 | } |