Commit ad97edd2 authored by Mohamed Abbas's avatar Mohamed Abbas Committed by John W. Linville
Browse files

iwlwifi: hook iwlwifi with Linux rfkill



This patch hook IWL with Linux rfkill.

Signed-off-by: default avatarMohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c8381fdc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -9,6 +9,12 @@ config IWLWIFI_LEDS
	  This option enables LEDS for the iwlwifi drivers


config IWLCORE_RFKILL
	boolean "IWLWIFI RF kill support"
	depends on IWLCORE
	select RFKILL
	select RFKILL_INPUT

config IWL4965
	tristate "Intel Wireless WiFi 4965AGN"
	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@ ifeq ($(CONFIG_IWLWIFI_LEDS),y)
	iwlcore-objs += iwl-led.o
endif

ifeq ($(CONFIG_IWLCORE_RFKILL),y)
	iwlcore-objs += iwl-rfkill.o
endif

obj-$(CONFIG_IWL3945)	+= iwl3945.o
iwl3945-objs		= iwl3945-base.o iwl-3945.o iwl-3945-rs.o

+1 −0
Original line number Diff line number Diff line
@@ -4961,6 +4961,7 @@ static struct iwl_lib_ops iwl4965_lib = {
		.acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
		.release_semaphore = iwlcore_eeprom_release_semaphore,
	},
	.radio_kill_sw = iwl4965_radio_kill_sw,
};

static struct iwl_ops iwl4965_ops = {
+5 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
extern struct pci_device_id iwl4965_hw_card_ids[];

#define DRV_NAME        "iwl4965"
#include "iwl-rfkill.h"
#include "iwl-eeprom.h"
#include "iwl-4965-hw.h"
#include "iwl-csr.h"
@@ -739,6 +740,7 @@ extern int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index
extern int iwl4965_queue_space(const struct iwl4965_queue *q);
struct iwl_priv;

extern void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio);
/*
 * Forward declare iwl-4965.c functions for iwl-base.c
 */
@@ -1050,6 +1052,9 @@ struct iwl_priv {
	 * 4965's initialize alive response contains some calibration data. */
	struct iwl4965_init_alive_resp card_alive_init;
	struct iwl4965_alive_resp card_alive;
#ifdef CONFIG_IWLCORE_RFKILL
	struct iwl_rfkill_mngr rfkill_mngr;
#endif

#ifdef CONFIG_IWL4965_LEDS
	struct iwl4965_led led[IWL_LED_TRG_MAX];
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ struct iwl_priv; /* FIXME: remove */
#include "iwl-debug.h"
#include "iwl-eeprom.h"
#include "iwl-core.h"
#include "iwl-rfkill.h"

#include "iwl-4965.h" /* FIXME: remove */

@@ -257,12 +258,15 @@ int iwlcore_low_level_notify(struct iwl_priv *priv,
{
	switch (notify) {
	case IWLCORE_INIT_EVT:
		iwl_rfkill_init(priv);
		break;
	case IWLCORE_START_EVT:
		break;
	case IWLCORE_STOP_EVT:
		break;
	case IWLCORE_REMOVE_EVT:
		iwl_rfkill_unregister(priv);
		iwl_rfkill_free(priv);
		break;
	}

Loading