linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 6/7] mt76: beaconing fixes for USB
Date: Thu, 24 Jan 2019 23:50:49 +0100	[thread overview]
Message-ID: <20190124225048.GD2873@localhost.localdomain> (raw)
In-Reply-To: <1548344649-10404-7-git-send-email-sgruszka@redhat.com>

On Jan 24, Stanislaw Gruszka wrote:
> Configure beaconing on USB devices without PS buffering support.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mac80211.c     |  3 ++-
>  drivers/net/wireless/mediatek/mt76/mt76x02_mac.c  | 24 ++++++++++++++++++++---
>  drivers/net/wireless/mediatek/mt76/mt76x02_mac.h  |  2 +-
>  drivers/net/wireless/mediatek/mt76/mt76x02_util.c |  8 +++++---
>  4 files changed, 29 insertions(+), 8 deletions(-)
> 

[...]

> +
> +void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, u8 vif_idx,
> +			           bool val, struct sk_buff *skb)
> +{
> +	if (mt76_is_mmio(dev))
> +		tasklet_disable(&dev->pre_tbtt_tasklet);
> +
> +	__mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb);
> +
> +	if (mt76_is_mmio(dev))
> +		tasklet_enable(&dev->pre_tbtt_tasklet);
> +}
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
> index 76e564b8f5da..a15fc71e3d55 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
> @@ -205,7 +205,7 @@ void mt76x02_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
>  int mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 vif_idx,
>  			   struct sk_buff *skb);
>  void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, u8 vif_idx,
> -				   bool val);
> +				   bool val, struct sk_buff *skb);
>  
>  void mt76x02_edcca_init(struct mt76x02_dev *dev);
>  #endif
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> index 741ecd723b8e..8732e07c01ad 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> @@ -687,6 +687,7 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
>  {
>  	struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
>  	struct mt76x02_dev *dev = hw->priv;
> +	struct sk_buff *skb;
>  
>  	mutex_lock(&dev->mt76.mutex);
>  
> @@ -694,10 +695,11 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
>  		mt76x02_mac_set_bssid(dev, mvif->idx, info->bssid);
>  
>  	if (changed & BSS_CHANGED_BEACON_ENABLED) {
> -		tasklet_disable(&dev->pre_tbtt_tasklet);
> +		skb = NULL;
> +		if (info->enable_beacon && mt76_is_usb(dev))
> +			skb = ieee80211_beacon_get(hw, vif);

What about moving this in mt76x02_mac_set_beacon_enable(), I guess the code
will be more readable. Moreover you can move skb pointer declaration in
if (changed & BSS_CHANGED_BEACON_ENABLED) block

Regards,
Lorenzo

>  		mt76x02_mac_set_beacon_enable(dev, mvif->idx,
> -					      info->enable_beacon);
> -		tasklet_enable(&dev->pre_tbtt_tasklet);
> +					      info->enable_beacon, skb);
>  	}
>  
>  	if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT)
> -- 
> 1.9.3
> 

  reply	other threads:[~2019-01-24 22:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 15:44 [PATCH 0/7] mt76x02: Beacon support for USB Stanislaw Gruszka
2019-01-24 15:44 ` [PATCH 1/7] mt76x02: use mask for vifs Stanislaw Gruszka
2019-01-24 16:12   ` Lorenzo Bianconi
2019-01-24 16:20     ` Stanislaw Gruszka
2019-01-24 16:35       ` Lorenzo Bianconi
2019-01-24 22:20         ` Lorenzo Bianconi
2019-01-25  8:25           ` Stanislaw Gruszka
2019-01-25  9:02             ` Lorenzo Bianconi
2019-01-25  9:06               ` Stanislaw Gruszka
2019-01-25  9:47               ` Stanislaw Gruszka
2019-01-25 10:25                 ` Lorenzo Bianconi
2019-01-25 12:41                   ` Stanislaw Gruszka
2019-01-28  8:41                     ` Felix Fietkau
2019-01-28  9:02                       ` Stanislaw Gruszka
2019-01-28 11:16                         ` Stanislaw Gruszka
2019-01-28 12:29                           ` Felix Fietkau
2019-01-28 13:04                             ` Stanislaw Gruszka
2019-01-24 15:44 ` [PATCH 2/7] mt76x02: use commmon add interface for mt76x2u Stanislaw Gruszka
2019-01-24 15:44 ` [PATCH 3/7] mt76x02: initialize mutli bss mode when set up address Stanislaw Gruszka
2019-01-24 15:44 ` [PATCH 4/7] mt76x02: minor beaconing init changes Stanislaw Gruszka
2019-01-24 22:32   ` Lorenzo Bianconi
2019-01-24 15:44 ` [PATCH 5/7] mt76x02: init beacon config for mt76x2u Stanislaw Gruszka
2019-01-24 22:33   ` Lorenzo Bianconi
2019-01-24 15:44 ` [PATCH 6/7] mt76: beaconing fixes for USB Stanislaw Gruszka
2019-01-24 22:50   ` Lorenzo Bianconi [this message]
2019-01-28  8:30     ` Stanislaw Gruszka
2019-01-24 15:44 ` [PATCH 7/7] mt76x02: enable support for IBSS, AP and MESH Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190124225048.GD2873@localhost.localdomain \
    --to=lorenzo.bianconi@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).