[PATCH] libertas: deauthenticate from AP in channel switch
authorLuis Carlos Cobo Rus <luisca@cozybit.com>
Wed, 30 May 2007 16:16:13 +0000 (12:16 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Jun 2007 18:02:32 +0000 (14:02 -0400)
This avoids channel mismatch between driver and firmware in case we change
channel while associated to an AP.

Signed-off-by: Luis Carlos Cobo Rus <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/assoc.c

index 06a90b4..f67efa0 100644 (file)
@@ -411,6 +411,11 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
                return 1;
        }
 
+       if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) {
+               lbs_deb_assoc("Deauthenticating due to channel switch.\n");
+               return 1;
+       }
+
        /* FIXME: deal with 'auto' mode somehow */
        if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) {
                if (assoc_req->mode != IW_MODE_INFRA)