aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-04-09 04:23:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 15:59:56 -0400
commit8d0c7fad35538e02dff6fdb2d67943ae582819b3 (patch)
tree90e80d88432e5f717867c380b4503f4d1d4f401d /drivers
parent7919b89c8276d657976d4d4d6b7cb58ea1aa08c3 (diff)
libertas: un-garbage various command structs
Some command structs contain reserved or unused fields, which the driver send uninitialized down to the card. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/cmd.c7
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);