From: Johannes Berg <johannes@sipsolutions.net>
To: Benoit Papillault <benoit.papillault@free.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Add HT IE to IBSS beacons and probe responses.
Date: Tue, 04 May 2010 10:26:48 +0200 [thread overview]
Message-ID: <1272961608.3673.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1272955622-6987-3-git-send-email-benoit.papillault@free.fr>
> @@ -118,7 +119,10 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
> *pos++ = basic | (u8) (rate / 5);
> }
>
> - /* Build IBSS probe response */
> + /*
> + * Build IBSS probe response template (also used for beacon template
> + * in ieee80211_beacon_get_tim())
> + */
That change is wrong -- no way beacon code can call into IBSS code.
I think you meant to say "I need to create a common helper function that
I call here and in the beacon code."
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -967,7 +967,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
>
> if (sband->ht_cap.ht_supported) {
> u16 cap = sband->ht_cap.cap;
> - __le16 tmp;
> + struct ieee80211_ht_cap ht_cap;
>
> if (ieee80211_disable_40mhz_24ghz &&
> sband->band == IEEE80211_BAND_2GHZ) {
> @@ -975,18 +975,19 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
> cap &= ~IEEE80211_HT_CAP_SGI_40;
> }
>
> + ht_cap.cap_info = cpu_to_le16(cap);
> + ht_cap.ampdu_params_info = sband->ht_cap.ampdu_factor |
> + (sband->ht_cap.ampdu_density <<
> + IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
> + ht_cap.mcs = sband->ht_cap.mcs;
> + ht_cap.extended_ht_cap_info = cpu_to_le16(0);
> + ht_cap.tx_BF_cap_info = cpu_to_le32(0);
> + ht_cap.antenna_selection_info = 0;
> +
> *pos++ = WLAN_EID_HT_CAPABILITY;
> *pos++ = sizeof(struct ieee80211_ht_cap);
> - memset(pos, 0, sizeof(struct ieee80211_ht_cap));
> - tmp = cpu_to_le16(cap);
> - memcpy(pos, &tmp, sizeof(u16));
> - pos += sizeof(u16);
> - *pos++ = sband->ht_cap.ampdu_factor |
> - (sband->ht_cap.ampdu_density <<
> - IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
> - memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
> - pos += sizeof(sband->ht_cap.mcs);
> - pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
> + memcpy(pos, &ht_cap, sizeof(struct ieee80211_ht_cap));
> + pos += sizeof(struct ieee80211_ht_cap);
And this is an unrelated change that doesn't belong into this patch at
all.
johannes
next prev parent reply other threads:[~2010-05-04 8:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 6:47 [PATCH] cfg80211: Parse channel_type in NL80211_CMD_JOIN_IBSS Benoit Papillault
2010-05-04 6:47 ` [PATCH] cfg80211: Check for channel HT capabilities in an IBSS Benoit Papillault
2010-05-04 6:47 ` [PATCH] mac80211: Add HT IE to IBSS beacons and probe responses Benoit Papillault
2010-05-04 8:26 ` Johannes Berg [this message]
2010-05-05 6:37 ` Benoit Papillault
2010-05-05 11:46 ` Johannes Berg
2010-05-05 21:37 ` Benoit Papillault
2010-05-04 8:23 ` [PATCH] cfg80211: Check for channel HT capabilities in an IBSS Johannes Berg
2010-05-05 6:29 ` Benoit Papillault
2010-05-04 18:14 ` Luis R. Rodriguez
2010-05-05 6:28 ` Benoit Papillault
-- strict thread matches above, loose matches on Subject: below --
2010-05-12 21:07 [PATCH] cfg80211: Parse channel_type in NL80211_CMD_JOIN_IBSS Benoit Papillault
2010-05-12 21:07 ` [PATCH] mac80211: Move part of the MLME code to helper functions Benoit Papillault
2010-05-12 21:07 ` [PATCH] mac80211: Use struct ieee80211_ht_cap to build HT Capabilities IE Benoit Papillault
2010-05-12 21:07 ` [PATCH] mac80211: Add HT IE to IBSS beacons and probe responses Benoit Papillault
2010-05-14 13:56 ` Johannes Berg
2010-01-19 16:42 Benoit Papillault
2010-01-20 10:21 ` Johannes Berg
2010-01-20 14:45 ` X Xiao
2010-01-20 23:03 ` Benoit PAPILLAULT
2010-01-21 9:14 ` Johannes Berg
2010-01-21 17:33 ` Benoit PAPILLAULT
2010-01-21 17:51 ` Johannes Berg
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=1272961608.3673.7.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=benoit.papillault@free.fr \
--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).