From bb9f8692f5043efef0dcef048cdd1db68299c2cb Mon Sep 17 00:00:00 2001 From: Zhu Yi Date: Thu, 21 May 2009 21:20:45 +0800 Subject: iwmc3200wifi: Add new Intel Wireless Multicomm 802.11 driver This driver supports Intel's full MAC wireless multicomm 802.11 hardware. Although the hardware is a 802.11agn device, we currently only support 802.11ag, in managed and ad-hoc mode (no AP mode for now). Signed-off-by: Zhu Yi Signed-off-by: Samuel Ortiz Signed-off-by: John W. Linville --- drivers/net/wireless/iwmc3200wifi/Kconfig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 drivers/net/wireless/iwmc3200wifi/Kconfig (limited to 'drivers/net/wireless/iwmc3200wifi/Kconfig') diff --git a/drivers/net/wireless/iwmc3200wifi/Kconfig b/drivers/net/wireless/iwmc3200wifi/Kconfig new file mode 100644 index 00000000000..ae84ddabcc1 --- /dev/null +++ b/drivers/net/wireless/iwmc3200wifi/Kconfig @@ -0,0 +1,23 @@ +config IWM + tristate "Intel Wireless Multicomm 3200 WiFi driver" + depends on MMC && WLAN_80211 && EXPERIMENTAL + select LIB80211 + select FW_LOADER + select RFKILL + +config IWM_DEBUG + bool "Enable full debugging output in iwmc3200wifi" + depends on IWM && DEBUG_FS + ---help--- + This option will enable debug tracing and setting for iwm + + You can set the debug level and module through debugfs. By + default all modules are set to the IWL_DL_ERR level. + To see the list of debug modules and levels, see iwm/debug.h + + For example, if you want the full MLME debug output: + echo 0xff > /debug/iwm/phyN/debug/mlme + + Or, if you want the full debug, for all modules: + echo 0xff > /debug/iwm/phyN/debug/level + echo 0xff > /debug/iwm/phyN/debug/modules -- cgit v1.2.3-70-g09d2 From d0fc1d5e3fe869f8a32a2bc1dd02d8383a057164 Mon Sep 17 00:00:00 2001 From: Zhu Yi Date: Mon, 25 May 2009 22:41:51 -0700 Subject: iwmc3200wifi: fix link error when CFG80211 is not selected The patch makes iwmc3200wifi select CFG80211 instead of LIB80211. This fixed module link error reported by Randy Dunlap when compiling iwmc3200wifi without cfg80211 selected. WIRELESS_EXT is also selected by iwmc3200wifi. Signed-off-by: Zhu Yi Signed-off-by: David S. Miller --- drivers/net/wireless/iwmc3200wifi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/wireless/iwmc3200wifi/Kconfig') diff --git a/drivers/net/wireless/iwmc3200wifi/Kconfig b/drivers/net/wireless/iwmc3200wifi/Kconfig index ae84ddabcc1..41bd4b2b541 100644 --- a/drivers/net/wireless/iwmc3200wifi/Kconfig +++ b/drivers/net/wireless/iwmc3200wifi/Kconfig @@ -1,7 +1,8 @@ config IWM tristate "Intel Wireless Multicomm 3200 WiFi driver" depends on MMC && WLAN_80211 && EXPERIMENTAL - select LIB80211 + select WIRELESS_EXT + select CFG80211 select FW_LOADER select RFKILL -- cgit v1.2.3-70-g09d2 From 76963bb602ba91927130a0140d5757a5969e08ac Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 2 Jun 2009 13:01:42 +0200 Subject: iwm: port to new cfg80211 rfkill Which means removing all rfkill code since it only does soft-kill which cfg80211 will now handle in exactly the same way the driver did. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- drivers/net/wireless/iwmc3200wifi/Kconfig | 1 - drivers/net/wireless/iwmc3200wifi/Makefile | 2 +- drivers/net/wireless/iwmc3200wifi/iwm.h | 4 -- drivers/net/wireless/iwmc3200wifi/netdev.c | 10 ---- drivers/net/wireless/iwmc3200wifi/rfkill.c | 83 ------------------------------ 5 files changed, 1 insertion(+), 99 deletions(-) delete mode 100644 drivers/net/wireless/iwmc3200wifi/rfkill.c (limited to 'drivers/net/wireless/iwmc3200wifi/Kconfig') diff --git a/drivers/net/wireless/iwmc3200wifi/Kconfig b/drivers/net/wireless/iwmc3200wifi/Kconfig index 41bd4b2b541..a907aa9eff6 100644 --- a/drivers/net/wireless/iwmc3200wifi/Kconfig +++ b/drivers/net/wireless/iwmc3200wifi/Kconfig @@ -4,7 +4,6 @@ config IWM select WIRELESS_EXT select CFG80211 select FW_LOADER - select RFKILL config IWM_DEBUG bool "Enable full debugging output in iwmc3200wifi" diff --git a/drivers/net/wireless/iwmc3200wifi/Makefile b/drivers/net/wireless/iwmc3200wifi/Makefile index 7cb415e5c11..927f022545c 100644 --- a/drivers/net/wireless/iwmc3200wifi/Makefile +++ b/drivers/net/wireless/iwmc3200wifi/Makefile @@ -1,5 +1,5 @@ obj-$(CONFIG_IWM) := iwmc3200wifi.o iwmc3200wifi-objs += main.o netdev.o rx.o tx.o sdio.o hal.o fw.o -iwmc3200wifi-objs += commands.o wext.o cfg80211.o eeprom.o rfkill.o +iwmc3200wifi-objs += commands.o wext.o cfg80211.o eeprom.o iwmc3200wifi-$(CONFIG_IWM_DEBUG) += debugfs.o diff --git a/drivers/net/wireless/iwmc3200wifi/iwm.h b/drivers/net/wireless/iwmc3200wifi/iwm.h index 3b29681792b..635c16ee618 100644 --- a/drivers/net/wireless/iwmc3200wifi/iwm.h +++ b/drivers/net/wireless/iwmc3200wifi/iwm.h @@ -343,8 +343,4 @@ int iwm_rx_handle_resp(struct iwm_priv *iwm, u8 *buf, unsigned long buf_size, struct iwm_wifi_cmd *cmd); void iwm_rx_free(struct iwm_priv *iwm); -/* RF Kill API */ -int iwm_rfkill_init(struct iwm_priv *iwm); -void iwm_rfkill_exit(struct iwm_priv *iwm); - #endif diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c index eec7201e91a..68e2c3b6c7a 100644 --- a/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/drivers/net/wireless/iwmc3200wifi/netdev.c @@ -136,17 +136,8 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev, wdev->netdev = ndev; - ret = iwm_rfkill_init(iwm); - if (ret) { - dev_err(dev, "Failed to init rfkill\n"); - goto out_rfkill; - } - return iwm; - out_rfkill: - unregister_netdev(ndev); - out_ndev: free_netdev(ndev); @@ -162,7 +153,6 @@ void iwm_if_free(struct iwm_priv *iwm) if (!iwm_to_ndev(iwm)) return; - iwm_rfkill_exit(iwm); unregister_netdev(iwm_to_ndev(iwm)); free_netdev(iwm_to_ndev(iwm)); iwm_wdev_free(iwm); diff --git a/drivers/net/wireless/iwmc3200wifi/rfkill.c b/drivers/net/wireless/iwmc3200wifi/rfkill.c deleted file mode 100644 index 8ee2c3c09a0..00000000000 --- a/drivers/net/wireless/iwmc3200wifi/rfkill.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Intel Wireless Multicomm 3200 WiFi driver - * - * Copyright (C) 2009 Intel Corporation - * Samuel Ortiz - * Zhu Yi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version - * 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - * - */ - -#include - -#include "iwm.h" - -static int iwm_rfkill_set_block(void *data, bool blocked) -{ - struct iwm_priv *iwm = data; - - if (!blocked) { - if (test_bit(IWM_RADIO_RFKILL_HW, &iwm->radio)) - return -EBUSY; - - if (test_and_clear_bit(IWM_RADIO_RFKILL_SW, &iwm->radio) && - (iwm_to_ndev(iwm)->flags & IFF_UP)) - return iwm_up(iwm); - } else { - if (!test_and_set_bit(IWM_RADIO_RFKILL_SW, &iwm->radio)) - return iwm_down(iwm); - } - - return 0; -} - -static const struct rfkill_ops iwm_rfkill_ops = { - .set_block = iwm_rfkill_set_block, -}; - -int iwm_rfkill_init(struct iwm_priv *iwm) -{ - int ret; - - iwm->rfkill = rfkill_alloc(KBUILD_MODNAME, - iwm_to_dev(iwm), - RFKILL_TYPE_WLAN, - &iwm_rfkill_ops, iwm); - if (!iwm->rfkill) { - IWM_ERR(iwm, "Unable to allocate rfkill device\n"); - return -ENOMEM; - } - - ret = rfkill_register(iwm->rfkill); - if (ret) { - IWM_ERR(iwm, "Failed to register rfkill device\n"); - goto fail; - } - - return 0; - fail: - rfkill_destroy(iwm->rfkill); - return ret; -} - -void iwm_rfkill_exit(struct iwm_priv *iwm) -{ - if (iwm->rfkill) { - rfkill_unregister(iwm->rfkill); - rfkill_destroy(iwm->rfkill); - } - iwm->rfkill = NULL; -} -- cgit v1.2.3-70-g09d2 From 0aa8204b46e0fb155a98074d53f8b31ca04269b2 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 3 Jun 2009 18:30:31 +0200 Subject: cfg80211: fix Kconfig for users of cfg80211 * iwm doesn't depend on cfg80211 or wireless extensions * rndis wlan selects cfg80211 - needs to depend * mac80211 selects cfg80211 - needs to depend Signed-off-by: Johannes Berg Acked-by: Randy Dunlap Signed-off-by: John W. Linville --- drivers/net/wireless/Kconfig | 2 +- drivers/net/wireless/iwmc3200wifi/Kconfig | 2 +- net/mac80211/Kconfig | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/iwmc3200wifi/Kconfig') diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 867324163ca..daf4c805be5 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -333,11 +333,11 @@ config USB_ZD1201 config USB_NET_RNDIS_WLAN tristate "Wireless RNDIS USB support" depends on USB && WLAN_80211 && EXPERIMENTAL + depends on CFG80211 select USB_USBNET select USB_NET_CDCETHER select USB_NET_RNDIS_HOST select WIRELESS_EXT - select CFG80211 ---help--- This is a driver for wireless RNDIS devices. These are USB based adapters found in devices such as: diff --git a/drivers/net/wireless/iwmc3200wifi/Kconfig b/drivers/net/wireless/iwmc3200wifi/Kconfig index a907aa9eff6..1eccb6df46d 100644 --- a/drivers/net/wireless/iwmc3200wifi/Kconfig +++ b/drivers/net/wireless/iwmc3200wifi/Kconfig @@ -1,8 +1,8 @@ config IWM tristate "Intel Wireless Multicomm 3200 WiFi driver" depends on MMC && WLAN_80211 && EXPERIMENTAL + depends on CFG80211 select WIRELESS_EXT - select CFG80211 select FW_LOADER config IWM_DEBUG diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 9cbf545e95a..ba2643a43c7 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig @@ -1,16 +1,19 @@ config MAC80211 tristate "Generic IEEE 802.11 Networking Stack (mac80211)" + depends on CFG80211 select CRYPTO select CRYPTO_ECB select CRYPTO_ARC4 select CRYPTO_AES select CRC32 select WIRELESS_EXT - select CFG80211 ---help--- This option enables the hardware independent IEEE 802.11 networking stack. +comment "CFG80211 needs to be enabled for MAC80211" + depends on CFG80211=n + config MAC80211_DEFAULT_PS bool "enable powersave by default" depends on MAC80211 -- cgit v1.2.3-70-g09d2