diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 15e1ed5a8237..3fa377dea1dd 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -744,6 +744,22 @@ static void hdd_copy_ht_operation(hdd_station_ctx_t *hdd_sta_ctx, roam_ht_ops->basicMCSSet[i]; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) +static void hdd_copy_vht_center_freq(struct ieee80211_vht_operation *ieee_ops, + tDot11fIEVHTOperation *roam_ops) +{ + ieee_ops->center_freq_seg0_idx = roam_ops->chanCenterFreqSeg1; + ieee_ops->center_freq_seg1_idx = roam_ops->chanCenterFreqSeg2; +} +#else +static void hdd_copy_vht_center_freq(struct ieee80211_vht_operation *ieee_ops, + tDot11fIEVHTOperation *roam_ops) +{ + ieee_ops->center_freq_seg1_idx = roam_ops->chanCenterFreqSeg1; + ieee_ops->center_freq_seg2_idx = roam_ops->chanCenterFreqSeg2; +} +#endif /* KERNEL_VERSION(4, 12, 0) */ + /** * hdd_copy_vht_operation()- copy VHT operations element from roam info to * hdd station context. @@ -762,8 +778,7 @@ static void hdd_copy_vht_operation(hdd_station_ctx_t *hdd_sta_ctx, qdf_mem_zero(hdd_vht_ops, sizeof(struct ieee80211_vht_operation)); hdd_vht_ops->chan_width = roam_vht_ops->chanWidth; - hdd_vht_ops->center_freq_seg1_idx = roam_vht_ops->chanCenterFreqSeg1; - hdd_vht_ops->center_freq_seg2_idx = roam_vht_ops->chanCenterFreqSeg2; + hdd_copy_vht_center_freq(hdd_vht_ops, roam_vht_ops); hdd_vht_ops->basic_mcs_set = roam_vht_ops->basicMCSSet; } |
