aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/adm8211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r--drivers/net/wireless/adm8211.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ba55ba93958..3333d4596b8d 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1685,7 +1685,6 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
1685static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) 1685static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
1686{ 1686{
1687 struct adm8211_tx_hdr *txhdr; 1687 struct adm8211_tx_hdr *txhdr;
1688 u16 fc;
1689 size_t payload_len, hdrlen; 1688 size_t payload_len, hdrlen;
1690 int plcp, dur, len, plcp_signal, short_preamble; 1689 int plcp, dur, len, plcp_signal, short_preamble;
1691 struct ieee80211_hdr *hdr; 1690 struct ieee80211_hdr *hdr;
@@ -1696,8 +1695,7 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
1696 plcp_signal = txrate->bitrate; 1695 plcp_signal = txrate->bitrate;
1697 1696
1698 hdr = (struct ieee80211_hdr *)skb->data; 1697 hdr = (struct ieee80211_hdr *)skb->data;
1699 fc = le16_to_cpu(hdr->frame_control) & ~IEEE80211_FCTL_PROTECTED; 1698 hdrlen = ieee80211_hdrlen(hdr->frame_control);
1700 hdrlen = ieee80211_get_hdrlen(fc);
1701 memcpy(skb->cb, skb->data, hdrlen); 1699 memcpy(skb->cb, skb->data, hdrlen);
1702 hdr = (struct ieee80211_hdr *)skb->cb; 1700 hdr = (struct ieee80211_hdr *)skb->cb;
1703 skb_pull(skb, hdrlen); 1701 skb_pull(skb, hdrlen);
@@ -1711,8 +1709,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
1711 txhdr->frame_control = hdr->frame_control; 1709 txhdr->frame_control = hdr->frame_control;
1712 1710
1713 len = hdrlen + payload_len + FCS_LEN; 1711 len = hdrlen + payload_len + FCS_LEN;
1714 if (fc & IEEE80211_FCTL_PROTECTED)
1715 len += 8;
1716 1712
1717 txhdr->frag = cpu_to_le16(0x0FFF); 1713 txhdr->frag = cpu_to_le16(0x0FFF);
1718 adm8211_calc_durations(&dur, &plcp, payload_len, 1714 adm8211_calc_durations(&dur, &plcp, payload_len,
@@ -1730,9 +1726,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
1730 if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) 1726 if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
1731 txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS); 1727 txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS);
1732 1728
1733 if (fc & IEEE80211_FCTL_PROTECTED)
1734 txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_WEP_ENGINE);
1735
1736 txhdr->retry_limit = info->control.retry_limit; 1729 txhdr->retry_limit = info->control.retry_limit;
1737 1730
1738 adm8211_tx_raw(dev, skb, plcp_signal, hdrlen); 1731 adm8211_tx_raw(dev, skb, plcp_signal, hdrlen);