|
| 1 | +From d144e153686e063ef3febeb3dbcaa5e98c3831ae Mon Sep 17 00:00:00 2001 |
| 2 | +From: Govind Singh < [email protected]> |
| 3 | +Date: Thu, 6 Nov 2025 11:25:53 +0400 |
| 4 | +Subject: [PATCH] fix build compatibility till Linux 6.12.3 with strict type |
| 5 | + checks |
| 6 | + |
| 7 | +Signed-off-by: Govind Singh < [email protected]> |
| 8 | +--- |
| 9 | + Makefile | 2 +- |
| 10 | + apf.c | 27 +++++++++++++++++++++++++++ |
| 11 | + debug.h | 2 +- |
| 12 | + firmware.h | 4 +++- |
| 13 | + mac.c | 1 + |
| 14 | + morse.h | 2 +- |
| 15 | + vendor.c | 2 -- |
| 16 | + 7 files changed, 34 insertions(+), 6 deletions(-) |
| 17 | + |
| 18 | +diff --git a/Makefile b/Makefile |
| 19 | +index 5dc7bb2..fce34ba 100644 |
| 20 | +--- a/Makefile |
| 21 | ++++ b/Makefile |
| 22 | +@@ -155,6 +155,7 @@ morse-y += coredump.o |
| 23 | + morse-y += peer.o |
| 24 | + morse-y += led.o |
| 25 | + morse-y += bss_stats.o |
| 26 | ++morse-y += apf.o |
| 27 | + morse-$(CONFIG_MORSE_MONITOR) += monitor.o |
| 28 | + morse-$(CONFIG_MORSE_SDIO) += sdio.o |
| 29 | + morse-$(CONFIG_MORSE_SPI) += spi.o |
| 30 | +@@ -164,7 +165,6 @@ morse-$(CONFIG_MORSE_USER_ACCESS) += uaccess.o |
| 31 | + morse-$(CONFIG_MORSE_HW_TRACE) += hw_trace.o |
| 32 | + morse-$(CONFIG_MORSE_PAGESET_TRACE) += pageset_trace.o |
| 33 | + morse-$(CONFIG_MORSE_BUS_TRACE) += bus_trace.o |
| 34 | +-morse-$(CONFIG_ANDROID) += apf.o |
| 35 | + |
| 36 | + ifeq ($(CONFIG_DISABLE_MORSE_RC),y) |
| 37 | + morse-y += minstrel_rc.o |
| 38 | +diff --git a/apf.c b/apf.c |
| 39 | +index baecd05..96b4b1b 100644 |
| 40 | +--- a/apf.c |
| 41 | ++++ b/apf.c |
| 42 | +@@ -16,6 +16,7 @@ |
| 43 | + #define MORSE_APF_WARN(_m, _f, _a...) morse_warn(FEATURE_ID_APF, _m, _f, ##_a) |
| 44 | + #define MORSE_APF_ERR(_m, _f, _a...) morse_err(FEATURE_ID_APF, _m, _f, ##_a) |
| 45 | + |
| 46 | ++#ifdef CONFIG_ANDROID |
| 47 | + struct nla_policy morse_apf_nla_policy[VENDOR_ATTR_PACKET_FILTER_MAX] = { |
| 48 | + [VENDOR_ATTR_PACKET_FILTER_VERSION] = { .type = NLA_U32}, |
| 49 | + [VENDOR_ATTR_PACKET_FILTER_MAX_LENGTH] = { .type = NLA_U32}, |
| 50 | +@@ -210,3 +211,29 @@ exit: |
| 51 | + kfree(program); |
| 52 | + return ret; |
| 53 | + } |
| 54 | ++#else |
| 55 | ++int morse_vendor_cmd_get_supported_feature_set(struct wiphy *wiphy, |
| 56 | ++ struct wireless_dev *wdev, const void *data, int data_len) |
| 57 | ++{ |
| 58 | ++ return -EOPNOTSUPP; |
| 59 | ++} |
| 60 | ++ |
| 61 | ++int morse_vendor_cmd_apf_get_capabilities(struct wiphy *wiphy, |
| 62 | ++ struct wireless_dev *wdev, const void *data, int data_len) |
| 63 | ++{ |
| 64 | ++ return -EOPNOTSUPP; |
| 65 | ++} |
| 66 | ++ |
| 67 | ++int morse_vendor_cmd_apf_set_packet_filter(struct wiphy *wiphy, |
| 68 | ++ struct wireless_dev *wdev, const void *data, int data_len) |
| 69 | ++{ |
| 70 | ++ return -EOPNOTSUPP; |
| 71 | ++} |
| 72 | ++ |
| 73 | ++int morse_vendor_cmd_apf_read_packet_filter_data(struct wiphy *wiphy, |
| 74 | ++ struct wireless_dev *wdev, const void *data, int data_len) |
| 75 | ++{ |
| 76 | ++ return -EOPNOTSUPP; |
| 77 | ++} |
| 78 | ++ |
| 79 | ++#endif /* CONFIG_ANDROID */ |
| 80 | +diff --git a/debug.h b/debug.h |
| 81 | +index 2b734d5..f03f419 100644 |
| 82 | +--- a/debug.h |
| 83 | ++++ b/debug.h |
| 84 | +@@ -156,7 +156,7 @@ extern uint debug_mask; |
| 85 | + * |
| 86 | + * @returns True if output would be generated and false otherwise. |
| 87 | + */ |
| 88 | +-bool morse_log_is_enabled(u32 id, u8 level); |
| 89 | ++bool morse_log_is_enabled(enum morse_feature_id id, u8 level); |
| 90 | + |
| 91 | + /** |
| 92 | + * Set the default logging level for all features. |
| 93 | +diff --git a/firmware.h b/firmware.h |
| 94 | +index 217339a..0b1815f 100644 |
| 95 | +--- a/firmware.h |
| 96 | ++++ b/firmware.h |
| 97 | +@@ -32,6 +32,8 @@ |
| 98 | + #error "Capability subset filled by firmware is to big" |
| 99 | + #endif |
| 100 | + |
| 101 | ++enum morse_config_test_mode; |
| 102 | ++ |
| 103 | + enum morse_fw_info_tlv_type { |
| 104 | + MORSE_FW_INFO_TLV_BCF_ADDR = 1, |
| 105 | + MORSE_FW_INFO_TLV_COREDUMP_MEM_REGION = 2, |
| 106 | +@@ -146,7 +148,7 @@ struct extended_host_table { |
| 107 | + u8 ext_host_table_data_tlvs[]; |
| 108 | + } __packed; |
| 109 | + |
| 110 | +-int morse_firmware_init(struct morse *mors, uint test_mode); |
| 111 | ++int morse_firmware_init(struct morse *mors, enum morse_config_test_mode test_mode); |
| 112 | + |
| 113 | + /** |
| 114 | + * @brief Do necessary preparation and then initialise firmware |
| 115 | +diff --git a/mac.c b/mac.c |
| 116 | +index 7844af9..3b3595f 100644 |
| 117 | +--- a/mac.c |
| 118 | ++++ b/mac.c |
| 119 | +@@ -4295,6 +4295,7 @@ static void morse_mac_ops_sta_rc_update(struct ieee80211_hw *hw, |
| 120 | + #else |
| 121 | + struct ieee80211_link_sta *link_sta, |
| 122 | + #endif |
| 123 | ++ |
| 124 | + u32 changed) |
| 125 | + { |
| 126 | + struct morse *mors; |
| 127 | +diff --git a/morse.h b/morse.h |
| 128 | +index d001ab5..850587c 100644 |
| 129 | +--- a/morse.h |
| 130 | ++++ b/morse.h |
| 131 | +@@ -55,7 +55,7 @@ |
| 132 | + /* Re-Define the IGNORE channel flag, if not defined by the cfg80211 patch. |
| 133 | + * The flag won't be used by MM81xx. |
| 134 | + */ |
| 135 | +-#if defined(__x86_64__) |
| 136 | ++#ifndef IEEE80211_CHAN_IGNORE |
| 137 | + #define IEEE80211_CHAN_IGNORE IEEE80211_CHAN_DISABLED |
| 138 | + #endif |
| 139 | + |
| 140 | +diff --git a/vendor.c b/vendor.c |
| 141 | +index 0556715..7fcd31a 100644 |
| 142 | +--- a/vendor.c |
| 143 | ++++ b/vendor.c |
| 144 | +@@ -14,9 +14,7 @@ |
| 145 | + #include "wiphy.h" |
| 146 | + #include "vendor.h" |
| 147 | + #include "mesh.h" |
| 148 | +-#ifdef CONFIG_ANDROID |
| 149 | + #include "apf.h" |
| 150 | +-#endif |
| 151 | + |
| 152 | + /** Extra overhead to account for any additional netlink framing */ |
| 153 | + #define VENDOR_EVENT_OVERHEAD (30) |
| 154 | +-- |
| 155 | +2.34.1 |
| 156 | + |
0 commit comments