ath10k-ct: Update to 2019-02-28
[openwrt/openwrt.git] / package / kernel / ath10k-ct / patches / 100-kernel_compat.patch
1 --- a/ath10k/debug.c
2 +++ b/ath10k/debug.c
3 @@ -166,11 +166,11 @@ void ath10k_debug_print_hwfw_info(struct
4 ar->id.subsystem_vendor, ar->id.subsystem_device);
5
6 ath10k_info(ar, "kconfig debug %d debugfs %d tracing %d dfs %d testmode %d\n",
7 - config_enabled(CONFIG_ATH10K_DEBUG),
8 - config_enabled(CONFIG_ATH10K_DEBUGFS),
9 - config_enabled(CONFIG_ATH10K_TRACING),
10 - config_enabled(CONFIG_ATH10K_DFS_CERTIFIED),
11 - config_enabled(CONFIG_NL80211_TESTMODE));
12 + IS_ENABLED(CONFIG_ATH10K_DEBUG),
13 + IS_ENABLED(CONFIG_ATH10K_DEBUGFS),
14 + IS_ENABLED(CONFIG_ATH10K_TRACING),
15 + IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED),
16 + IS_ENABLED(CONFIG_NL80211_TESTMODE));
17
18 firmware = ar->normal_mode_fw.fw_file.firmware;
19 if (firmware)
20 @@ -3422,7 +3422,7 @@ int ath10k_debug_register(struct ath10k
21 debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR,
22 ar->debug.debugfs_phy, ar, &fops_nf_cal_period);
23
24 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
25 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
26 debugfs_create_file("dfs_simulate_radar", S_IWUSR,
27 ar->debug.debugfs_phy, ar,
28 &fops_simulate_radar);
29 --- a/ath10k/mac.c
30 +++ b/ath10k/mac.c
31 @@ -3604,7 +3604,7 @@ static void ath10k_regd_update(struct at
32
33 regpair = ar->ath_common.regulatory.regpair;
34
35 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
36 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
37 nl_dfs_reg = ar->dfs_detector->region;
38 wmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg);
39 ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
40 @@ -3638,7 +3638,7 @@ static void ath10k_reg_notifier(struct w
41
42 ath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory);
43
44 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
45 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
46 ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "reg-notifier: dfs region 0x%x\n",
47 request->dfs_region);
48 result = ar->dfs_detector->set_dfs_domain(ar->dfs_detector,
49 @@ -8939,7 +8939,7 @@ int ath10k_mac_register(struct ath10k *a
50 if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
51 ar->hw->netdev_features = NETIF_F_HW_CSUM;
52
53 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
54 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
55 /* Init ath dfs pattern detector */
56 ar->ath_common.debug_mask = ATH_DBG_DFS;
57 ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common,
58 @@ -8984,7 +8984,7 @@ err_unregister:
59 ieee80211_unregister_hw(ar->hw);
60
61 err_dfs_detector_exit:
62 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
63 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
64 ar->dfs_detector->exit(ar->dfs_detector);
65
66 err_free:
67 @@ -8999,7 +8999,7 @@ void ath10k_mac_unregister(struct ath10k
68 {
69 ieee80211_unregister_hw(ar->hw);
70
71 - if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
72 + if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
73 ar->dfs_detector->exit(ar->dfs_detector);
74
75 kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
76 --- a/ath10k/thermal.c
77 +++ b/ath10k/thermal.c
78 @@ -192,7 +192,7 @@ int ath10k_thermal_register(struct ath10
79
80 /* Avoid linking error on devm_hwmon_device_register_with_groups, I
81 * guess linux/hwmon.h is missing proper stubs. */
82 - if (!config_enabled(CONFIG_HWMON))
83 + if (!IS_ENABLED(CONFIG_HWMON))
84 return 0;
85
86 hwmon_dev = devm_hwmon_device_register_with_groups(ar->dev,
87 --- a/ath10k/wmi.c
88 +++ b/ath10k/wmi.c
89 @@ -3903,7 +3903,7 @@ void ath10k_wmi_event_dfs(struct ath10k
90 phyerr->tsf_timestamp, tsf, buf_len);
91
92 /* Skip event if DFS disabled */
93 - if (!config_enabled(CONFIG_ATH10K_DFS_CERTIFIED))
94 + if (!IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED))
95 return;
96
97 ATH10K_DFS_STAT_INC(ar, pulses_total);
98 --- a/ath10k-4.13/wmi.c
99 +++ b/ath10k-4.13/wmi.c
100 @@ -4030,7 +4030,7 @@ static void ath10k_dfs_radar_report(stru
101
102 ATH10K_DFS_STAT_INC(ar, pulses_detected);
103
104 - if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
105 + if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe, NULL)) {
106 ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
107 "dfs no pulse pattern detected, yet\n");
108 return;
109 --- a/ath10k-4.16/wmi.c
110 +++ b/ath10k-4.16/wmi.c
111 @@ -4064,7 +4064,7 @@ static void ath10k_dfs_radar_report(stru
112
113 ATH10K_DFS_STAT_INC(ar, pulses_detected);
114
115 - if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
116 + if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe, NULL)) {
117 ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
118 "dfs no pulse pattern detected, yet\n");
119 return;