rtl8822bu: rough draft for a fork that works

This commit is contained in:
Rick Farina (Zero_Chaos) 2021-07-25 21:53:13 -04:00
parent 4561815029
commit b84d560a99
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,34 @@
--- a/include/ieee80211.h 2021-07-20 10:59:56.475986578 +0200
+++ b/include/ieee80211.h 2021-07-20 11:06:59.724255108 +0200
@@ -1452,13 +1452,31 @@
#define PORT_FMT "%u"
#define PORT_ARG(x) ntohs(*((u16 *)(x)))
+#ifdef PLATFORM_FREEBSD /* Baron change func to macro */
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#define is_zero_mac_addr(Addr) ((Addr[0] == 0x00) && (Addr[1] == 0x00) && (Addr[2] == 0x00) && \
(Addr[3] == 0x00) && (Addr[4] == 0x00) && (Addr[5] == 0x00))
+#else
+extern __inline int is_multicast_mac_addr(const u8 *addr)
+{
+ return (addr[0] != 0xff) && (0x01 & addr[0]);
+}
+
+extern __inline int is_broadcast_mac_addr(const u8 *addr)
+{
+ return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
+ (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
+}
+extern __inline int is_zero_mac_addr(const u8 *addr)
+{
+ return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
+ (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
+}
+#endif /* PLATFORM_FREEBSD */
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)

View file

@ -23,6 +23,8 @@ LICENSE="GPL-2"
SLOT="0"
IUSE="kernel_linux"
PATCHES=( "${FILESDIR}"/80211r.patch )
# compile against selected (not running) target
pkg_setup() {
if use kernel_linux; then