From patchwork Mon Jul 4 11:07:19 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: 9212265 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 87E876086B for ; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78BD2286B2 for ; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D23D286BE; Mon, 4 Jul 2016 11:09:41 +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 E5785286BD for ; Mon, 4 Jul 2016 11:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932442AbcGDLJf (ORCPT ); Mon, 4 Jul 2016 07:09:35 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34017 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753265AbcGDLJc (ORCPT ); Mon, 4 Jul 2016 07:09:32 -0400 Received: by mail-wm0-f68.google.com with SMTP id 187so20855005wmz.1 for ; Mon, 04 Jul 2016 04:09:31 -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=zi5cgbluOV0dF2v76N32d10rj5q8vPBs2yu0jAaIntQ=; b=Q11JuNuxGhw+PpzRJC0tFeYWXluCzm2H0fdputYBvn0HCql/C4Vd0czo5JNPxigpEe woQc678qALvLZ9FiqT+cYKOIaNqRzg+nXkfHm5RxJ4EWZg5uUd5k9kp1sPPJEEn/rt7+ JZNqlfgU6fRKNG5B7Jj4TsIWYIiNDe/qepbtP3EYLm48uRgOUyZyuhad6pMC9fhTkuM4 kc7/vRhSjFS4fDaFoxWCvcf1hJRJqCEwEbw48ukjhlgSDS8nATuUuzD2eLc8CKRQrAlJ YvuPIgk0ElLnhkm2j1uPqnQS8sBxiVMlAnTEIM/4XJ0PsS9foO2Xk53NVViRBZRVu7qH IVEw== 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=zi5cgbluOV0dF2v76N32d10rj5q8vPBs2yu0jAaIntQ=; b=bnDHXrFIJxjGczWaEyi0RixrdMQGTEL79Eu7xTTXBxTfzR1kIuKreVf5YAquvMgDFR 6byvf+uGQ4YD5xvnidHXhnHRfQnViXTZobi5rAJfjlKgj5eFAE4EXA0/XooN+OsiegFo 6cpF7jyAG+2IWDX41DLD0HtaUar5Lt9Yw5yk7PopoFMtzGgOMHYTCk1pBXpZor7RMfet oW3JuI1wuBjid+1yh3TdnY2nICjjtKeV0hGlKA5YBT+LA2joUNcq6O5lKBqGApzU/0bn OTq1DmuyXUWUjKYHLaw49ghvTehUKebxgSpdjvfij0O5hraAGUENLLv/GPpkUjfvarJ4 KhUg== X-Gm-Message-State: ALyK8tJX7XccmE0AtQ6EwI5DSzF0uaVUkQc8kQZsZblPXaA5SvQD7EymuVLn5MrSg4rr+g== X-Received: by 10.194.52.1 with SMTP id p1mr9656174wjo.27.1467630571111; Mon, 04 Jul 2016 04:09:31 -0700 (PDT) Received: from lemagoup-desktop.aldebaran.lan ([195.190.86.18]) by smtp.gmail.com with ESMTPSA id t188sm3098759wma.8.2016.07.04.04.09.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 04:09:30 -0700 (PDT) From: lemagoup@gmail.com X-Google-Original-From: plemagourou@aldebaran.com To: kvalo@qca.qualcomm.com Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org, jmassot@aldebaran.com, Pierre Le Magourou Subject: [PATCH v2 3/3] ath6kl: Unset IFF_LOWER_UP flag on AP mode leave. Date: Mon, 4 Jul 2016 13:07:19 +0200 Message-Id: <20160704110719.7694-4-plemagourou@aldebaran.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160704110719.7694-1-plemagourou@aldebaran.com> References: <20160704110719.7694-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 From: Pierre Le Magourou 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index c9c4d7f..713d230 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2972,6 +2972,7 @@ static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev) ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); clear_bit(CONNECTED, &vif->flags); + netif_carrier_off(vif->ndev); /* Restore ht setting in firmware */ return ath6kl_restore_htcap(vif);