From patchwork Tue Nov 19 12:24:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 11251841 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 E2821186D for ; Tue, 19 Nov 2019 12:24:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB98E2186D for ; Tue, 19 Nov 2019 12:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbfKSMYU (ORCPT ); Tue, 19 Nov 2019 07:24:20 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:42590 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728016AbfKSMYT (ORCPT ); Tue, 19 Nov 2019 07:24:19 -0500 Received: from localhost.localdomain (unknown [141.24.207.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id AEF9158007C; Tue, 19 Nov 2019 13:24:18 +0100 (CET) From: Markus Theil To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, Stanislaw Gruszka , Markus Theil Subject: [PATCH v5 0/5] mt76: channel switch support for USB devices Date: Tue, 19 Nov 2019 13:24:05 +0100 Message-Id: <20191119122410.12588-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch series adds channel switch support for mt76 usb interfaces. When testing, I noticed that between 5 or 7 consecutive beacons had the identical channel switch count set. After some debugging I found out, that beacon copying over usb took far too long (up to 700ms for one call of mt76x02u_pre_tbtt_work). Therefore the first four patches speed up beacon copying and the last patch enables channel switch support also for usb interfaces. v5 (thanks to Stanislaw): * ommit empty mt76x2u_channel_switch_beacon * copy txwi into beacon skb v4: * use multiple of 4 len for usb copy again v3: * fixed checkpatch errors v2 (thanks for the comments Lorenzo): * correctly track beacon data mask * clean-ups * make channel switch fn static (reported by kbuild test robot) Markus Theil (5): mt76: mt76x02: ommit beacon slot clearing mt76: mt76x02: split beaconing mt76: mt76x02: remove a copy call for usb speedup mt76: speed up usb bulk copy mt76: mt76x02: add channel switch support for usb interfaces drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- .../wireless/mediatek/mt76/mt76x02_beacon.c | 62 ++++++------------- .../net/wireless/mediatek/mt76/mt76x02_mac.h | 1 + .../net/wireless/mediatek/mt76/mt76x02_mmio.c | 5 ++ .../wireless/mediatek/mt76/mt76x02_usb_core.c | 12 ++++ .../net/wireless/mediatek/mt76/mt76x02_util.c | 2 +- drivers/net/wireless/mediatek/mt76/usb.c | 24 +++++-- 7 files changed, 58 insertions(+), 50 deletions(-)