Message ID | 20191206143401.4080-7-john@phrozen.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/7] mac80211: add a struct for holding BSS color settings | expand |
On 2019-12-06 20:04, John Crispin wrote: > This patch adds code to handle the BSS_CHANGED_BSS_COLOR flag. IT will > trigger the propagation of BSS color settings into the FW. Handling is > slightly different between AP and STA interfaces. > > Signed-off-by: John Crispin <john@phrozen.org> > --- > drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath11k/mac.c > b/drivers/net/wireless/ath/ath11k/mac.c > index 6a8c1c3b8da2..c692922513b2 100644 > --- a/drivers/net/wireless/ath/ath11k/mac.c > +++ b/drivers/net/wireless/ath/ath11k/mac.c > @@ -1928,6 +1928,19 @@ static void > ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, > ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id, > &info->he_obss_pd); > > + if (changed & BSS_CHANGED_HE_BSS_COLOR) { > + if (vif->type == NL80211_IFTYPE_AP) { > + ath11k_wmi_send_obss_color_collision_cfg_cmd( > + ar, arvif->vdev_id, info->he_bss_color.color, > + ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS, > + !info->he_bss_color.disabled); No error code check required, why? > + } else if (vif->type == NL80211_IFTYPE_STATION) { > + ath11k_wmi_send_bss_color_change_enable_cmd(ar, arvif->vdev_id, 1); > + ath11k_wmi_send_obss_color_collision_cfg_cmd(ar, arvif->vdev_id, 0, > + ATH11K_BSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS, 1); Same here. Vasanth
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 6a8c1c3b8da2..c692922513b2 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1928,6 +1928,19 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id, &info->he_obss_pd); + if (changed & BSS_CHANGED_HE_BSS_COLOR) { + if (vif->type == NL80211_IFTYPE_AP) { + ath11k_wmi_send_obss_color_collision_cfg_cmd( + ar, arvif->vdev_id, info->he_bss_color.color, + ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS, + !info->he_bss_color.disabled); + } else if (vif->type == NL80211_IFTYPE_STATION) { + ath11k_wmi_send_bss_color_change_enable_cmd(ar, arvif->vdev_id, 1); + ath11k_wmi_send_obss_color_collision_cfg_cmd(ar, arvif->vdev_id, 0, + ATH11K_BSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS, 1); + } + } + mutex_unlock(&ar->conf_mutex); }
This patch adds code to handle the BSS_CHANGED_BSS_COLOR flag. IT will trigger the propagation of BSS color settings into the FW. Handling is slightly different between AP and STA interfaces. Signed-off-by: John Crispin <john@phrozen.org> --- drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)