linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC} mac80211: optimize rate control initialization
@ 2014-03-09 21:43 Bryan Batten
  0 siblings, 0 replies; only message in thread
From: Bryan Batten @ 2014-03-09 21:43 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Johannes Berg

This proposed patch changes the rate control initialization sources to 
reduce the number of files to be modified when a new rate control 
scheme is added to the kernel. Reducing the scope of needed source 
changes should enhance the Linux kernel as a vehicle for expanding 
802.11 rate control capabilities by making the addition of new schemes 
easier.

Affected files are net/mac80211/rate.h and net/mac80211/main.c.

Adding an additional rate control scheme currently requires not only 
adding the new rate control source code to the kernel, but also 
modifying net/mac80211/rate.h to define initialization and exit 
functions for the new scheme, and net/mac80211/main.c to add additional 
initialization and exit calls to the added functions. This patch 
removes the need to modify main.c when new rate control schemes are 
added. It makes a one time modification to main.c and changes rate.h so 
that any future rate control schemes added to mac80211 only require 
changes to rate.h, leaving the source for main.c unchanged.

The basic idea is to push the all the calls to specific rate control 
initialization and exit functions down into rate.h, using generic rate 
control initialization and exit functions defined there, then replace 
the explicit calls in main.c with references to the generic functions. 
The patch has two parts.

First, net/mac80211/rate.h currently conditionally expands calls to 
rc80211_pid_{init|exit} and rc80211_minstrel_{init|exit} based on the 
setting for CONFIG_MAC80211_RC_PID and CONFIG_MAC80211_RC_MINSTREL. The 
patch would add two wrapper functions:

static inline int mac80211_rc_init() to call all the initializers, and
static inline void mac80211_rc_exit() to call all the exit functions.

These symbols to not appear to be currently defined as of 3.12.11.

Second, in net/mac80211/main.c, ieee80211_init() and ieee80211_exit() 
currently call rc80211_pid_{init|exit} and rc80211_minstrel_{init|exit} 
individually, relying on the conditional definitions in rate.h to 
appropriately expand the calls. The patch replaces the initialization 
calls in ieee80211_init() with:

ret=mac80211_rc_init();

and the exit calls in ieee80211_exit() with:

mac80211_rc_exit();

If this proposal is deemed to be a worthwhile effort, let me know the 
appropriate version of the kernel to target, and I'll code (compile in 
target kernel without error or warning messages using gcc 4.7.2) and 
test (modified kernel does not crash) a formal patch and submit it to 
wherever you deem appropriate.

Additional comments and suggestions will be appreciated.

Thanks,
-- 
Bryan
-
Large corporations are not notably capitalistic.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-09 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 21:43 [RFC} mac80211: optimize rate control initialization Bryan Batten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).