Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6671028ybi; Wed, 29 May 2019 11:13:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrJws1c4PCjbN+gH4Km6QClx+vZSRgfRq+H+FbpahEY/GYIGq0XYSegoV9Bmp3eVDdI+Ei X-Received: by 2002:a05:6a00:4a:: with SMTP id i10mr22865602pfk.26.1559153584932; Wed, 29 May 2019 11:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559153584; cv=none; d=google.com; s=arc-20160816; b=ViSej+84SIwdMY6xQ5Cf34Z5Oc+3Z5IBa3bAqnsaFv7LlW4z27h4u8k1qe1LUPJ9eY MMY5LtBa+q756hz6AnQMtIkSZosnUs3h7N0Ca8jrKfGfvmlVtDXEUaJdXJ03WTBck5qe g9YpMq9Rr9XkREmZoUj/gU8Mf/+IJqksOFQLbYH4vLj6nYat2YQTygt8wURgZpaJzuOT tWfVimBAVYKAD+8ZVJmAJHam7fE8oVndF/uGjDq7lDLLxCZ4Hm8hA7/ujUmVyC9ixW5/ CrhXsFIif0FfBS3RzS95C4TMo+io/fX+m+xAUY0hKol8REo0zXmIkgvkd/c7B4TxbzvG ZzTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ViODfuhWnYhc2s3Kjea5F7ZIJ8Ml/xHbr11ntjMzkwg=; b=jI0G6GQzwrlP3qVNcBr4VdFezkxB6L89SEtAtZIgmV9m84gRREQieERge3/XgoMNjc 1sdn4ofOMq1w9PMt+kcrBSWVsduw5hzSYmrxN1w5nSmlSZV4kRnOEqXSDIriTJdfhr9I ZxrlyV53BZDFcOGxn4YGMJYCmHARpUwYLi5cnqpOW2Dh7WZm28qwprFPO2RrQ0BdcRLN U1z4PfLOp9UlWn21qVXwTTeGu2vwwC/HZoOSflIQQp4DNRKFnozi1WOojDPh47y0Z2nC iLwnKExiUk8sKPNGQL02JOc+3Q01nXRfcGV6mAsvTfB5FuhJxQby4agb+3qUqlYbeZLl 5eJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=hfFSlTtH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si382959pgq.563.2019.05.29.11.12.37; Wed, 29 May 2019 11:13:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=hfFSlTtH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727195AbfE2SMS (ORCPT + 99 others); Wed, 29 May 2019 14:12:18 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37172 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727096AbfE2SMK (ORCPT ); Wed, 29 May 2019 14:12:10 -0400 Received: by mail-qt1-f194.google.com with SMTP id y57so3805560qtk.4 for ; Wed, 29 May 2019 11:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ViODfuhWnYhc2s3Kjea5F7ZIJ8Ml/xHbr11ntjMzkwg=; b=hfFSlTtHf223et1zp+zz4Fft/wcc9MB9YlSBND/88dfUQDV8o2hrr8X077o4+DX6ED udJQ5BVvWDtu+f6v77bjmSJs3N8kmDv1b8CcUXlmCK5qpnJ6oq3RdjEBuDIy7ASj/h3h bQotgD7n8ejIKLbCXzWI+Y0OpPIwp2Q9apDj4WQ9pVWRWzrdQiuWvkX4H6x4VVuzdvXn kR1Y5GSMkhLNnC1Nfr9mteFhaFil97va81T/sy/2voPtFc4bvg/5QcHaimDLYorXtqY6 db08Zg5JLqly5ozBatzETFl0Ec7JdDrI4R8CtxgVM06U/oseASC6mHza1fefFRzXZIuw lGlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ViODfuhWnYhc2s3Kjea5F7ZIJ8Ml/xHbr11ntjMzkwg=; b=uJvcLkrQ494DTFp/mnKovJsIVLeqytehNY09yLQhJ6qbfzd3OnFXMZ6PGmZbBQHmTr eLKVZEvUZJ9xsf+TS9b27LqBktwHZa9/LNdTdfsib3ypPKyMqXN+CPhWG+XcGJyblx7W c1GNFngnVfTw0y6lV/NRxWVa+qR9cQyl1xiL073xhfmG1F829l1FNA0iNM3vKgs3zdQt OpdqFDx1XQmTdnxE2JyciclnNh9LoM0+VxRQTLPt2bq3BTznNVl8gntLWWoDh27aoPkW bF8Xv/9shz0sGJUOk2jDnDU6sPAPnZNn9ZQLn+v7LuWfvvqjSAdFD9B3J98kXgvwYk2D JzPw== X-Gm-Message-State: APjAAAUy2CN8L5als1B9GKfH+3OHxnME9czVqwC9ip1McN6Z4U3DhkNv wsrf9Ke4g3ciaq6OpFaveF7Hb3UzvpODeUzw1zMfBA== X-Received: by 2002:ac8:6b06:: with SMTP id w6mr5556447qts.80.1559153529538; Wed, 29 May 2019 11:12:09 -0700 (PDT) MIME-Version: 1.0 References: <20190529050335.72061-1-chiu@endlessm.com> In-Reply-To: <20190529050335.72061-1-chiu@endlessm.com> From: Daniel Drake Date: Wed, 29 May 2019 12:11:58 -0600 Message-ID: Subject: Re: [RFC PATCH v3] rtl8xxxu: Improve TX performance of RTL8723BU on rtl8xxxu driver To: Chris Chiu Cc: Jes Sorensen , Kalle Valo , David Miller , linux-wireless , netdev , Linux Kernel , Linux Upstreaming Team Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Chris, On Tue, May 28, 2019 at 11:03 PM Chris Chiu wrote: > + /* > + * Single virtual interface permitted since the driver supports STATION > + * mode only. I think you can be a bit more explicit by saying e.g.: Only one virtual interface permitted because only STA mode is supported and no iface_combinations are provided. > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index 039e5ca9d2e4..2d612c2df5b2 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -4345,7 +4345,7 @@ void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv, > h2c.b_macid_cfg.ramask3 = (ramask >> 24) & 0xff; > > h2c.ramask.arg = 0x80; > - h2c.b_macid_cfg.data1 = 0; > + h2c.b_macid_cfg.data1 = priv->ratr_index; I think ratr_index can be moved to be a function parameter of the update_rate_mask function. It looks like all callsites already know which value they want to set. Then you don't have to store it in the priv structure. > @@ -5471,6 +5509,10 @@ static int rtl8xxxu_add_interface(struct ieee80211_hw *hw, > > switch (vif->type) { > case NL80211_IFTYPE_STATION: > + if (!priv->vif) > + priv->vif = vif; > + else > + return -EOPNOTSUPP; > rtl8xxxu_stop_tx_beacon(priv); rtl8xxxu_remove_interface should also set priv->vif back to NULL. > @@ -6183,6 +6259,8 @@ static void rtl8xxxu_disconnect(struct usb_interface *interface) > mutex_destroy(&priv->usb_buf_mutex); > mutex_destroy(&priv->h2c_mutex); > > + cancel_delayed_work_sync(&priv->ra_watchdog); Given that the work was started in rtl8xxxu_start, I think it should be cancelled in rtl8xxxu_stop() instead. Daniel