OpenWrt Forum Archive

Topic: Where in the code...

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm a new developer trying to find my way around the Barrier Breaker source tree a bit.  Let's say that I want to find the correct spot in the code after a beacon frame is received, to examine its fields using my own logic.  Could anybody give me a pointer to the spot (or function, or file)?  I haven't seen this kind of information elsewhere.  Thanks.  If I've missed an existing resource with this level of information, my apologies, and a pointer to such would be appreciated.

Beacon Frame are probably handled in the Kernel. However Kernel drivers are not used for wireless.

- OpenWrt uses newer/"future" drivers: the mac80211 package created from some wireless development repository (afaik it should be wireless-testing : http://git.kernel.org/cgit/linux/kernel … esting.git )
compare the date of the package to the version in that tree; these drivers are then backported to run with older Kernels (see backport project for details) - and the output of the backport process is used as new driver for old Kernel versions

- these drivers are then heavily patched (see https://dev.openwrt.org/browser/trunk/p … 11/patches )

build_dir/target ...../linux-(arch)/compat-wireless-(version/ should contain the driver sources if you built OpenWrt from source

There is some information of the wireless subsystem -
http://www.campsmur.cat/files/mac80211_intro.pdf
has some codepaths but wireless subsystem is evolving quite fast and there might be differences between hardware / handling of packets between firmware and non-firmware drivers for example

PS: Some older drivers do not use NL80211 drivers

afaik ath9k should support very verbose wireless debugging

In the past three weeks I've become comfortable with building my own OpenWRT loads, downloading them to my target (TP-Link WDR4300, Atheros 9xxx chipset), switching back and forth between vendor and OpenWRT firmwares, and understanding the many networking options available through LuCI.  Though I have more information now, the task in my first post is still in front of me (code for logging a few fields in each beacon frame heard, for me probably with ath_dbg (?)).

Thanks zloop for your advice.

To confirm, you are recommending that I look at the source in the directory

barrier_breaker/build_dir/target-mips_34kc_uClibc-0.9.33.2/
linux-ar71xx_generic/compat-wireless-2014-05-22/drivers/net/
wireless/ath/ath9k

Is that correct?   (dir string broken across several lines)

Could someone familiar with this code perhaps provide a clue regarding which source files would be the best ones to study and modify (roughly 100 candidates in the dir).

Thanks!

The discussion might have continued from here.