diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-04-01 11:51:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-08 16:43:50 -0400 |
commit | a0b484fee72fc18eb9145011a5edec922fafbc15 (patch) | |
tree | a71180b9a8104253657f28c9e43e91724c17a32e | |
parent | 16788599a9601cbba6ad7b58b3b52227ea59c013 (diff) |
iwlwifi: fix some warnings
This fixes all kinds of warnings in iwlwifi.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index eb30819cddc4..0d3cc3559039 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -524,7 +524,7 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
524 | s8 noise = 0; | 524 | s8 noise = 0; |
525 | int rate = stats->rate_idx; | 525 | int rate = stats->rate_idx; |
526 | u64 tsf = stats->mactime; | 526 | u64 tsf = stats->mactime; |
527 | __le16 phy_flags_hw = rx_hdr->phy_flags; | 527 | __le16 phy_flags_hw = rx_hdr->phy_flags, antenna; |
528 | 528 | ||
529 | struct iwl3945_rt_rx_hdr { | 529 | struct iwl3945_rt_rx_hdr { |
530 | struct ieee80211_radiotap_header rt_hdr; | 530 | struct ieee80211_radiotap_header rt_hdr; |
@@ -596,8 +596,8 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
596 | iwl3945_rt->rt_rate = iwl3945_rates[rate].ieee; | 596 | iwl3945_rt->rt_rate = iwl3945_rates[rate].ieee; |
597 | 597 | ||
598 | /* antenna number */ | 598 | /* antenna number */ |
599 | iwl3945_rt->rt_antenna = | 599 | antenna = phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK; |
600 | le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4; | 600 | iwl3945_rt->rt_antenna = le16_to_cpu(antenna) >> 4; |
601 | 601 | ||
602 | /* set the preamble flag if we have it */ | 602 | /* set the preamble flag if we have it */ |
603 | if (phy_flags_hw & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) | 603 | if (phy_flags_hw & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index ac1226946aa6..333c85077211 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -280,8 +280,8 @@ struct iwl3945_frame { | |||
280 | 280 | ||
281 | #define SEQ_TO_QUEUE(x) ((x >> 8) & 0xbf) | 281 | #define SEQ_TO_QUEUE(x) ((x >> 8) & 0xbf) |
282 | #define QUEUE_TO_SEQ(x) ((x & 0xbf) << 8) | 282 | #define QUEUE_TO_SEQ(x) ((x & 0xbf) << 8) |
283 | #define SEQ_TO_INDEX(x) (x & 0xff) | 283 | #define SEQ_TO_INDEX(x) ((u8)(x & 0xff)) |
284 | #define INDEX_TO_SEQ(x) (x & 0xff) | 284 | #define INDEX_TO_SEQ(x) ((u8)(x & 0xff)) |
285 | #define SEQ_HUGE_FRAME (0x4000) | 285 | #define SEQ_HUGE_FRAME (0x4000) |
286 | #define SEQ_RX_FRAME __constant_cpu_to_le16(0x8000) | 286 | #define SEQ_RX_FRAME __constant_cpu_to_le16(0x8000) |
287 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) | 287 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 0171bb8cbbc6..73e8a24eb9ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -3296,6 +3296,7 @@ static void iwl4965_add_radiotap(struct iwl_priv *priv, | |||
3296 | s8 noise = 0; | 3296 | s8 noise = 0; |
3297 | int rate = stats->rate_idx; | 3297 | int rate = stats->rate_idx; |
3298 | u64 tsf = stats->mactime; | 3298 | u64 tsf = stats->mactime; |
3299 | __le16 antenna; | ||
3299 | __le16 phy_flags_hw = rx_start->phy_flags; | 3300 | __le16 phy_flags_hw = rx_start->phy_flags; |
3300 | struct iwl4965_rt_rx_hdr { | 3301 | struct iwl4965_rt_rx_hdr { |
3301 | struct ieee80211_radiotap_header rt_hdr; | 3302 | struct ieee80211_radiotap_header rt_hdr; |
@@ -3380,8 +3381,8 @@ static void iwl4965_add_radiotap(struct iwl_priv *priv, | |||
3380 | * new 802.11n radiotap field "RX chains" that is defined | 3381 | * new 802.11n radiotap field "RX chains" that is defined |
3381 | * as a bitmask. | 3382 | * as a bitmask. |
3382 | */ | 3383 | */ |
3383 | iwl4965_rt->rt_antenna = | 3384 | antenna = phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK; |
3384 | le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4; | 3385 | iwl4965_rt->rt_antenna = le16_to_cpu(antenna) >> 4; |
3385 | 3386 | ||
3386 | /* set the preamble flag if appropriate */ | 3387 | /* set the preamble flag if appropriate */ |
3387 | if (phy_flags_hw & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) | 3388 | if (phy_flags_hw & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index c8e7028cdf2a..0ec217da48d4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -294,8 +294,8 @@ struct iwl4965_frame { | |||
294 | 294 | ||
295 | #define SEQ_TO_QUEUE(x) ((x >> 8) & 0xbf) | 295 | #define SEQ_TO_QUEUE(x) ((x >> 8) & 0xbf) |
296 | #define QUEUE_TO_SEQ(x) ((x & 0xbf) << 8) | 296 | #define QUEUE_TO_SEQ(x) ((x & 0xbf) << 8) |
297 | #define SEQ_TO_INDEX(x) (x & 0xff) | 297 | #define SEQ_TO_INDEX(x) ((u8)(x & 0xff)) |
298 | #define INDEX_TO_SEQ(x) (x & 0xff) | 298 | #define INDEX_TO_SEQ(x) ((u8)(x & 0xff)) |
299 | #define SEQ_HUGE_FRAME (0x4000) | 299 | #define SEQ_HUGE_FRAME (0x4000) |
300 | #define SEQ_RX_FRAME __constant_cpu_to_le16(0x8000) | 300 | #define SEQ_RX_FRAME __constant_cpu_to_le16(0x8000) |
301 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) | 301 | #define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) |