linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tamizh chelvam <tamizhr@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCHv2 2/2] mac80211: Implement API to configure station specific rssi threshold
Date: Mon, 08 Apr 2019 13:56:45 +0200	[thread overview]
Message-ID: <648ce8473bf0155f4e306d09daa29d5e3cb4a259.camel@sipsolutions.net> (raw)
In-Reply-To: <1549361181-6237-3-git-send-email-tamizhr@codeaurora.org>


> +++ b/net/mac80211/cfg.c
> @@ -3889,6 +3889,110 @@ static int ieee80211_get_txq_stats(struct wiphy *wiphy,
>  	return drv_abort_pmsr(local, sdata, request);
>  }
>  
> +void sta_mon_rssi_config_free(struct sta_info *sta)
> +{
> +	if (sta->rssi_config) {
> +		kfree_rcu(sta->rssi_config, rcu_head);
> +		sta->rssi_config = NULL;
> +	}
> +}

This looks wrong, you should use RCU_INIT_POINTER()?

And you should do it the other way around I think? I.e.

 old = sta->rssi_config;
 RCU_INIT_POINTER(sta->rssi_config, NULL);
 kfree_rcu(old, rcu_head);


>  /*
>   * The bandwidth threshold below which the per-station CoDel parameters will be
>   * scaled to be more lenient (to prevent starvation of slow stations). This
> @@ -623,6 +650,7 @@ struct sta_info {
>  
>  	struct cfg80211_chan_def tdls_chandef;
>  
> +	struct sta_mon_rssi_config *rssi_config;

Please add documentation (as built bot pointed out shortly after patch
posting!)

johannes


      reply	other threads:[~2019-04-08 11:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 10:06 [PATCHv2 0/2] cfg80211/mac80211: Add support to configure and monitor station's rssi threshold Tamizh chelvam
2019-02-05 10:06 ` [PATCHv2 1/2] cfg80211: Add support to configure station specific RSSI threshold for AP mode Tamizh chelvam
2019-04-08 11:54   ` Johannes Berg
2019-02-05 10:06 ` [PATCHv2 2/2] mac80211: Implement API to configure station specific rssi threshold Tamizh chelvam
2019-04-08 11:56   ` Johannes Berg [this message]

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=648ce8473bf0155f4e306d09daa29d5e3cb4a259.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tamizhr@codeaurora.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).