Commit a05ffd39 authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

iwlwif: remove compilation warnings iwl_add_radiotap

Use directly put_unaligned_leX instead of put_unaligned(cpu_to_leX
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent df70b4ac
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <net/mac80211.h> #include <net/mac80211.h>
#include <asm/unaligned.h>
#include "iwl-eeprom.h" #include "iwl-eeprom.h"
#include "iwl-dev.h" #include "iwl-dev.h"
#include "iwl-core.h" #include "iwl-core.h"
...@@ -829,23 +830,22 @@ static void iwl_add_radiotap(struct iwl_priv *priv, ...@@ -829,23 +830,22 @@ static void iwl_add_radiotap(struct iwl_priv *priv,
iwl4965_rt->rt_hdr.it_pad = 0; iwl4965_rt->rt_hdr.it_pad = 0;
/* total header + data */ /* total header + data */
put_unaligned(cpu_to_le16(sizeof(*iwl4965_rt)), put_unaligned_le16(sizeof(*iwl4965_rt), &iwl4965_rt->rt_hdr.it_len);
&iwl4965_rt->rt_hdr.it_len);
/* Indicate all the fields we add to the radiotap header */ /* Indicate all the fields we add to the radiotap header */
put_unaligned(cpu_to_le32((1 << IEEE80211_RADIOTAP_TSFT) | put_unaligned_le32((1 << IEEE80211_RADIOTAP_TSFT) |
(1 << IEEE80211_RADIOTAP_FLAGS) | (1 << IEEE80211_RADIOTAP_FLAGS) |
(1 << IEEE80211_RADIOTAP_RATE) | (1 << IEEE80211_RADIOTAP_RATE) |
(1 << IEEE80211_RADIOTAP_CHANNEL) | (1 << IEEE80211_RADIOTAP_CHANNEL) |
(1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) |
(1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) |
(1 << IEEE80211_RADIOTAP_ANTENNA)), (1 << IEEE80211_RADIOTAP_ANTENNA),
&iwl4965_rt->rt_hdr.it_present); &(iwl4965_rt->rt_hdr.it_present));
/* Zero the flags, we'll add to them as we go */ /* Zero the flags, we'll add to them as we go */
iwl4965_rt->rt_flags = 0; iwl4965_rt->rt_flags = 0;
put_unaligned(cpu_to_le64(tsf), &iwl4965_rt->rt_tsf); put_unaligned_le64(tsf, &iwl4965_rt->rt_tsf);
iwl4965_rt->rt_dbmsignal = signal; iwl4965_rt->rt_dbmsignal = signal;
iwl4965_rt->rt_dbmnoise = noise; iwl4965_rt->rt_dbmnoise = noise;
...@@ -853,17 +853,14 @@ static void iwl_add_radiotap(struct iwl_priv *priv, ...@@ -853,17 +853,14 @@ static void iwl_add_radiotap(struct iwl_priv *priv,
/* Convert the channel frequency and set the flags */ /* Convert the channel frequency and set the flags */
put_unaligned(cpu_to_le16(stats->freq), &iwl4965_rt->rt_channelMHz); put_unaligned(cpu_to_le16(stats->freq), &iwl4965_rt->rt_channelMHz);
if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK)) if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK))
put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ,
IEEE80211_CHAN_5GHZ), &iwl4965_rt->rt_chbitmask);
&iwl4965_rt->rt_chbitmask);
else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK) else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK)
put_unaligned(cpu_to_le16(IEEE80211_CHAN_CCK | put_unaligned_le16(IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ,
IEEE80211_CHAN_2GHZ), &iwl4965_rt->rt_chbitmask);
&iwl4965_rt->rt_chbitmask);
else /* 802.11g */ else /* 802.11g */
put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ,
IEEE80211_CHAN_2GHZ), &iwl4965_rt->rt_chbitmask);
&iwl4965_rt->rt_chbitmask);
if (rate == -1) if (rate == -1)
iwl4965_rt->rt_rate = 0; iwl4965_rt->rt_rate = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment