aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 9ccc9524153b..a3a17caae439 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -271,15 +271,20 @@ static ssize_t libertas_autostart_enabled_set(struct device * dev,
271{ 271{
272 struct cmd_ds_mesh_access mesh_access; 272 struct cmd_ds_mesh_access mesh_access;
273 uint32_t datum; 273 uint32_t datum;
274 wlan_private * priv = (to_net_dev(dev))->priv;
275 int ret;
274 276
275 memset(&mesh_access, 0, sizeof(mesh_access)); 277 memset(&mesh_access, 0, sizeof(mesh_access));
276 sscanf(buf, "%d", &datum); 278 sscanf(buf, "%d", &datum);
277 mesh_access.data[0] = cpu_to_le32(datum); 279 mesh_access.data[0] = cpu_to_le32(datum);
278 280
279 libertas_prepare_and_send_command((to_net_dev(dev))->priv, 281 ret = libertas_prepare_and_send_command(priv,
280 CMD_MESH_ACCESS, 282 CMD_MESH_ACCESS,
281 CMD_ACT_MESH_SET_AUTOSTART_ENABLED, 283 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
282 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 284 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
285 if (ret == 0)
286 priv->mesh_autostart_enabled = datum ? 1 : 0;
287
283 return strlen(buf); 288 return strlen(buf);
284} 289}
285 290
@@ -853,6 +858,7 @@ static int wlan_setup_station_hw(wlan_private * priv)
853{ 858{
854 int ret = -1; 859 int ret = -1;
855 wlan_adapter *adapter = priv->adapter; 860 wlan_adapter *adapter = priv->adapter;
861 struct cmd_ds_mesh_access mesh_access;
856 862
857 lbs_deb_enter(LBS_DEB_FW); 863 lbs_deb_enter(LBS_DEB_FW);
858 864
@@ -889,6 +895,21 @@ static int wlan_setup_station_hw(wlan_private * priv)
889 goto done; 895 goto done;
890 } 896 }
891 897
898 /* Disable mesh autostart */
899 if (priv->mesh_dev) {
900 memset(&mesh_access, 0, sizeof(mesh_access));
901 mesh_access.data[0] = cpu_to_le32(0);
902 ret = libertas_prepare_and_send_command(priv,
903 CMD_MESH_ACCESS,
904 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
905 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
906 if (ret) {
907 ret = -1;
908 goto done;
909 }
910 priv->mesh_autostart_enabled = 0;
911 }
912
892 ret = 0; 913 ret = 0;
893done: 914done:
894 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); 915 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret);