Skip to contentSkip to conversation

mwl8k: Fixing Sparse ENDIAN CHECK warning

PATCH New Yogesh Ashok Powar 1 participant 1 message Jan 17, 2012 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwl8k: Fixing Sparse ENDIAN CHECK warning

Fixing following sparse warning

Quoted 3 lines

drivers/net/wireless/mwl8k.c:2780:15: warning: incorrect type in assignment (different base types)
drivers/net/wireless/mwl8k.c:2780:15: expected restricted unsigned short [usertype] channel
drivers/net/wireless/mwl8k.c:2780:15: got unsigned short [unsigned] [usertype] hw_value

---
 drivers/net/wireless/mwl8k.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/mwl8k.c +1 -1
index 8ea7012..008f406 100644
@@ -2777,7 +2777,7 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw,
 	else if (channel->band == IEEE80211_BAND_5GHZ)
 		cmd->band = cpu_to_le16(0x4);
 
-	cmd->channel = channel->hw_value;
+	cmd->channel = cpu_to_le16(channel->hw_value);
 
 	if (conf->channel_type == NL80211_CHAN_NO_HT ||
 	    conf->channel_type == NL80211_CHAN_HT20) {
Signature · 1 line
1.7.5.4