aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-12-27 01:43:16 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:56 -0500
commit743b84d2fc87cc19ca1c1cd2a821225caba862b0 (patch)
tree0687790c9c6d1dd53ba033eff84c010f857b43cb /drivers/net/wireless/ipw2200.c
parent7698d6977a62bbc6ed3b9d0d0230f2213a3b2f9d (diff)
ipw2200 fix: struct ieee80211_radiotap_header is little-endian
some places in driver forget conversions Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2200.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 97a6ff50eb80..5f4d39c9ece4 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -7759,11 +7759,11 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
7759 7759
7760 ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; 7760 ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION;
7761 ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ 7761 ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */
7762 ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total header+data */ 7762 ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(struct ipw_rt_hdr)); /* total header+data */
7763 7763
7764 /* Big bitfield of all the fields we provide in radiotap */ 7764 /* Big bitfield of all the fields we provide in radiotap */
7765 ipw_rt->rt_hdr.it_present = 7765 ipw_rt->rt_hdr.it_present = cpu_to_le32(
7766 ((1 << IEEE80211_RADIOTAP_TSFT) | 7766 (1 << IEEE80211_RADIOTAP_TSFT) |
7767 (1 << IEEE80211_RADIOTAP_FLAGS) | 7767 (1 << IEEE80211_RADIOTAP_FLAGS) |
7768 (1 << IEEE80211_RADIOTAP_RATE) | 7768 (1 << IEEE80211_RADIOTAP_RATE) |
7769 (1 << IEEE80211_RADIOTAP_CHANNEL) | 7769 (1 << IEEE80211_RADIOTAP_CHANNEL) |
@@ -7973,14 +7973,14 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
7973 7973
7974 ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; 7974 ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION;
7975 ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ 7975 ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */
7976 ipw_rt->rt_hdr.it_len = sizeof(*ipw_rt); /* total header+data */ 7976 ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(*ipw_rt)); /* total header+data */
7977 7977
7978 /* Set the size of the skb to the size of the frame */ 7978 /* Set the size of the skb to the size of the frame */
7979 skb_put(skb, ipw_rt->rt_hdr.it_len + len); 7979 skb_put(skb, sizeof(*ipw_rt) + len);
7980 7980
7981 /* Big bitfield of all the fields we provide in radiotap */ 7981 /* Big bitfield of all the fields we provide in radiotap */
7982 ipw_rt->rt_hdr.it_present = 7982 ipw_rt->rt_hdr.it_present = cpu_to_le32(
7983 ((1 << IEEE80211_RADIOTAP_TSFT) | 7983 (1 << IEEE80211_RADIOTAP_TSFT) |
7984 (1 << IEEE80211_RADIOTAP_FLAGS) | 7984 (1 << IEEE80211_RADIOTAP_FLAGS) |
7985 (1 << IEEE80211_RADIOTAP_RATE) | 7985 (1 << IEEE80211_RADIOTAP_RATE) |
7986 (1 << IEEE80211_RADIOTAP_CHANNEL) | 7986 (1 << IEEE80211_RADIOTAP_CHANNEL) |
@@ -10436,7 +10436,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
10436 rt_hdr->it_version = PKTHDR_RADIOTAP_VERSION; 10436 rt_hdr->it_version = PKTHDR_RADIOTAP_VERSION;
10437 rt_hdr->it_pad = 0; 10437 rt_hdr->it_pad = 0;
10438 rt_hdr->it_present = 0; /* after all, it's just an idea */ 10438 rt_hdr->it_present = 0; /* after all, it's just an idea */
10439 rt_hdr->it_present |= (1 << IEEE80211_RADIOTAP_CHANNEL); 10439 rt_hdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_CHANNEL);
10440 10440
10441 *(u16*)skb_put(dst, sizeof(u16)) = cpu_to_le16( 10441 *(u16*)skb_put(dst, sizeof(u16)) = cpu_to_le16(
10442 ieee80211chan2mhz(priv->channel)); 10442 ieee80211chan2mhz(priv->channel));
@@ -10453,7 +10453,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
10453 cpu_to_le16(IEEE80211_CHAN_OFDM | 10453 cpu_to_le16(IEEE80211_CHAN_OFDM |
10454 IEEE80211_CHAN_2GHZ); 10454 IEEE80211_CHAN_2GHZ);
10455 10455
10456 rt_hdr->it_len = dst->len; 10456 rt_hdr->it_len = cpu_to_le16(dst->len);
10457 10457
10458 skb_copy_from_linear_data(src, skb_put(dst, len), len); 10458 skb_copy_from_linear_data(src, skb_put(dst, len), len);
10459 10459