Skip to content

Commit 65554d0

Browse files
sara-sjmberg-intel
authored andcommitted
mac80211: provide interface to driver to set VHT MU-MIMO data
Provide an interface to the lower level driver to set the VHT MU-MIMO data. This is needed for example when there is an update of the group data during low power state, where the management frame will not be passed to the host at all. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent ca48ebb commit 65554d0

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

include/net/mac80211.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5445,6 +5445,21 @@ ieee80211_vif_type_p2p(struct ieee80211_vif *vif)
54455445
return ieee80211_iftype_p2p(vif->type, vif->p2p);
54465446
}
54475447

5448+
/**
5449+
* ieee80211_update_mu_groups - set the VHT MU-MIMO groud data
5450+
*
5451+
* @vif: the specified virtual interface
5452+
* @membership: 64 bits array - a bit is set if station is member of the group
5453+
* @position: 2 bits per group id indicating the position in the group
5454+
*
5455+
* Note: This function assumes that the given vif is valid and the position and
5456+
* membership data is of the correct size and are in the same byte order as the
5457+
* matching GroupId management frame.
5458+
* Calls to this function need to be serialized with RX path.
5459+
*/
5460+
void ieee80211_update_mu_groups(struct ieee80211_vif *vif,
5461+
const u8 *membership, const u8 *position);
5462+
54485463
void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
54495464
int rssi_min_thold,
54505465
int rssi_max_thold);

net/mac80211/vht.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* VHT handling
33
*
44
* Portions of this file
5-
* Copyright(c) 2015 Intel Deutschland GmbH
5+
* Copyright(c) 2015 - 2016 Intel Deutschland GmbH
66
*
77
* This program is free software; you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License version 2 as
@@ -469,6 +469,20 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
469469
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_MU_GROUPS);
470470
}
471471

472+
void ieee80211_update_mu_groups(struct ieee80211_vif *vif,
473+
const u8 *membership, const u8 *position)
474+
{
475+
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
476+
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
477+
478+
if (WARN_ON_ONCE(!(sdata->flags & IEEE80211_SDATA_MU_MIMO_OWNER)))
479+
return;
480+
481+
memcpy(bss_conf->mu_group.membership, membership, WLAN_MEMBERSHIP_LEN);
482+
memcpy(bss_conf->mu_group.position, position, WLAN_USER_POSITION_LEN);
483+
}
484+
EXPORT_SYMBOL_GPL(ieee80211_update_mu_groups);
485+
472486
void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
473487
struct sta_info *sta, u8 opmode,
474488
enum ieee80211_band band)

0 commit comments

Comments
 (0)