From patchwork Sun Jan 25 08:52:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Kondratiev X-Patchwork-Id: 5700781 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A654C058D for ; Sun, 25 Jan 2015 08:53:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20DE020155 for ; Sun, 25 Jan 2015 08:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A275F201FB for ; Sun, 25 Jan 2015 08:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbbAYIxd (ORCPT ); Sun, 25 Jan 2015 03:53:33 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:31610 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606AbbAYIx2 (ORCPT ); Sun, 25 Jan 2015 03:53:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1422176008; x=1453712008; h=from:cc:to:subject:date:message-id:in-reply-to: references; bh=IFm9j6ds80BsE6D1n4kWE+YK1GwnCsU9KurZA3cFB6Y=; b=co5VLQjlDyjPM5onx1ob+tHvSYIV9mN5OWVB4jYOSOs7r5p68QwnkSTH fYN70UaZDdr8diy/bVvHAZDcII5m7+xYOB0mitcPCkn8BNd2DDvVEog+z 7N1k0LkE41DKRwHWqPX7+HIHpirYpUQi7DGD8aLhYdC9zeFjaVyQ7yOFO w=; X-IronPort-AV: E=McAfee;i="5600,1067,7691"; a="191850649" Received: from ironmsg02-r.qualcomm.com ([172.30.46.16]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Jan 2015 00:53:28 -0800 From: Vladimir Kondratiev Cc: Dedy Lansky , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Vladimir Kondratiev X-IronPort-AV: E=Sophos;i="5.09,463,1418112000"; d="scan'208";a="431455908" Received: from lx-wigig-72.mea.qualcomm.com ([10.18.176.26]) by ironmsg02-R.qualcomm.com with ESMTP; 25 Jan 2015 00:53:28 -0800 To: Kalle Valo Subject: [PATCH 03/10] wil6210: ignore firmware failure to gracefully stop AP Date: Sun, 25 Jan 2015 10:52:44 +0200 Message-Id: <1422175971-8075-4-git-send-email-qca_vkondrat@qca.qualcomm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422175971-8075-1-git-send-email-qca_vkondrat@qca.qualcomm.com> References: <1422175971-8075-1-git-send-email-qca_vkondrat@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dedy Lansky upon cfg80211_stop_ap, a graceful AP shutdown is requested from firmware followed by firmware reset. In case graceful request failed, error was returned to cfg80211. The change is to return success in this scenario, because firmware reset will anyhow shutdown the AP. Signed-off-by: Dedy Lansky Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 553aa2e..6b7664d 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 Qualcomm Atheros, Inc. + * Copyright (c) 2012-2015 Qualcomm Atheros, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -773,7 +773,6 @@ out: static int wil_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) { - int rc, rc1; struct wil6210_priv *wil = wiphy_to_wil(wiphy); wil_dbg_misc(wil, "%s()\n", __func__); @@ -783,14 +782,17 @@ static int wil_cfg80211_stop_ap(struct wiphy *wiphy, mutex_lock(&wil->mutex); - rc = wmi_pcp_stop(wil); + wmi_pcp_stop(wil); __wil_down(wil); - rc1 = __wil_up(wil); + __wil_up(wil); mutex_unlock(&wil->mutex); - return min(rc, rc1); + /* some functions above might fail (e.g. __wil_up). Nevertheless, we + * return success because AP has stopped + */ + return 0; } static int wil_cfg80211_del_station(struct wiphy *wiphy,