From patchwork Sat Mar 7 18:45:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giedrius Statkevi?ius X-Patchwork-Id: 5960011 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 8F52BBF440 for ; Sat, 7 Mar 2015 18:46:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B200520251 for ; Sat, 7 Mar 2015 18:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E33982022D for ; Sat, 7 Mar 2015 18:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751746AbbCGSqO (ORCPT ); Sat, 7 Mar 2015 13:46:14 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:35226 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbbCGSqN (ORCPT ); Sat, 7 Mar 2015 13:46:13 -0500 Received: by wesw55 with SMTP id w55so2806415wes.2; Sat, 07 Mar 2015 10:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=OfYzlix7HvkB/G78ZOft3J2fV+0Wvk2TYydqLtQKV30=; b=zSdBWBpfnGpupH0pFMPfgXi5SEI6SgaO09JAzBllRLQgkRaOSxVV9hkZoCM3Tlp2yN BtXOOOxUCklY3+nEmgET+17b1NMVIpudWQhskYfQQnxG8LdI/2/dWUj2h7u0OyDJU9fg wxsv8kzSlys89yeYV8L41kIv8b+iJr3SM8DUe1Htd3/amS+S5DheTh0Tl7RfRKMEupvC 4vfIV07AWjL9tmTmvaSsAgqGK3pHbvtNGoBRbfzidoHJTlIie7KC8Z+RnMQhGVH3lf/R DsPXD2/K7xO5prq6CbN0Xju4rMPks5pN1auTV77zFGmvgCopG1gBDK1QC0r5mIq3Sgu7 Ykzg== X-Received: by 10.180.100.98 with SMTP id ex2mr86650522wib.65.1425753971377; Sat, 07 Mar 2015 10:46:11 -0800 (PST) Received: from localhost.localdomain (78-57-189-147.static.zebra.lt. [78.57.189.147]) by mx.google.com with ESMTPSA id hj10sm20406181wjc.48.2015.03.07.10.46.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 07 Mar 2015 10:46:10 -0800 (PST) From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= To: sgruszka@redhat.com Cc: helmut.schaa@googlemail.com, kvalo@codeaurora.org, linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Subject: [PATCH] rt2x00: use rt2x00queue_flush_queues() instead of implementing the same action Date: Sat, 7 Mar 2015 20:45:50 +0200 Message-Id: <1425753950-15624-1-git-send-email-giedrius.statkevicius@gmail.com> X-Mailer: git-send-email 2.3.1 MIME-Version: 1.0 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Use rt2x00queue_flush_queues() in rt2x00mac_flush() instead of reimplementing the same actions the second time. Also, now it flushes the rx queue aswell which it didn't before and that makes it completely do what it's supposed to do according to struct iee80211_ops: flush() must flush all queues. Signed-off-by: Giedrius Statkevi?ius --- drivers/net/wireless/rt2x00/rt2x00mac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 300876d..5bc48c3 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -756,13 +756,11 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop) { struct rt2x00_dev *rt2x00dev = hw->priv; - struct data_queue *queue; if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) return; - tx_queue_for_each(rt2x00dev, queue) - rt2x00queue_flush_queue(queue, drop); + rt2x00queue_flush_queues(rt2x00dev, drop); } EXPORT_SYMBOL_GPL(rt2x00mac_flush);