Commit 316af76f authored by Harvey Harrison's avatar Harvey Harrison Committed by John W. Linville

adm8211: remove unnecessary protected bit mask/check

Removes now unused fc local var and uses the new ieee80211_hdrlen
which directly uses the le16 frame control value.
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 97b045d6
...@@ -1685,7 +1685,6 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb, ...@@ -1685,7 +1685,6 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
{ {
struct adm8211_tx_hdr *txhdr; struct adm8211_tx_hdr *txhdr;
u16 fc;
size_t payload_len, hdrlen; size_t payload_len, hdrlen;
int plcp, dur, len, plcp_signal, short_preamble; int plcp, dur, len, plcp_signal, short_preamble;
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
...@@ -1696,8 +1695,7 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -1696,8 +1695,7 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
plcp_signal = txrate->bitrate; plcp_signal = txrate->bitrate;
hdr = (struct ieee80211_hdr *)skb->data; hdr = (struct ieee80211_hdr *)skb->data;
fc = le16_to_cpu(hdr->frame_control) & ~IEEE80211_FCTL_PROTECTED; hdrlen = ieee80211_hdrlen(hdr->frame_control);
hdrlen = ieee80211_get_hdrlen(fc);
memcpy(skb->cb, skb->data, hdrlen); memcpy(skb->cb, skb->data, hdrlen);
hdr = (struct ieee80211_hdr *)skb->cb; hdr = (struct ieee80211_hdr *)skb->cb;
skb_pull(skb, hdrlen); skb_pull(skb, hdrlen);
...@@ -1711,8 +1709,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -1711,8 +1709,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
txhdr->frame_control = hdr->frame_control; txhdr->frame_control = hdr->frame_control;
len = hdrlen + payload_len + FCS_LEN; len = hdrlen + payload_len + FCS_LEN;
if (fc & IEEE80211_FCTL_PROTECTED)
len += 8;
txhdr->frag = cpu_to_le16(0x0FFF); txhdr->frag = cpu_to_le16(0x0FFF);
adm8211_calc_durations(&dur, &plcp, payload_len, adm8211_calc_durations(&dur, &plcp, payload_len,
...@@ -1730,9 +1726,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -1730,9 +1726,6 @@ static int adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS); txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_RTS);
if (fc & IEEE80211_FCTL_PROTECTED)
txhdr->header_control |= cpu_to_le16(ADM8211_TXHDRCTL_ENABLE_WEP_ENGINE);
txhdr->retry_limit = info->control.retry_limit; txhdr->retry_limit = info->control.retry_limit;
adm8211_tx_raw(dev, skb, plcp_signal, hdrlen); adm8211_tx_raw(dev, skb, plcp_signal, hdrlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment