Closed ZeroChaos- closed 2 years ago
Hi. Interesting. Might I ask what situation you have at hand that causes you to be looking at 11r?
This is something I might like to dig into but I am in the process of moving right now and won't be able to take on something like this for a few more weeks.
802.11r is part of the standard for a decade. I use it on my network, it's pretty great for a lot of reasons. It works in this fork https://github.com/EntropicEffect/rtl8822bu which unfortunately doesn't build against my currently 5.12 kernel :-(
Your version of the driver seemed well maintained, but when I tested, 802.11r support was missing. As this is (I'm assuming) mostly a vendor dump that you are basically doing community service hours for, it's up to you if you want to even try to support this. :-)
Good assessment. This driver is a vendor dump and I am doing community service.
There are a couple ways to work this. We could try to patch the other driver you mentioned for kernels 5.11 and 5.12 or we could use meld to see the difference in the two drivers. The preferred option, imho, would be to work on this driver as it is based on much more modern source and has some key fixes. Do you know how to use meld?
A quick look at the code gives me this patch:
--- 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)
I'm not sure if it breaks anything, but it works on my system.
I might have broken it with copy and paste, but this didn't cleanly apply for me
This works for me:
yeah, it was my fault, I corrupted the patch while copy/paste. Tested and confirmed it compiles, I'll try to find my hardware to confirm 802.11r actually works with this fix
@henkv1 @ZeroChaos-
If you report that this patch works and doesn't appear to break anything, let me know and I will merge it.
I do not have any issues with the patched driver. But I don't know if 802.11r works, because I don't use it.
@ZeroChaos- Can you confirm that 802.11r now works?
@henkv1 - current version successfully compiles with CONFIG_RTW_MBO = y but 802.11r does not work
okay, so I know that 802.11r isn't even in the makefile, but it is in the code. if I manually enable it, the errors don't look too crazy. any chance you care to try to an fix this?