From patchwork Tue Oct 27 22:54:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 11862087 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B3156A2 for ; Tue, 27 Oct 2020 22:56:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00BB32076D for ; Tue, 27 Oct 2020 22:56:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bMHlhllu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="F+okaaPl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1832556AbgJ0W4B (ORCPT ); Tue, 27 Oct 2020 18:56:01 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50078 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1832543AbgJ0Wz6 (ORCPT ); Tue, 27 Oct 2020 18:55:58 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603839355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ecxJzZtRribDKzKIiwElpzea91WJXQDRkjrSNkyvp44=; b=bMHlhlluCx8UyhuU9NTXFEBFBDPzmifO9O7nsSBrqtLd+vr4IXh9AiD/7K0zGUjEiHeczw 11cc4w8mxNiAF8ibzLraKYfn9RPhxYf4MtwYhVbwMuDsFMoxLHA/DSgHVzUj4DyGyD3vPW E2tipXy7jDjfZE0npmPtMrXPiWTv01kHZhkmvY8bq7w3Z8ZeikEww4mvYZCUOYPqraVy1S gwdqr3G3BB9h9qxhCr8fJdTDRs1LYzp2vzKChp8W4yBFl2siku3YD3x2aLGnerVg7aNO60 y45jk/Re/uruKE8kGCYWFbVhlc7ZjQL3Dk63LQoOdWHzf+Ni6Jkp2iVd0fOseQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603839355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ecxJzZtRribDKzKIiwElpzea91WJXQDRkjrSNkyvp44=; b=F+okaaPlS1iKiuSjJd/s7xvfHx4naujCeq35xuq8TIJfx0CUcb4GntS5xPg3EjWk1mcjb2 f+BuFsDmP7NUaeAg== To: netdev@vger.kernel.org Cc: Aymen Sghaier , Daniel Drake , "David S. Miller" , Herbert Xu , =?utf-8?q?Horia_Geant=C4=83?= , Jakub Kicinski , Jon Mason , Jouni Malinen , Kalle Valo , Leon Romanovsky , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-rdma@vger.kernel.org, linux-wireless@vger.kernel.org, Li Yang , Madalin Bucur , Ping-Ke Shih , Rain River , Saeed Mahameed , Samuel Chessman , Ulrich Kunitz , Zhu Yanjun , Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH net-next 09/15] net: hostap: Remove in_atomic() check. Date: Tue, 27 Oct 2020 23:54:48 +0100 Message-Id: <20201027225454.3492351-10-bigeasy@linutronix.de> In-Reply-To: <20201027225454.3492351-1-bigeasy@linutronix.de> References: <20201027225454.3492351-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org hostap_get_wireless_stats() is the iw_handler_if::get_wireless_stats() callback of this driver. This callback was not allowed to sleep until commit a160ee69c6a46 ("wext: let get_wireless_stats() sleep") in v2.6.32. Remove the therefore pointless in_atomic() check. Signed-off-by: Sebastian Andrzej Siewior Cc: Jouni Malinen Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org --- drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c index 514c7b01dbf6f..49766b285230c 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c @@ -44,19 +44,8 @@ static struct iw_statistics *hostap_get_wireless_stats(struct net_device *dev) if (local->iw_mode != IW_MODE_MASTER && local->iw_mode != IW_MODE_REPEAT) { - int update = 1; -#ifdef in_atomic - /* RID reading might sleep and it must not be called in - * interrupt context or while atomic. However, this - * function seems to be called while atomic (at least in Linux - * 2.5.59). Update signal quality values only if in suitable - * context. Otherwise, previous values read from tick timer - * will be used. */ - if (in_atomic()) - update = 0; -#endif /* in_atomic */ - if (update && prism2_update_comms_qual(dev) == 0) + if (prism2_update_comms_qual(dev) == 0) wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;