diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 49267ed7cea3..6328b9593877 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -296,6 +296,7 @@ int lbs_cmd_802_11_set_wep(struct lbs_private *priv, uint16_t cmd_action, | |||
296 | 296 | ||
297 | lbs_deb_enter(LBS_DEB_CMD); | 297 | lbs_deb_enter(LBS_DEB_CMD); |
298 | 298 | ||
299 | memset(&cmd, 0, sizeof(cmd)); | ||
299 | cmd.hdr.command = cpu_to_le16(CMD_802_11_SET_WEP); | 300 | cmd.hdr.command = cpu_to_le16(CMD_802_11_SET_WEP); |
300 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 301 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
301 | 302 | ||
@@ -359,7 +360,9 @@ int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, uint16_t cmd_action, | |||
359 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 360 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
360 | cmd.action = cpu_to_le16(cmd_action); | 361 | cmd.action = cpu_to_le16(cmd_action); |
361 | 362 | ||
362 | if (cmd_action == CMD_ACT_SET) { | 363 | if (cmd_action == CMD_ACT_GET) |
364 | cmd.enable = 0; | ||
365 | else { | ||
363 | if (*enable) | 366 | if (*enable) |
364 | cmd.enable = cpu_to_le16(CMD_ENABLE_RSN); | 367 | cmd.enable = cpu_to_le16(CMD_ENABLE_RSN); |
365 | else | 368 | else |
@@ -811,6 +814,7 @@ int lbs_get_channel(struct lbs_private *priv) | |||
811 | 814 | ||
812 | lbs_deb_enter(LBS_DEB_CMD); | 815 | lbs_deb_enter(LBS_DEB_CMD); |
813 | 816 | ||
817 | memset(&cmd, 0, sizeof(cmd)); | ||
814 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 818 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
815 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_GET); | 819 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_GET); |
816 | 820 | ||
@@ -858,6 +862,7 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel) | |||
858 | 862 | ||
859 | lbs_deb_enter(LBS_DEB_CMD); | 863 | lbs_deb_enter(LBS_DEB_CMD); |
860 | 864 | ||
865 | memset(&cmd, 0, sizeof(cmd)); | ||
861 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 866 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
862 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_SET); | 867 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_SET); |
863 | cmd.channel = cpu_to_le16(channel); | 868 | cmd.channel = cpu_to_le16(channel); |