diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-02-19 17:29:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-21 15:39:59 -0500 |
commit | 17c9ac62812b58aacefc7336215aecbb522f6547 (patch) | |
tree | 3eca6290a695716678d7ff12f9a3093b566c5c93 /drivers/net/wireless/rtlwifi/base.c | |
parent | 663dcc73675bd70ee11195ce832b1d1691f967d0 (diff) |
rtlwifi: rtl8192ce: Fix endian warnings
Drivers rtlwifi, and rtl8192ce generate a large number of
sparse warnings. This patch fixes most of them.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/base.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 1d6cc1f3c6bf..3f40dc2b129c 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
@@ -144,7 +144,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, | |||
144 | ht_cap->mcs.rx_mask[1] = 0xFF; | 144 | ht_cap->mcs.rx_mask[1] = 0xFF; |
145 | ht_cap->mcs.rx_mask[4] = 0x01; | 145 | ht_cap->mcs.rx_mask[4] = 0x01; |
146 | 146 | ||
147 | ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS15; | 147 | ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15); |
148 | } else if (get_rf_type(rtlphy) == RF_1T1R) { | 148 | } else if (get_rf_type(rtlphy) == RF_1T1R) { |
149 | 149 | ||
150 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("1T1R\n")); | 150 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("1T1R\n")); |
@@ -153,7 +153,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, | |||
153 | ht_cap->mcs.rx_mask[1] = 0x00; | 153 | ht_cap->mcs.rx_mask[1] = 0x00; |
154 | ht_cap->mcs.rx_mask[4] = 0x01; | 154 | ht_cap->mcs.rx_mask[4] = 0x01; |
155 | 155 | ||
156 | ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS7; | 156 | ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
@@ -498,7 +498,7 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw, | |||
498 | struct rtl_mac *rtlmac = rtl_mac(rtl_priv(hw)); | 498 | struct rtl_mac *rtlmac = rtl_mac(rtl_priv(hw)); |
499 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 499 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
500 | struct ieee80211_rate *txrate; | 500 | struct ieee80211_rate *txrate; |
501 | u16 fc = le16_to_cpu(hdr->frame_control); | 501 | __le16 fc = hdr->frame_control; |
502 | 502 | ||
503 | memset(tcb_desc, 0, sizeof(struct rtl_tcb_desc)); | 503 | memset(tcb_desc, 0, sizeof(struct rtl_tcb_desc)); |
504 | 504 | ||
@@ -570,7 +570,7 @@ bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
570 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 570 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
571 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 571 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
572 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 572 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
573 | u16 fc = le16_to_cpu(hdr->frame_control); | 573 | __le16 fc = hdr->frame_control; |
574 | 574 | ||
575 | if (ieee80211_is_auth(fc)) { | 575 | if (ieee80211_is_auth(fc)) { |
576 | RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); | 576 | RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); |
@@ -587,7 +587,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
587 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 587 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
588 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 588 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
589 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 589 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
590 | u16 fc = le16_to_cpu(hdr->frame_control); | 590 | __le16 fc = hdr->frame_control; |
591 | u8 *act = (u8 *) (((u8 *) skb->data + MAC80211_3ADDR_LEN)); | 591 | u8 *act = (u8 *) (((u8 *) skb->data + MAC80211_3ADDR_LEN)); |
592 | u8 category; | 592 | u8 category; |
593 | 593 | ||
@@ -632,7 +632,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
632 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 632 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
633 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 633 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
634 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 634 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
635 | u16 fc = le16_to_cpu(hdr->frame_control); | 635 | __le16 fc = hdr->frame_control; |
636 | u16 ether_type; | 636 | u16 ether_type; |
637 | u8 mac_hdr_len = ieee80211_get_hdrlen_from_skb(skb); | 637 | u8 mac_hdr_len = ieee80211_get_hdrlen_from_skb(skb); |
638 | const struct iphdr *ip; | 638 | const struct iphdr *ip; |
@@ -646,7 +646,6 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
646 | ip = (struct iphdr *)((u8 *) skb->data + mac_hdr_len + | 646 | ip = (struct iphdr *)((u8 *) skb->data + mac_hdr_len + |
647 | SNAP_SIZE + PROTOC_TYPE_SIZE); | 647 | SNAP_SIZE + PROTOC_TYPE_SIZE); |
648 | ether_type = *(u16 *) ((u8 *) skb->data + mac_hdr_len + SNAP_SIZE); | 648 | ether_type = *(u16 *) ((u8 *) skb->data + mac_hdr_len + SNAP_SIZE); |
649 | ether_type = ntohs(ether_type); | ||
650 | 649 | ||
651 | if (ETH_P_IP == ether_type) { | 650 | if (ETH_P_IP == ether_type) { |
652 | if (IPPROTO_UDP == ip->protocol) { | 651 | if (IPPROTO_UDP == ip->protocol) { |
@@ -690,7 +689,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) | |||
690 | } | 689 | } |
691 | 690 | ||
692 | return true; | 691 | return true; |
693 | } else if (0x86DD == ether_type) { | 692 | } else if (ETH_P_IPV6 == ether_type) { |
693 | /* IPv6 */ | ||
694 | return true; | 694 | return true; |
695 | } | 695 | } |
696 | 696 | ||