Search Linux Wireless

[PATCH 18/35] Only cancel correct timeouts for Auth and Assoc replies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't cancel all delayed works indiscriminately.  In case of
at76_rx_mgmt_auth(), cancel the timeout regardless of the status of the
reply, as long as the reply is for us.

Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---

 drivers/net/wireless/at76_usb.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)


diff --git a/drivers/net/wireless/at76_usb.c b/drivers/net/wireless/at76_usb.c
index bda7632..2fc6084 100644
--- a/drivers/net/wireless/at76_usb.c
+++ b/drivers/net/wireless/at76_usb.c
@@ -4274,6 +4274,7 @@ static void at76_rx_mgmt_assoc(struct at76_priv *priv,
 
 	BUG_ON(!priv->curr_bss);
 
+	cancel_delayed_work(&priv->dwork_assoc);
 	if (status == WLAN_STATUS_SUCCESS) {
 		struct bss_info *ptr = priv->curr_bss;
 		priv->assoc_id = assoc_id & 0x3fff;
@@ -4287,10 +4288,6 @@ static void at76_rx_mgmt_assoc(struct at76_priv *priv,
 		at76_set_mac_state(priv, MAC_JOINING);
 		schedule_work(&priv->work_join);
 	}
-	cancel_delayed_work(&priv->dwork_get_scan);
-	cancel_delayed_work(&priv->dwork_beacon);
-	cancel_delayed_work(&priv->dwork_auth);
-	cancel_delayed_work(&priv->dwork_assoc);
 }
 
 /* Process disassociation request from the AP */
@@ -4376,11 +4373,8 @@ static void at76_rx_mgmt_auth(struct at76_priv *priv,
 	    || compare_ether_addr(priv->netdev->dev_addr, mgmt->addr1))
 		return;
 
+	cancel_delayed_work(&priv->dwork_auth);
 	if (status != WLAN_STATUS_SUCCESS) {
-		cancel_delayed_work(&priv->dwork_get_scan);
-		cancel_delayed_work(&priv->dwork_beacon);
-		cancel_delayed_work(&priv->dwork_auth);
-		cancel_delayed_work(&priv->dwork_assoc);
 		/* try to join next bss */
 		at76_set_mac_state(priv, MAC_JOINING);
 		schedule_work(&priv->work_join);
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux