diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-12-29 04:08:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:46 -0500 |
commit | b16f13d00c6f7e7317d3074f9bd07b5c9f313891 (patch) | |
tree | b559643606a7f5693851710f5ab60cae371663dc | |
parent | 8fffc15dc777ce3fe12ddc582d7c87a642591d3b (diff) |
several missing cpu_to_le16() in ieee80211softmac_capabilities()
on some codepaths we forgot to convert to little-endian as we do on the
rest of them and as the caller expects from us.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_io.c b/net/ieee80211/softmac/ieee80211softmac_io.c index 26c35253be33..73b4b13fbd8f 100644 --- a/net/ieee80211/softmac/ieee80211softmac_io.c +++ b/net/ieee80211/softmac/ieee80211softmac_io.c | |||
@@ -148,11 +148,11 @@ ieee80211softmac_hdr_3addr(struct ieee80211softmac_device *mac, | |||
148 | * shouldn't the sequence number be in ieee80211? */ | 148 | * shouldn't the sequence number be in ieee80211? */ |
149 | } | 149 | } |
150 | 150 | ||
151 | static u16 | 151 | static __le16 |
152 | ieee80211softmac_capabilities(struct ieee80211softmac_device *mac, | 152 | ieee80211softmac_capabilities(struct ieee80211softmac_device *mac, |
153 | struct ieee80211softmac_network *net) | 153 | struct ieee80211softmac_network *net) |
154 | { | 154 | { |
155 | u16 capability = 0; | 155 | __le16 capability = 0; |
156 | 156 | ||
157 | /* ESS and IBSS bits are set according to the current mode */ | 157 | /* ESS and IBSS bits are set according to the current mode */ |
158 | switch (mac->ieee->iw_mode) { | 158 | switch (mac->ieee->iw_mode) { |
@@ -163,8 +163,8 @@ ieee80211softmac_capabilities(struct ieee80211softmac_device *mac, | |||
163 | capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); | 163 | capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); |
164 | break; | 164 | break; |
165 | case IW_MODE_AUTO: | 165 | case IW_MODE_AUTO: |
166 | capability = net->capabilities & | 166 | capability = cpu_to_le16(net->capabilities & |
167 | (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS); | 167 | (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS)); |
168 | break; | 168 | break; |
169 | default: | 169 | default: |
170 | /* bleh. we don't ever go to these modes */ | 170 | /* bleh. we don't ever go to these modes */ |
@@ -182,7 +182,7 @@ ieee80211softmac_capabilities(struct ieee80211softmac_device *mac, | |||
182 | /* Short Preamble */ | 182 | /* Short Preamble */ |
183 | /* Always supported: we probably won't ever be powering devices which | 183 | /* Always supported: we probably won't ever be powering devices which |
184 | * dont support this... */ | 184 | * dont support this... */ |
185 | capability |= WLAN_CAPABILITY_SHORT_PREAMBLE; | 185 | capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE); |
186 | 186 | ||
187 | /* PBCC */ | 187 | /* PBCC */ |
188 | /* Not widely used */ | 188 | /* Not widely used */ |