* [PATCH v2] mac80211: VHT (11ac) Association
@ 2012-07-24 3:33 Mahesh Palivela
2012-07-24 3:37 ` Julian Calaby
2012-07-24 14:10 ` Johannes Berg
0 siblings, 2 replies; 6+ messages in thread
From: Mahesh Palivela @ 2012-07-24 3:33 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, johannes
VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/mlme.c | 40 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index bb61f77..3e2f03b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -359,6 +359,7 @@ enum ieee80211_sta_flags {
IEEE80211_STA_NULLFUNC_ACKED = BIT(8),
IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9),
IEEE80211_STA_DISABLE_40MHZ = BIT(10),
+ IEEE80211_STA_DISABLE_VHT = BIT(11),
};
struct ieee80211_mgd_auth_data {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7c0613c..3d76c42 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -326,6 +326,26 @@ static void ieee80211_add_ht_ie(struct ieee80211_sub_if_data *sdata,
ieee80211_ie_build_ht_cap(pos, &ht_cap, cap);
}
+static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb,
+ struct ieee80211_supported_band *sband)
+{
+ u8 *pos;
+ u32 cap;
+ struct ieee80211_sta_vht_cap vht_cap;
+
+ BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap));
+
+ memcpy(&vht_cap, &sband->vht_cap, sizeof(vht_cap));
+
+ /* determine capability flags */
+ cap = vht_cap.cap;
+
+ /* reserve and fill IE */
+ pos = skb_put(skb, sizeof(struct ieee80211_vht_capabilities) + 2);
+ ieee80211_ie_build_vht_cap(pos, &vht_cap, cap);
+}
+
static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_local *local = sdata->local;
@@ -371,6 +391,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
4 + /* power capability */
2 + 2 * sband->n_channels + /* supported channels */
2 + sizeof(struct ieee80211_ht_cap) + /* HT */
+ 2 + sizeof(struct ieee80211_vht_capabilities) + /* VHT */
assoc_data->ie_len + /* extra IEs */
9, /* WMM */
GFP_KERNEL);
@@ -503,6 +524,9 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
ieee80211_add_ht_ie(sdata, skb, assoc_data->ap_ht_param,
sband, local->oper_channel, ifmgd->ap_smps);
+ if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT))
+ ieee80211_add_vht_ie(sdata, skb, sband);
+
/* if present, add any custom non-vendor IEs that go after HT */
if (assoc_data->ie_len && assoc_data->ie) {
noffset = ieee80211_ie_split_vendor(assoc_data->ie,
@@ -3304,6 +3328,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ ifmgd->flags &= ~IEEE80211_STA_DISABLE_VHT;
ifmgd->beacon_crc_valid = false;
@@ -3319,13 +3344,16 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
netdev_info(sdata->dev,
- "disabling HT due to WEP/TKIP use\n");
+ "disabling HT/VHT due to WEP/TKIP use\n");
}
}
- if (req->flags & ASSOC_REQ_DISABLE_HT)
+ if (req->flags & ASSOC_REQ_DISABLE_HT) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
+ }
/* Also disable HT if we don't support it or the AP doesn't use WMM */
sband = local->hw.wiphy->bands[req->bss->channel->band];
@@ -3336,6 +3364,14 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
"disabling HT as WMM/QoS is not supported\n");
}
+ /* disable VHT if we don't support it or the AP doesn't use WMM */
+ if (!sband->vht_cap.vht_supported ||
+ local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used) {
+ ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
+ netdev_info(sdata->dev,
+ "disabling VHT as WMM/QoS is not supported\n");
+ }
+
memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa));
memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask,
sizeof(ifmgd->ht_capa_mask));
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: VHT (11ac) Association
2012-07-24 3:33 [PATCH v2] mac80211: VHT (11ac) Association Mahesh Palivela
@ 2012-07-24 3:37 ` Julian Calaby
2012-07-24 3:44 ` Mahesh Palivela
2012-07-24 14:10 ` Johannes Berg
1 sibling, 1 reply; 6+ messages in thread
From: Julian Calaby @ 2012-07-24 3:37 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville, linux-wireless, johannes
Hi Mahesh,
On Tue, Jul 24, 2012 at 1:33 PM, Mahesh Palivela <maheshp@posedge.com> wrote:
> VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
The references to Johannes' review comments and version two shouldn't
go in the changelog, they should go below the "---" line after the
signoffs and stuff.
> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
You can't just add a "Reviewed-by" line unless the person referenced
has explicitly said you can (or provided it themselves)
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2] mac80211: VHT (11ac) Association
2012-07-24 3:37 ` Julian Calaby
@ 2012-07-24 3:44 ` Mahesh Palivela
0 siblings, 0 replies; 6+ messages in thread
From: Mahesh Palivela @ 2012-07-24 3:44 UTC (permalink / raw)
To: Julian Calaby; +Cc: linville, linux-wireless, johannes
________________________________________
From: Julian Calaby [julian.calaby@gmail.com]
Sent: Tuesday, July 24, 2012 9:07 AM
To: Mahesh Palivela
Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org; johannes@sipsolutions.net
Subject: Re: [PATCH v2] mac80211: VHT (11ac) Association
Hi Mahesh,
On Tue, Jul 24, 2012 at 1:33 PM, Mahesh Palivela <maheshp@posedge.com> wrote:
> VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
The references to Johannes' review comments and version two shouldn't
go in the changelog, they should go below the "---" line after the
signoffs and stuff.
> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
You can't just add a "Reviewed-by" line unless the person referenced
has explicitly said you can (or provided it themselves)
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
Thanks for the corrections Julian. I will not repeat next time.
Thanks,
Mahesh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: VHT (11ac) Association
2012-07-24 3:33 [PATCH v2] mac80211: VHT (11ac) Association Mahesh Palivela
2012-07-24 3:37 ` Julian Calaby
@ 2012-07-24 14:10 ` Johannes Berg
2012-07-24 14:32 ` Mahesh Palivela
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-24 14:10 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville, linux-wireless
On Tue, 2012-07-24 at 03:33 +0000, Mahesh Palivela wrote:
> VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
>
> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Applied, but I fixed up the commit message. Please review & make a
better one next time :)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: VHT (11ac) Association
2012-07-24 14:10 ` Johannes Berg
@ 2012-07-24 14:32 ` Mahesh Palivela
2012-07-24 14:34 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Mahesh Palivela @ 2012-07-24 14:32 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, linux-wireless
On 7/24/2012 7:40 PM, Johannes Berg wrote:
> On Tue, 2012-07-24 at 03:33 +0000, Mahesh Palivela wrote:
>> VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
>>
>> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
>> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
>
> Applied, but I fixed up the commit message. Please review & make a
> better one next time :)
>
> johannes
>
Sure. commited to mac80211-next? I couldn't find it there.
--
Thanks,
Mahesh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: VHT (11ac) Association
2012-07-24 14:32 ` Mahesh Palivela
@ 2012-07-24 14:34 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2012-07-24 14:34 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville, linux-wireless
On Tue, 2012-07-24 at 20:02 +0530, Mahesh Palivela wrote:
> On 7/24/2012 7:40 PM, Johannes Berg wrote:
> > On Tue, 2012-07-24 at 03:33 +0000, Mahesh Palivela wrote:
> >> VHT (11ac) Association related change version 2. Incorporated Johannes review comments.
> >>
> >> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> >> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> >
> > Applied, but I fixed up the commit message. Please review & make a
> > better one next time :)
> >
> > johannes
> >
> Sure. commited to mac80211-next? I couldn't find it there.
Didn't push out the tree yet, and even if I had git.kernel.org wouldn't
sync up quickly.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-24 14:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 3:33 [PATCH v2] mac80211: VHT (11ac) Association Mahesh Palivela
2012-07-24 3:37 ` Julian Calaby
2012-07-24 3:44 ` Mahesh Palivela
2012-07-24 14:10 ` Johannes Berg
2012-07-24 14:32 ` Mahesh Palivela
2012-07-24 14:34 ` Johannes Berg
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.