aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2008-02-26 17:59:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:41:56 -0500
commit38c07b430b50172b803fe4c7f76cba580ba9931f (patch)
treeec6e2a2b4013e9e511d5382305994a9dffadcd75 /drivers/net/wireless/ath5k
parente6084239d39a10bac1186611fe7c523cea92c9ec (diff)
ath5k: fix all endian issues reported by sparse
Changes-licensed-under: ISC Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k')
-rw-r--r--drivers/net/wireless/ath5k/base.c8
-rw-r--r--drivers/net/wireless/ath5k/hw.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 0b743f7b3a14..393b5f3c25a7 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1717,11 +1717,11 @@ ath5k_check_ibss_hw_merge(struct ath5k_softc *sc, struct sk_buff *skb)
1717 u32 hw_tu; 1717 u32 hw_tu;
1718 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; 1718 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
1719 1719
1720 if ((mgmt->frame_control & IEEE80211_FCTL_FTYPE) == 1720 if ((le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_FTYPE) ==
1721 IEEE80211_FTYPE_MGMT && 1721 IEEE80211_FTYPE_MGMT &&
1722 (mgmt->frame_control & IEEE80211_FCTL_STYPE) == 1722 (le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE) ==
1723 IEEE80211_STYPE_BEACON && 1723 IEEE80211_STYPE_BEACON &&
1724 mgmt->u.beacon.capab_info & WLAN_CAPABILITY_IBSS && 1724 le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS &&
1725 memcmp(mgmt->bssid, sc->ah->ah_bssid, ETH_ALEN) == 0) { 1725 memcmp(mgmt->bssid, sc->ah->ah_bssid, ETH_ALEN) == 0) {
1726 /* 1726 /*
1727 * Received an IBSS beacon with the same BSSID. Hardware might 1727 * Received an IBSS beacon with the same BSSID. Hardware might
@@ -1730,7 +1730,7 @@ ath5k_check_ibss_hw_merge(struct ath5k_softc *sc, struct sk_buff *skb)
1730 hw_tu = TSF_TO_TU(ath5k_hw_get_tsf64(sc->ah)); 1730 hw_tu = TSF_TO_TU(ath5k_hw_get_tsf64(sc->ah));
1731 if (hw_tu >= sc->nexttbtt) { 1731 if (hw_tu >= sc->nexttbtt) {
1732 ath5k_beacon_update_timers(sc, 1732 ath5k_beacon_update_timers(sc,
1733 mgmt->u.beacon.timestamp); 1733 le64_to_cpu(mgmt->u.beacon.timestamp));
1734 ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, 1734 ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON,
1735 "detected HW merge from received beacon\n"); 1735 "detected HW merge from received beacon\n");
1736 } 1736 }
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 998da6be2be3..eec2b806a0de 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -531,8 +531,8 @@ static inline void ath5k_hw_write_rate_duration(struct ath5k_hw *ah,
531 * actual rate for this rate. See mac80211 tx.c 531 * actual rate for this rate. See mac80211 tx.c
532 * ieee80211_duration() for a brief description of 532 * ieee80211_duration() for a brief description of
533 * what rate we should choose to TX ACKs. */ 533 * what rate we should choose to TX ACKs. */
534 tx_time = ieee80211_generic_frame_duration(sc->hw, 534 tx_time = le16_to_cpu(ieee80211_generic_frame_duration(sc->hw,
535 sc->vif, 10, &srate); 535 sc->vif, 10, &srate));
536 536
537 ath5k_hw_reg_write(ah, tx_time, reg); 537 ath5k_hw_reg_write(ah, tx_time, reg);
538 538