Inserting CogTRA - ljerezchaves/cogtra GitHub Wiki
Introduction
This tutorial explains how to insert CogTRA algorithm into your custom OpenWrt firmware.
Compiling
Go to:
cd (path_to_openwrt)/package/mac80211
and replace the Makefile of mac802 package for the one in the repository of this project.
Then, copy the file 920-multiple_rc.patch
from this project into the following directory:
(path_to_openwrt)/package/mac80211/patches/
Get back to the root dir (path_to_openwrt) and execute:
make package/mac80211/{clean,compile} V=99
This will automactically download the source code from this repository (tag backfire_10.03.1) into your computer, compile and generate the .ipk files.
Installing
Go to:
(path_to_openwrt)/bin/ar71xx/packages
and copy the following packages into the router system:
kmod-cfg80211_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-mac80211_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-ath_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-ath5k_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-ath9k-common_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-ath9k-htc_2.6.32.27+2012-03-01-1_ar71xx.ipk
kmod-ath9k_2.6.32.27+2012-03-01-1_ar71xx.ipk
Remove old packages and install the new ones using the install.sh bash script to do the entire hard work.
Other algorithms
If you want to use other algorithms (existing algorithms or implement a new one), you need to modify the two files:
- the mac82011 Makefile and
- the compat config.mk
Go to:
cd (path_to_openwrt)/package/mac80211
Open the Makefile for edit and modify the following flag to the name of the algorith you want to use (here cora):
-D__CONFIG_MAC80211_RC_DEFAULT=cora
Change any other RC flag to NO ("n"), leaving only the desired flag to YES ("y"):
CONFIG_MAC80211_RC_ARF=n \
CONFIG_MAC80211_RC_AARF=n \
CONFIG_MAC80211_RC_CORA=y \
CONFIG_MAC80211_RC_COGTRA=n \
CONFIG_MAC80211_RC_MINSTREL=n \
CONFIG_MAC80211_RC_MINSTREL_HT=n \
Get back to the root dir (path_to_openwrt) and prepare the code for compilation
make package/mac80211/{clean,prepare} V=99
Go to:
cd (path_to_openwrt)/build_dir/linux-ar71xx/compat-wireless-cogtra-2012-03-01/
and edit the config.mk
file as in the following example:
# Select in the next two lines which rate control algorithm to use
CONFIG_MAC80211_RC_DEFAULT=cora
CONFIG_COMPAT_MAC80211_RC_DEFAULT=cora
CONFIG_MAC80211_RC_COGTRA=n
CONFIG_MAC80211_RC_CORA=y
CONFIG_MAC80211_RC_MINSTREL=n
CONFIG_MAC80211_RC_MINSTREL_HT=n
CONFIG_MAC80211_RC_ARF=n
CONFIG_MAC80211_RC_AARF=n
CONFIG_MAC80211_RC_PID=n
Get back to the root dir (path_to_openwrt) and compile the code:
make package/mac80211/compile V=99
After that, you can proceed with normal installation.