How to edit mesh_hwmp.c in mac80211

I downloaded OpenWrt from git with wsl. I want to use this version; https://downloads.openwrt.org/releases/21.02.1/
targets/ath79/nand/openwrt-21.02.1-ath79-nand-glinet_
gl-ar750s-nor-squashfs-sysupgrade.bin .
I would like to edit the mesh network routing protocol HWMP in this version and build it to GL-AR750S-Ext.
How should I do it?

Start here:
https://firmware-selector.openwrt.org/?version=23.05.5&target=ath79%2Fnand&id=glinet_gl-ar750s-nor-nand

You need beefier wpad package for mesh support.

I am doing it in Ubuntu.

Nothing to do with host platform, as long as you download image from the web you can use windows. In firmware selector expand "customize package selection" and replace wpad-basic-mbedtls for wpad-mesh-mbedtls or wpad-mbedtls.

When I download from the web, can I edit HWMP (routing protocol in mesh) in the image?

https://openwrt.org/docs/guide-developer/toolchain/use-patches-with-buildsystem#adding_or_editing_kernel_patches

I followed that page and I made a patch file named 1001-mac80211-mesh_hwmp.patch.
I want to edit mesh_hwmp.c to incorporate GPS infomation, so I wrote #include gps.h in mesh_hwmp.c.
And then, I executed ~/../package/kernel/mac8011/compile, however, the error which says that can't find gps.h.
How should I solve this problem?

Maybe because there is no gps.h in the linux kernel? You are the developer, only you can see what you're doing.

This has been discontinued by the manufactuter for quite some time.

This has been EOL for some time also.

So developing with both of these is not a good idea.

For those wondering, HWMP (Hybrid Wireless Mesh Protocol), is the layer 2 mac-routing protocol used by 802.11s mesh.

Adding gps support of some kind to HWMP is an interesting idea.

Adding a generic "meshnode information" string would be more useful though.

Although an 802.11s mesh dynamically reconfigures itself as nodes move around, it is a slow and deliberate process often taking many seconds or even minutes to reconfigure and propagate through the backhaul and then only stabilises if the relative 3D locations of nodes remains static after a move.

HWMP is not suitable for use within a group of drones for example - an example where gps support might be essential.

It might be useful if you explained why you think you need gps support in HWMP.

2 Likes