aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-09-11 11:38:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 15:32:02 -0400
commit871fc09f1c8a9c0652afa7c673ae401fdb3f4aeb (patch)
tree2af7fd1880401899d2087cd72884ec2e2d68f1d1 /drivers/net/wireless/libertas/cmd.c
parent46025f550401c830be9773e14d62b7cab8856216 (diff)
libertas: set mac control synchronously during init
CMD_MAC_CONTROL is currently sent async to the firmware, and is sent from the lbs_setup_firmware() path during device init. This means that device init can complete with commands pending, and the if_sdio driver will sometimes power down the device (after init) with this command still pending. This was causing an occasional spurious command timeout after init, leading to a device reset. Fix this by making CMD_MAC_CONTROL synchronous when called from the lbs_setup_firmware() path. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-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.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 26e68326710b..aaa297315c47 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1159,6 +1159,22 @@ void lbs_set_mac_control(struct lbs_private *priv)
1159 lbs_deb_leave(LBS_DEB_CMD); 1159 lbs_deb_leave(LBS_DEB_CMD);
1160} 1160}
1161 1161
1162int lbs_set_mac_control_sync(struct lbs_private *priv)
1163{
1164 struct cmd_ds_mac_control cmd;
1165 int ret = 0;
1166
1167 lbs_deb_enter(LBS_DEB_CMD);
1168
1169 cmd.hdr.size = cpu_to_le16(sizeof(cmd));
1170 cmd.action = cpu_to_le16(priv->mac_control);
1171 cmd.reserved = 0;
1172 ret = lbs_cmd_with_response(priv, CMD_MAC_CONTROL, &cmd);
1173
1174 lbs_deb_leave(LBS_DEB_CMD);
1175 return ret;
1176}
1177
1162/** 1178/**
1163 * lbs_allocate_cmd_buffer - allocates the command buffer and links 1179 * lbs_allocate_cmd_buffer - allocates the command buffer and links
1164 * it to command free queue 1180 * it to command free queue