From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
David Spinadel <david.spinadel@intel.com>
Subject: Re: [PATCH] mac80211: support FTM responder configuration/statistics
Date: Thu, 25 Oct 2018 16:12:45 -0700 [thread overview]
Message-ID: <765cbdd596e96b7cf73239a4e04b06a7@codeaurora.org> (raw)
In-Reply-To: <c832f9007e0a844d3335a0cd9996818f49df2311.camel@sipsolutions.net>
>
> I just realized that this is broken in nl80211_channel_switch() and
> ieee80211_set_csa_beacon(), doing a CSA will always disable FTM unless
> it was actually included in the new configuration.
Hi Johannes
oops..Yes, there is a bug in the patch. The code below, I think, must
fix this issue.
Please let me know your comments..
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 51622333d460..70d6de29425b 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2934,19 +2934,20 @@ static int
ieee80211_start_radar_detection(struct wiphy *wiphy,
memcpy(pos, beacon->probe_resp, beacon->probe_resp_len);
pos += beacon->probe_resp_len;
}
- if (beacon->ftm_responder)
+ if (beacon->ftm_responder != -1) {
new_beacon->ftm_responder = beacon->ftm_responder;
- if (beacon->lci) {
- new_beacon->lci_len = beacon->lci_len;
- new_beacon->lci = pos;
- memcpy(pos, beacon->lci, beacon->lci_len);
- pos += beacon->lci_len;
- }
- if (beacon->civicloc) {
- new_beacon->civicloc_len = beacon->civicloc_len;
- new_beacon->civicloc = pos;
- memcpy(pos, beacon->civicloc, beacon->civicloc_len);
- pos += beacon->civicloc_len;
+ if (beacon->lci) {
+ new_beacon->lci_len = beacon->lci_len;
+ new_beacon->lci = pos;
+ memcpy(pos, beacon->lci, beacon->lci_len);
+ pos += beacon->lci_len;
+ }
+ if (beacon->civicloc) {
+ new_beacon->civicloc_len = beacon->civicloc_len;
+ new_beacon->civicloc = pos;
+ memcpy(pos, beacon->civicloc,
beacon->civicloc_len);
+ pos += beacon->civicloc_len;
+ }
}
return new_beacon;
>
> Doing the trivial thing:
>
> memset(¶ms, 0, sizeof(params));
> + params.beacon_after.ftm_responder = -1;
This would not be needed then.
>
> in nl80211_channel_switch() will not help because then mac80211 will
> lose all the extra configuration, and will actually store -1 into its
> enabled value which is really strange.
>
> I'd appreciate if you could take a look at this.
>
> Thanks,
> johannes
next prev parent reply other threads:[~2018-10-25 23:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 3:19 [PATCH] mac80211: support FTM responder configuration/statistics Pradeep Kumar Chitrapu
2018-10-25 10:44 ` Johannes Berg
2018-10-25 23:12 ` Pradeep Kumar Chitrapu [this message]
2018-10-26 7:28 ` Johannes Berg
2018-10-29 18:59 ` Pradeep Kumar Chitrapu
2018-10-29 19:58 ` Johannes Berg
2018-10-29 20:30 ` Pradeep Kumar Chitrapu
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=765cbdd596e96b7cf73239a4e04b06a7@codeaurora.org \
--to=pradeepc@codeaurora.org \
--cc=david.spinadel@intel.com \
--cc=johannes@sipsolutions.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.