From patchwork Fri Jul 1 16:10:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Le Magourou X-Patchwork-Id: 9210137 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 417AA607D8 for ; Fri, 1 Jul 2016 16:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3361528511 for ; Fri, 1 Jul 2016 16:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 282F028543; Fri, 1 Jul 2016 16:10:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03A1928511 for ; Fri, 1 Jul 2016 16:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750803AbcGAQKm (ORCPT ); Fri, 1 Jul 2016 12:10:42 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35068 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752021AbcGAQKl (ORCPT ); Fri, 1 Jul 2016 12:10:41 -0400 Received: by mail-wm0-f66.google.com with SMTP id a66so6335327wme.2 for ; Fri, 01 Jul 2016 09:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lBw+zm0ca7EK3QFsjCa+OZPX6GL4rdYyI0AXfiBcc/s=; b=p1TsCteNx88JIG6BYZ4sqwoL3esOxWmM2XzSI6NLAFXFuO038bu/vv5sm7U2hvBYkc rm3FsZA7sdNJ4Rad8Fpu8GE8I0hDT9oc9XtyCRcAGC7UrrnIfxAfvxiAwsgzlGLOQcfN NOw0p6tncwe2JKhm297YsAP55A9q8AeDtAZOv1tLhcQejguXaaIq1+ynpC6LnaVqsGF2 94yS45qcRhndGpIDUuh7EABL0tqpSHWu+6Y1FTGvJ0wMae4eGaMf3BvsaqH11r2PXaNp QOQaH3sNVHVgcKGG8AmDAASgJJqGjkRsNoylhAVBHT8ZGjipi1dxDr2yTjjaE7WQEIxs bGzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lBw+zm0ca7EK3QFsjCa+OZPX6GL4rdYyI0AXfiBcc/s=; b=avb23rYh65CPNpDN2chD5TXxwppT1u3mmOXG2LKfkNjwwdtIDHkDV0hvjYP2Hed0MM 0K2fTdUQSRbmGhitGbpXrSzkCNBJFs+eCXPSvgRftzu8Xf8dyw5E/pI3x9OKBGckeWER +0v+SaQMoyX73YSGBkKS8GL8fRQHOWf3UFJyCa1eohTEEwpEpDsGIBIVKv1BBAf8M2l2 EPgQMndXxwE+CVSatzUWImiWQiWvM27ypSIj3wSBeJlunLGoHHS/JukQ5FRvpbWhFDax wZcAEdWoCEkwzrRQmpFlLXjNr/gYF53AOjed1tDmxlzAD0fJddzACzIfLP2p4nPe47oC N72A== X-Gm-Message-State: ALyK8tKwQHleH1nsUM9qnkv4Se95jOuVZlyobXFpcU7oiyU7QJWO6RK4XeVoMErdu2bXIg== X-Received: by 10.28.0.130 with SMTP id 124mr324489wma.23.1467389440135; Fri, 01 Jul 2016 09:10:40 -0700 (PDT) Received: from lemagoup-desktop.aldebaran.lan ([195.190.86.18]) by smtp.gmail.com with ESMTPSA id q203sm409554wmd.24.2016.07.01.09.10.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2016 09:10:39 -0700 (PDT) From: Pierre Le Magourou X-Google-Original-From: Pierre Le Magourou To: kvalo@qca.qualcomm.com Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org, jmassot@aldebaran.com, Pierre Le Magourou Subject: [PATCH 3/3] ath6kl: Unset IFF_LOWER_UP flag on AP mode leave. Date: Fri, 1 Jul 2016 18:10:05 +0200 Message-Id: <20160701161005.30341-4-plemagourou@aldebaran.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160701161005.30341-1-plemagourou@aldebaran.com> References: <20160701161005.30341-1-plemagourou@aldebaran.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When disabling tethering after having enabled it, the ath6kl driver does not set the IFF_LOWER_UP flag to 0 (carrier off) on the wlan interface. The upper layers (eg. connman) are not notified of the tethering mode status change. So, tethering can not be activated anymore. This patch adds a netif_carrier_off() call when stopping AP mode to fix the problem. Signed-off-by: Pierre Le Magourou --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index c9c4d7f..400d7dc 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2971,7 +2971,11 @@ static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev) return -ENOTCONN; ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); + + spin_lock_bh(&vif->if_lock); clear_bit(CONNECTED, &vif->flags); + netif_carrier_off(vif->ndev); + spin_unlock_bh(&vif->if_lock); /* Restore ht setting in firmware */ return ath6kl_restore_htcap(vif);