diff options
author | Brian Cavagnolo <brian@cozybit.com> | 2008-07-21 14:02:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:49 -0400 |
commit | 1556c0f22df77800d2e99342ce354a4ce94c5a0f (patch) | |
tree | 76c8af4251f78f1afc4504135c9d355ca15d4127 /drivers/net/wireless/libertas/cmd.c | |
parent | 38e3b0d86eaa0bf90a74677b6d6c442ec66daa0c (diff) |
libertas: support boot commands to write persistent firmware and bootloader
Add locking and non-locking versions of if_usb_prog_firmware to support
programming firmware after and before driver bring-up respectively. Add more
suitable error codes for firmware programming process. Add capability checks
for persistent features before attempting to use them.
Based on patches from Brajesh Dave and Priyank Singh.
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
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 | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 75427e61898d..af5fd709887f 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1033,9 +1033,9 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, | |||
1033 | return ret; | 1033 | return ret; |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | int lbs_mesh_config_send(struct lbs_private *priv, | 1036 | static int __lbs_mesh_config_send(struct lbs_private *priv, |
1037 | struct cmd_ds_mesh_config *cmd, | 1037 | struct cmd_ds_mesh_config *cmd, |
1038 | uint16_t action, uint16_t type) | 1038 | uint16_t action, uint16_t type) |
1039 | { | 1039 | { |
1040 | int ret; | 1040 | int ret; |
1041 | 1041 | ||
@@ -1054,6 +1054,19 @@ int lbs_mesh_config_send(struct lbs_private *priv, | |||
1054 | return ret; | 1054 | return ret; |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | int lbs_mesh_config_send(struct lbs_private *priv, | ||
1058 | struct cmd_ds_mesh_config *cmd, | ||
1059 | uint16_t action, uint16_t type) | ||
1060 | { | ||
1061 | int ret; | ||
1062 | |||
1063 | if (!(priv->fwcapinfo & FW_CAPINFO_PERSISTENT_CONFIG)) | ||
1064 | return -EOPNOTSUPP; | ||
1065 | |||
1066 | ret = __lbs_mesh_config_send(priv, cmd, action, type); | ||
1067 | return ret; | ||
1068 | } | ||
1069 | |||
1057 | /* This function is the CMD_MESH_CONFIG legacy function. It only handles the | 1070 | /* This function is the CMD_MESH_CONFIG legacy function. It only handles the |
1058 | * START and STOP actions. The extended actions supported by CMD_MESH_CONFIG | 1071 | * START and STOP actions. The extended actions supported by CMD_MESH_CONFIG |
1059 | * are all handled by preparing a struct cmd_ds_mesh_config and passing it to | 1072 | * are all handled by preparing a struct cmd_ds_mesh_config and passing it to |
@@ -1095,7 +1108,7 @@ int lbs_mesh_config(struct lbs_private *priv, uint16_t action, uint16_t chan) | |||
1095 | action, priv->mesh_tlv, chan, | 1108 | action, priv->mesh_tlv, chan, |
1096 | escape_essid(priv->mesh_ssid, priv->mesh_ssid_len)); | 1109 | escape_essid(priv->mesh_ssid, priv->mesh_ssid_len)); |
1097 | 1110 | ||
1098 | return lbs_mesh_config_send(priv, &cmd, action, priv->mesh_tlv); | 1111 | return __lbs_mesh_config_send(priv, &cmd, action, priv->mesh_tlv); |
1099 | } | 1112 | } |
1100 | 1113 | ||
1101 | static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, | 1114 | static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, |