diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2008-03-26 04:58:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-01 17:13:16 -0400 |
commit | 2af9f039a17c0acd9e5b21d10058688687bad86d (patch) | |
tree | 473a0dd553b60d1886cfbb40b40a570d78c3d839 /drivers/net/wireless/libertas/cmd.c | |
parent | 717ddc0ebdd00c233fcb1ae9a243e69f301cde24 (diff) |
libertas: convert CMD_802_11_MAC_ADDRESS to a direct command
* directly call lbs_cmd_with_response()
* only overwrite priv->current_addr once the firmware call succeeded
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/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 44b918a6c219..d396a5f06666 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -953,29 +953,6 @@ static int lbs_cmd_reg_access(struct cmd_ds_command *cmdptr, | |||
953 | return 0; | 953 | return 0; |
954 | } | 954 | } |
955 | 955 | ||
956 | static int lbs_cmd_802_11_mac_address(struct lbs_private *priv, | ||
957 | struct cmd_ds_command *cmd, | ||
958 | u16 cmd_action) | ||
959 | { | ||
960 | |||
961 | lbs_deb_enter(LBS_DEB_CMD); | ||
962 | cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); | ||
963 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_mac_address) + | ||
964 | S_DS_GEN); | ||
965 | cmd->result = 0; | ||
966 | |||
967 | cmd->params.macadd.action = cpu_to_le16(cmd_action); | ||
968 | |||
969 | if (cmd_action == CMD_ACT_SET) { | ||
970 | memcpy(cmd->params.macadd.macadd, | ||
971 | priv->current_addr, ETH_ALEN); | ||
972 | lbs_deb_hex(LBS_DEB_CMD, "SET_CMD: MAC addr", priv->current_addr, 6); | ||
973 | } | ||
974 | |||
975 | lbs_deb_leave(LBS_DEB_CMD); | ||
976 | return 0; | ||
977 | } | ||
978 | |||
979 | static int lbs_cmd_802_11_eeprom_access(struct cmd_ds_command *cmd, | 956 | static int lbs_cmd_802_11_eeprom_access(struct cmd_ds_command *cmd, |
980 | void *pdata_buf) | 957 | void *pdata_buf) |
981 | { | 958 | { |
@@ -1435,10 +1412,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1435 | ret = lbs_cmd_80211_ad_hoc_stop(cmdptr); | 1412 | ret = lbs_cmd_80211_ad_hoc_stop(cmdptr); |
1436 | break; | 1413 | break; |
1437 | 1414 | ||
1438 | case CMD_802_11_MAC_ADDRESS: | ||
1439 | ret = lbs_cmd_802_11_mac_address(priv, cmdptr, cmd_action); | ||
1440 | break; | ||
1441 | |||
1442 | case CMD_802_11_EEPROM_ACCESS: | 1415 | case CMD_802_11_EEPROM_ACCESS: |
1443 | ret = lbs_cmd_802_11_eeprom_access(cmdptr, pdata_buf); | 1416 | ret = lbs_cmd_802_11_eeprom_access(cmdptr, pdata_buf); |
1444 | break; | 1417 | break; |