linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	brcm80211-dev-list@cypress.com
Subject: Re: [PATCH v3] brcmsmac: AP mode: update beacon when TIM changes
Date: Wed, 26 Sep 2018 12:04:28 +0300	[thread overview]
Message-ID: <20180926120428.00e75231@manjaro> (raw)
In-Reply-To: <20180923095425.10292-1-alimjalnasrawy@gmail.com>

Hi,

I suggest here some improvements to this patch but I don't have strong
opinion about them so any feedback is appreciated:

-split it into two: one for storing the current vif into brcms_c_info
and also setting it to NULL on remove_interface to avoid dangling
pointers; and an other one for actually updating the beacon; I believe
them to be separate changes.

On Sun, 23 Sep 2018 12:54:25 +0300
Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> wrote: 
> +static int brcms_ops_beacon_set_tim(struct ieee80211_hw *hw,
> +				 struct ieee80211_sta *sta, bool set)
> +{
> +	struct brcms_info *wl = hw->priv;
> +	struct sk_buff *beacon;
> +	u16 tim_offset = 0;
> +
> +	beacon = ieee80211_beacon_get_tim(hw, wl->wlc->vif,
> +					  &tim_offset, NULL);
> +	if (beacon){
> +		spin_lock_bh(&wl->lock);
> +		brcms_c_set_new_beacon(wl->wlc, beacon, tim_offset,
> +
> wl->wlc->vif->bss_conf.dtim_period);
> +		spin_unlock_bh(&wl->lock);
> +	}
> +
> +	return 0;
> +}
> +

-on brcms_ops_beacon_set_tim, include ieee80211_beacon_get_tim call in
the lock context and also check for vif to be null before passing it as
argument.


  parent reply	other threads:[~2018-09-26  9:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 17:26 [PATCH] brcmsmac: ap mode: update beacon when TIM changes Ali MJ Al-Nasrawy
2018-09-20 12:04 ` Kalle Valo
2018-09-22  9:07 ` Arend van Spriel
2018-09-22 13:17   ` Ali MJ Al-Nasrawy
2018-09-22 13:41 ` [PATCH v2] brcmsmac: AP " Ali MJ Al-Nasrawy
2018-09-23  9:54 ` [PATCH v3] " Ali MJ Al-Nasrawy
2018-09-24  8:15   ` Arend van Spriel
2018-09-24 10:24     ` Ali MJ Al-Nasrawy
2018-09-26  9:04   ` Ali MJ Al-Nasrawy [this message]
2018-10-03 16:21 ` [PATCH v4] " Ali MJ Al-Nasrawy
2018-10-13 17:01   ` Kalle Valo

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=20180926120428.00e75231@manjaro \
    --to=alimjalnasrawy@gmail.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).