summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Brown <dustinb@codeaurora.org>2017-08-10 15:44:50 -0700
committerpramod kotreshappa <kpramod@codeaurora.org>2017-08-25 13:45:56 -0700
commit2a9711aa84396f4f73632d2916d897eda9ea258b (patch)
tree46c54bfcc4974710cbaebb327fa81ad616583b40
parent709e9a75d4273f512e69e8981fdd25cbf733438e (diff)
qcacld-3.0: Fix compilation issue no member named ‘center_freq_seg2_idx’
Linux kernel 4.12 renamed center_freq_seg2idx to center_freq_seg1idx and center_freq_seg1idx to center_freq_seg0idx. Add conditional compilation to access the correct fields based on the kernel version. Change-Id: Id8c20f9e47eecdbdf121c88cb5e017f662e2e15e CRs-Fixed: 2091058
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c19
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;
}