From 02969d296e91626d9942ea15f8a95fe056025ef1 Mon Sep 17 00:00:00 2001 From: Brian Cavagnolo Date: Tue, 13 May 2008 13:54:59 +0100 Subject: libertas: fix command timeout after firmware failure This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't fire". In fact, the timer was firing; the problem was that the dnld_sent state variable was not being updated after the timer expired, so lbs_execute_next_command was not being called. Signed-off-by: Brian Cavagnolo Signed-off-by: Javier Cardona Signed-off-by: David Woodhouse Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/wireless/libertas/main.c') diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 406f54d40956..bb08f0b86c6b 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -756,6 +756,7 @@ static int lbs_thread(void *data) priv->nr_retries = 0; } else { priv->cur_cmd = NULL; + priv->dnld_sent = DNLD_RES_RECEIVED; lbs_pr_info("requeueing command %x due to timeout (#%d)\n", le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); -- cgit v1.2.3 From 229ce3abb6d6d4598de8ef1ed1e2da8163a9bbc0 Mon Sep 17 00:00:00 2001 From: Masakazu Mokuno Date: Wed, 14 May 2008 14:16:50 +0900 Subject: wireless: Create 'device' symlink in sysfs Some network interfaces of the wireless drivers lack the 'device' symlink in sysfs. This patch lets the drivers create the links. Signed-off-by: Masakazu Mokuno Acked-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/wireless/libertas/main.c') diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index bb08f0b86c6b..e1f066068590 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -1565,6 +1565,7 @@ static int lbs_add_rtap(struct lbs_private *priv) rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; rtap_dev->set_multicast_list = lbs_set_multicast_list; rtap_dev->priv = priv; + SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); ret = register_netdev(rtap_dev); if (ret) { -- cgit v1.2.3 From a01f5450401f081f07a866612121e780e0730cfd Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Wed, 4 Jun 2008 11:10:40 +0200 Subject: libertas: fix sleep confirmation This fixes an issus that made "iwconfig eth1 power on" non-working. When we get a "PS sleep" event, we have to confirm this to the firmware. The confirm happens with a command, but this command is special: the firmware won't send us a response. if_cs_host_to_card() is setting priv->dnld_sent anyway, so this variable stayed at DNLD_DATA_SENT and was never cleared back. Now I put the special knowledge that the CMD_802_11_PS_MODE with CMD_SUBCMD_SLEEP_CONFIRMED doesn't need to need a response by directly clearing the dnld_sent state in lbs_send_confirmsleep(). Signed-off-by: Holger Schurig Acked-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wireless/libertas/main.c') diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index e1f066068590..acfc4bfcc262 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -732,8 +732,8 @@ static int lbs_thread(void *data) lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n", priv->currenttxskb, priv->dnld_sent); - spin_lock_irq(&priv->driver_lock); /* Process any pending command response */ + spin_lock_irq(&priv->driver_lock); resp_idx = priv->resp_idx; if (priv->resp_len[resp_idx]) { spin_unlock_irq(&priv->driver_lock); -- cgit v1.2.3