summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8187se
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-03-10 08:49:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-18 10:05:06 -0700
commite95f6dfbcfad748f76376f0de8c4f34457bb2fc3 (patch)
tree8bef8bd21b60d3a608dbee2e51ceb38b8fd0fe8d /drivers/staging/rtl8187se
parent1a32c5ad2085f6a8a1c6e68ab1030c604a923d22 (diff)
staging:rtl8187se: Fix sparse warning restricted __le16 degrades to integer
This patch fixes the following sparse warning in r8180_core.c - warning: restricted __le16 degrades to integer. Also, the variable morefrag is changed to bool as it is being used as a bool. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8187se')
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 79ec26317598..bb405ff4ba3c 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -1579,7 +1579,7 @@ static void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
int mode;
struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *)skb->data;
- short morefrag = (h->frame_control) & IEEE80211_FCTL_MOREFRAGS;
+ bool morefrag = le16_to_cpu(h->frame_control) & IEEE80211_FCTL_MOREFRAGS;
unsigned long flags;
int priority;
@@ -1807,7 +1807,7 @@ short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
TxDescDuration = ThisFrameTime + aSifsTime + AckTime;
}
- if (!(frag_hdr->frame_control & IEEE80211_FCTL_MOREFRAGS)) {
+ if (!(le16_to_cpu(frag_hdr->frame_control) & IEEE80211_FCTL_MOREFRAGS)) {
/* ThisFrame-ACK. */
Duration = aSifsTime + AckTime;
} else { /* One or more fragments remained. */