diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-01 10:22:30 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:24:14 -0500 |
commit | 380aeef8941c6b8a3e8de86b5ca000ca986e3b17 (patch) | |
tree | e9c9d9a9e4ca14bfae3794f4ba139043c5af4a29 /drivers/net/wireless/mwifiex/sta_ioctl.c | |
parent | 62ebeed8d00aef75eac4fd6c161cae75a41965ca (diff) | |
download | blackbird-op-linux-380aeef8941c6b8a3e8de86b5ca000ca986e3b17.tar.gz blackbird-op-linux-380aeef8941c6b8a3e8de86b5ca000ca986e3b17.zip |
mwifiex: endian bug in mwifiex_drv_change_adhoc_chan()
In mwifiex_drv_change_adhoc_chan() we pass channel to
mwifiex_bss_ioctl_ibss_channel() which sets the high 16 bits. This
works on little endian systems but not on big endian ones. I've changed
mwifiex_drv_change_adhoc_chan() to use a 16 bit variable. This matches
the other functions in the file.
I considered changing mwifiex_change_adhoc_chan() as well but it turns
out that the function isn't implemented so I just removed the
definition.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_ioctl.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 593d285111d2..0ae1209646c1 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -609,7 +609,7 @@ static int mwifiex_bss_ioctl_ibss_channel(struct mwifiex_private *priv, * - Start/Join the IBSS */ int -mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel) +mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, u16 channel) { int ret; struct mwifiex_bss_info bss_info; @@ -646,7 +646,7 @@ mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel) ret = mwifiex_deauthenticate(priv, ssid_bssid.bssid); ret = mwifiex_bss_ioctl_ibss_channel(priv, HostCmd_ACT_GEN_SET, - (u16 *) &channel); + &channel); /* Do specific SSID scanning */ if (mwifiex_request_scan(priv, &bss_info.ssid)) { |