Re: RFC: automagically set wireless regulatory domain in cfg80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 02, 2009 at 03:09:12PM +0100, Ralf Ertzinger wrote:
> Hi.
> 
> On Mon, 02 Mar 2009 14:04:37 +0100, Christoph Höger wrote
> 
> > as you might know kernel module cfg80211 has a parameter to set the
> > regulatory domain:
> > 
> > parm:           ieee80211_regdom:IEEE 802.11 regulatory domain code
> > (charp)
> 
> As I found out the hard way the module in current rawhide kernels (around
> 0.140 or something) don't know this parameter any more.

Sorta -- the module option is there if you enable the (deprecated)
statically-defined regulatory domains.

Anyway, I think a better option is to use the local timezone
information to indicate the default regulatory domain.  I'll attach
a sample script as a strawman.  The equivalent would need to be
added somewhere, possible to the initscripts package (or triggered
from there).

Thoughts?

John
-- 
John W. Linville		Linux should be at the core
linville@xxxxxxxxxx			of your literate lifestyle.
#!/bin/sh

CLOCK=/etc/sysconfig/clock

if [ -f $CLOCK ]
then
	# This should set ZONE
	. $CLOCK
else
	echo "Timezone information not found!  Unable to set regulatory domain."
	exit
fi

if [ -z "$ZONE" ]
then
	echo "Timezone information not set!  Unable to set regulatory domain."
	exit
fi

COOKED_ZONE=$(echo $ZONE | sed -e 's/ /_/')

COUNTRY=$(grep $COOKED_ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }')

if [ -z "$COUNTRY" ]
then
	echo "Could not determine country!  Unable to set regulatory domain."
	exit
fi

iw reg set $COUNTRY
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux