diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-04-29 04:03:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:27 -0400 |
commit | 533dd1b0be103b0ff11da71152877e1ba530f1c2 (patch) | |
tree | acae750d9e0399b6cd5b31cf848cffd9ac430013 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 6caf52a453d5fe0bc584a2895bfd39a3d9054829 (diff) |
wireless: use get/put_unaligned_* helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Daniel Drake <dsd@gentoo.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 598e4eef4f40..d3406830c8e3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -554,40 +554,36 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
554 | iwl3945_rt->rt_hdr.it_pad = 0; | 554 | iwl3945_rt->rt_hdr.it_pad = 0; |
555 | 555 | ||
556 | /* total header + data */ | 556 | /* total header + data */ |
557 | put_unaligned(cpu_to_le16(sizeof(*iwl3945_rt)), | 557 | put_unaligned_le16(sizeof(*iwl3945_rt), &iwl3945_rt->rt_hdr.it_len); |
558 | &iwl3945_rt->rt_hdr.it_len); | ||
559 | 558 | ||
560 | /* Indicate all the fields we add to the radiotap header */ | 559 | /* Indicate all the fields we add to the radiotap header */ |
561 | put_unaligned(cpu_to_le32((1 << IEEE80211_RADIOTAP_TSFT) | | 560 | put_unaligned_le32((1 << IEEE80211_RADIOTAP_TSFT) | |
562 | (1 << IEEE80211_RADIOTAP_FLAGS) | | 561 | (1 << IEEE80211_RADIOTAP_FLAGS) | |
563 | (1 << IEEE80211_RADIOTAP_RATE) | | 562 | (1 << IEEE80211_RADIOTAP_RATE) | |
564 | (1 << IEEE80211_RADIOTAP_CHANNEL) | | 563 | (1 << IEEE80211_RADIOTAP_CHANNEL) | |
565 | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | | 564 | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | |
566 | (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | | 565 | (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | |
567 | (1 << IEEE80211_RADIOTAP_ANTENNA)), | 566 | (1 << IEEE80211_RADIOTAP_ANTENNA), |
568 | &iwl3945_rt->rt_hdr.it_present); | 567 | &iwl3945_rt->rt_hdr.it_present); |
569 | 568 | ||
570 | /* Zero the flags, we'll add to them as we go */ | 569 | /* Zero the flags, we'll add to them as we go */ |
571 | iwl3945_rt->rt_flags = 0; | 570 | iwl3945_rt->rt_flags = 0; |
572 | 571 | ||
573 | put_unaligned(cpu_to_le64(tsf), &iwl3945_rt->rt_tsf); | 572 | put_unaligned_le64(tsf, &iwl3945_rt->rt_tsf); |
574 | 573 | ||
575 | iwl3945_rt->rt_dbmsignal = signal; | 574 | iwl3945_rt->rt_dbmsignal = signal; |
576 | iwl3945_rt->rt_dbmnoise = noise; | 575 | iwl3945_rt->rt_dbmnoise = noise; |
577 | 576 | ||
578 | /* Convert the channel frequency and set the flags */ | 577 | /* Convert the channel frequency and set the flags */ |
579 | put_unaligned(cpu_to_le16(stats->freq), &iwl3945_rt->rt_channelMHz); | 578 | put_unaligned_le16(stats->freq, &iwl3945_rt->rt_channelMHz); |
580 | if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK)) | 579 | if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK)) |
581 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | | 580 | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ, |
582 | IEEE80211_CHAN_5GHZ), | ||
583 | &iwl3945_rt->rt_chbitmask); | 581 | &iwl3945_rt->rt_chbitmask); |
584 | else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK) | 582 | else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK) |
585 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_CCK | | 583 | put_unaligned_le16(IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ, |
586 | IEEE80211_CHAN_2GHZ), | ||
587 | &iwl3945_rt->rt_chbitmask); | 584 | &iwl3945_rt->rt_chbitmask); |
588 | else /* 802.11g */ | 585 | else /* 802.11g */ |
589 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | | 586 | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ, |
590 | IEEE80211_CHAN_2GHZ), | ||
591 | &iwl3945_rt->rt_chbitmask); | 587 | &iwl3945_rt->rt_chbitmask); |
592 | 588 | ||
593 | if (rate == -1) | 589 | if (rate == -1) |