Search Linux Wireless

[PATCH 5/5] Wireless: add wireless configfs module

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

 



This patch adds a wireless configfs module. Currently we only add
support for changing the central regulatory domain. The idea is not to
replace nl80211 interface but to supplement it and also to give home
for a place for configuring wireless kobjects. We can move add_interface /
remove_interface from sysfs to configfs, for example.

Example usage of using wireles configfs:

mkdir /config/

modprobe configfs_wireless
mount -t configfs none /config
echo US > /config/wireless/country
dmesg -c

You will see:

Userspace changed regulatory domain
ieee80211_regdomains: regulatory domain FCC1A created
Regulatory Domain:      FCC1A   Regulatory Domain ID:   0x10
        IEEE 802.11g    2GHz    ISM subband
        max_ir_ptmp:    30 dBm  max_ir_ptp:     30 dBm
        max_eirp_ptmp:  36 dBm  max_eirp_ptp:   255 dBm
        max_antenna_gain:       6 dBi
        Environment capability: Indoor & Outdoor
                Channel Freq (MHz)
                1       2412
                2       2417
                3       2422
                4       2427
                5       2432
                6       2437
                7       2442
                8       2447
                9       2452
                10      2457
                11      2462
---
 net/wireless/Kconfig  |   11 +++++++++++
 net/wireless/Makefile |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index 0505347..59e47ce 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -15,6 +15,17 @@ config NL80211
 
          If unsure, say Y.
 
+config CONFIGFS_WIRELESS
+	depends CFG80211 && IEEE80211_REGDOMAINS
+	tristate "Configfs interface for configuring central wireless settings"
+	---help---
+	 You can configure central wireless settings through this subsystem.
+	 It currently only has an ISO3166-1 alpha2 country regulatory domain
+	 settings used to define frequency and power regulatory restrictions
+	 for all wireless cards.
+	 
+	 If unsure, you can safely say Y.
+
 config IEEE80211_REGDOMAINS
 	tristate "Central IEEE 802.11 regulatory domain agent"
 	select ISO3166_1
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index 74c1059..b3f5daa 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -1,5 +1,6 @@
 obj-$(CONFIG_WIRELESS_EXT) += wext.o
 obj-$(CONFIG_CFG80211) += cfg80211.o
+obj-$(CONFIG_CONFIGFS_WIRELESS) += configfs_wireless.o
 
 cfg80211-y += core.o sysfs.o radiotap.o
 cfg80211-$(CONFIG_NL80211) += nl80211.o
-- 
1.5.2.4

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux