2009-06-02 11:13:18

by Johannes Berg

[permalink] [raw]
Subject: [RFT 1/3] iwlwifi: port to cfg80211 rfkill

This ports the iwlwifi rfkill code to the new API offered by
cfg80211 and thus removes a lot of useless stuff. The soft-
rfkill is completely removed since that is now handled by
setting the interfaces down.

Signed-off-by: Johannes Berg <[email protected]>
Cc: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/Kconfig | 4
drivers/net/wireless/iwlwifi/Makefile | 1
drivers/net/wireless/iwlwifi/iwl-3945.h | 5 -
drivers/net/wireless/iwlwifi/iwl-agn.c | 42 ++------
drivers/net/wireless/iwlwifi/iwl-core.c | 138 ----------------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 16 ---
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 2
drivers/net/wireless/iwlwifi/iwl-dev.h | 5 -
drivers/net/wireless/iwlwifi/iwl-rfkill.c | 131 --------------------------
drivers/net/wireless/iwlwifi/iwl-rfkill.h | 48 ---------
drivers/net/wireless/iwlwifi/iwl3945-base.c | 41 +-------
11 files changed, 19 insertions(+), 414 deletions(-)

--- wireless-testing.orig/drivers/net/wireless/iwlwifi/Kconfig 2009-06-02 12:53:44.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/Kconfig 2009-06-02 12:56:07.000000000 +0200
@@ -10,10 +10,6 @@ config IWLWIFI_LEDS
bool "Enable LED support in iwlagn and iwl3945 drivers"
depends on IWLWIFI

-config IWLWIFI_RFKILL
- def_bool y
- depends on IWLWIFI && RFKILL
-
config IWLWIFI_SPECTRUM_MEASUREMENT
bool "Enable Spectrum Measurement in iwlagn driver"
depends on IWLWIFI
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-3945.h 2009-06-02 12:53:58.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-3945.h 2009-06-02 12:56:07.000000000 +0200
@@ -36,10 +36,6 @@
#include <linux/kernel.h>
#include <net/ieee80211_radiotap.h>

-/*used for rfkill*/
-#include <linux/rfkill.h>
-#include <linux/input.h>
-
/* Hardware specific file defines the PCI IDs table for that hardware module */
extern struct pci_device_id iwl3945_hw_card_ids[];

@@ -155,7 +151,6 @@ struct iwl3945_frame {
#define STATUS_HCMD_SYNC_ACTIVE 1 /* sync host command in progress */
#define STATUS_INT_ENABLED 2
#define STATUS_RF_KILL_HW 3
-#define STATUS_RF_KILL_SW 4
#define STATUS_INIT 5
#define STATUS_ALIVE 6
#define STATUS_READY 7
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-06-02 12:53:58.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-06-02 12:56:07.000000000 +0200
@@ -737,19 +737,13 @@ static void iwl_rx_card_state_notif(stru
clear_bit(STATUS_RF_KILL_HW, &priv->status);


- if (flags & SW_CARD_DISABLED)
- set_bit(STATUS_RF_KILL_SW, &priv->status);
- else
- clear_bit(STATUS_RF_KILL_SW, &priv->status);
-
if (!(flags & RXON_CARD_DISABLED))
iwl_scan_cancel(priv);

if ((test_bit(STATUS_RF_KILL_HW, &status) !=
- test_bit(STATUS_RF_KILL_HW, &priv->status)) ||
- (test_bit(STATUS_RF_KILL_SW, &status) !=
- test_bit(STATUS_RF_KILL_SW, &priv->status)))
- queue_work(priv->workqueue, &priv->rf_kill);
+ test_bit(STATUS_RF_KILL_HW, &priv->status)))
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy,
+ test_bit(STATUS_RF_KILL_HW, &priv->status));
else
wake_up_interruptible(&priv->wait_command_queue);
}
@@ -1045,7 +1039,7 @@ static void iwl_irq_tasklet_legacy(struc
set_bit(STATUS_RF_KILL_HW, &priv->status);
else
clear_bit(STATUS_RF_KILL_HW, &priv->status);
- queue_work(priv->workqueue, &priv->rf_kill);
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rf_kill);
}

handled |= CSR_INT_BIT_RF_KILL;
@@ -1218,7 +1212,7 @@ static void iwl_irq_tasklet(struct iwl_p
set_bit(STATUS_RF_KILL_HW, &priv->status);
else
clear_bit(STATUS_RF_KILL_HW, &priv->status);
- queue_work(priv->workqueue, &priv->rf_kill);
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rf_kill);
}

handled |= CSR_INT_BIT_RF_KILL;
@@ -1726,12 +1720,10 @@ static void __iwl_down(struct iwl_priv *
ieee80211_stop_queues(priv->hw);

/* If we have not previously called iwl_init() then
- * clear all bits but the RF Kill bits and return */
+ * clear all bits but the RF Kill bit and return */
if (!iwl_is_init(priv)) {
priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) <<
STATUS_RF_KILL_HW |
- test_bit(STATUS_RF_KILL_SW, &priv->status) <<
- STATUS_RF_KILL_SW |
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
STATUS_GEO_CONFIGURED |
test_bit(STATUS_EXIT_PENDING, &priv->status) <<
@@ -1740,11 +1732,9 @@ static void __iwl_down(struct iwl_priv *
}

/* ...otherwise clear out all the status bits but the RF Kill
- * bits and continue taking the NIC down. */
+ * bit and continue taking the NIC down. */
priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) <<
STATUS_RF_KILL_HW |
- test_bit(STATUS_RF_KILL_SW, &priv->status) <<
- STATUS_RF_KILL_SW |
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
STATUS_GEO_CONFIGURED |
test_bit(STATUS_FW_ERROR, &priv->status) <<
@@ -1866,9 +1856,10 @@ static int __iwl_up(struct iwl_priv *pri
set_bit(STATUS_RF_KILL_HW, &priv->status);

if (iwl_is_rfkill(priv)) {
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy, true);
+
iwl_enable_interrupts(priv);
- IWL_WARN(priv, "Radio disabled by %s RF Kill switch\n",
- test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW");
+ IWL_WARN(priv, "Radio disabled by HW RF Kill switch\n");
return 0;
}

@@ -2000,7 +1991,6 @@ static void iwl_bg_up(struct work_struct
mutex_lock(&priv->mutex);
__iwl_up(priv);
mutex_unlock(&priv->mutex);
- iwl_rfkill_set_hw_state(priv);
}

static void iwl_bg_restart(struct work_struct *data)
@@ -2178,8 +2168,6 @@ static int iwl_mac_start(struct ieee8021

mutex_unlock(&priv->mutex);

- iwl_rfkill_set_hw_state(priv);
-
if (ret)
return ret;

@@ -2774,7 +2762,6 @@ static void iwl_setup_deferred_work(stru
INIT_WORK(&priv->up, iwl_bg_up);
INIT_WORK(&priv->restart, iwl_bg_restart);
INIT_WORK(&priv->rx_replenish, iwl_bg_rx_replenish);
- INIT_WORK(&priv->rf_kill, iwl_bg_rf_kill);
INIT_WORK(&priv->beacon_update, iwl_bg_beacon_update);
INIT_WORK(&priv->run_time_calib_work, iwl_bg_run_time_calib_work);
INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start);
@@ -3045,12 +3032,8 @@ static int iwl_pci_probe(struct pci_dev
else
set_bit(STATUS_RF_KILL_HW, &priv->status);

- err = iwl_rfkill_init(priv);
- if (err)
- IWL_ERR(priv, "Unable to initialize RFKILL system. "
- "Ignoring error: %d\n", err);
- else
- iwl_rfkill_set_hw_state(priv);
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy,
+ test_bit(STATUS_RF_KILL_HW, &priv->status));

iwl_power_initialize(priv);
return 0;
@@ -3114,7 +3097,6 @@ static void __devexit iwl_pci_remove(str

iwl_synchronize_irq(priv);

- iwl_rfkill_unregister(priv);
iwl_dealloc_ucode_pci(priv);

if (priv->rxq.bd)
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-core.c 2009-06-02 12:53:59.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-core.c 2009-06-02 12:56:07.000000000 +0200
@@ -36,7 +36,6 @@
#include "iwl-debug.h"
#include "iwl-core.h"
#include "iwl-io.h"
-#include "iwl-rfkill.h"
#include "iwl-power.h"
#include "iwl-sta.h"
#include "iwl-helpers.h"
@@ -2211,126 +2210,6 @@ int iwl_send_card_state(struct iwl_priv
}
EXPORT_SYMBOL(iwl_send_card_state);

-void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
-{
- unsigned long flags;
-
- if (test_bit(STATUS_RF_KILL_SW, &priv->status))
- return;
-
- IWL_DEBUG_RF_KILL(priv, "Manual SW RF KILL set to: RADIO OFF\n");
-
- iwl_scan_cancel(priv);
- /* FIXME: This is a workaround for AP */
- if (priv->iw_mode != NL80211_IFTYPE_AP) {
- spin_lock_irqsave(&priv->lock, flags);
- iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
- CSR_UCODE_SW_BIT_RFKILL);
- spin_unlock_irqrestore(&priv->lock, flags);
- /* call the host command only if no hw rf-kill set */
- if (!test_bit(STATUS_RF_KILL_HW, &priv->status) &&
- iwl_is_ready(priv))
- iwl_send_card_state(priv,
- CARD_STATE_CMD_DISABLE, 0);
- set_bit(STATUS_RF_KILL_SW, &priv->status);
- /* make sure mac80211 stop sending Tx frame */
- if (priv->mac80211_registered)
- ieee80211_stop_queues(priv->hw);
- }
-}
-EXPORT_SYMBOL(iwl_radio_kill_sw_disable_radio);
-
-int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
-{
- unsigned long flags;
-
- if (!test_bit(STATUS_RF_KILL_SW, &priv->status))
- return 0;
-
- IWL_DEBUG_RF_KILL(priv, "Manual SW RF KILL set to: RADIO ON\n");
-
- spin_lock_irqsave(&priv->lock, flags);
- iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
-
- /* If the driver is up it will receive CARD_STATE_NOTIFICATION
- * notification where it will clear SW rfkill status.
- * Setting it here would break the handler. Only if the
- * interface is down we can set here since we don't
- * receive any further notification.
- */
- if (!priv->is_open)
- clear_bit(STATUS_RF_KILL_SW, &priv->status);
- spin_unlock_irqrestore(&priv->lock, flags);
-
- /* wake up ucode */
- msleep(10);
-
- iwl_read32(priv, CSR_UCODE_DRV_GP1);
- spin_lock_irqsave(&priv->reg_lock, flags);
- if (!iwl_grab_nic_access(priv))
- iwl_release_nic_access(priv);
- spin_unlock_irqrestore(&priv->reg_lock, flags);
-
- if (test_bit(STATUS_RF_KILL_HW, &priv->status)) {
- IWL_DEBUG_RF_KILL(priv, "Can not turn radio back on - "
- "disabled by HW switch\n");
- return 0;
- }
-
- /* when driver is up while rfkill is on, it wont receive
- * any CARD_STATE_NOTIFICATION notifications so we have to
- * restart it in here
- */
- if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) {
- clear_bit(STATUS_RF_KILL_SW, &priv->status);
- if (!iwl_is_rfkill(priv))
- queue_work(priv->workqueue, &priv->up);
- }
-
- /* If the driver is already loaded, it will receive
- * CARD_STATE_NOTIFICATION notifications and the handler will
- * call restart to reload the driver.
- */
- return 1;
-}
-EXPORT_SYMBOL(iwl_radio_kill_sw_enable_radio);
-
-void iwl_bg_rf_kill(struct work_struct *work)
-{
- struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
-
- wake_up_interruptible(&priv->wait_command_queue);
-
- if (test_bit(STATUS_EXIT_PENDING, &priv->status))
- return;
-
- mutex_lock(&priv->mutex);
-
- if (!iwl_is_rfkill(priv)) {
- IWL_DEBUG_RF_KILL(priv,
- "HW and/or SW RF Kill no longer active, restarting "
- "device\n");
- if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
- priv->is_open)
- queue_work(priv->workqueue, &priv->restart);
- } else {
- /* make sure mac80211 stop sending Tx frame */
- if (priv->mac80211_registered)
- ieee80211_stop_queues(priv->hw);
-
- if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
- IWL_DEBUG_RF_KILL(priv, "Can not turn radio back on - "
- "disabled by SW switch\n");
- else
- IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
- "Kill switch must be turned off for "
- "wireless networking to work.\n");
- }
- mutex_unlock(&priv->mutex);
- iwl_rfkill_set_hw_state(priv);
-}
-EXPORT_SYMBOL(iwl_bg_rf_kill);
-
void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
struct iwl_rx_mem_buffer *rxb)
{
@@ -2849,23 +2728,6 @@ int iwl_mac_config(struct ieee80211_hw *
if (priv->cfg->ops->hcmd->set_rxon_chain)
priv->cfg->ops->hcmd->set_rxon_chain(priv);

- if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) {
- if (conf->radio_enabled &&
- iwl_radio_kill_sw_enable_radio(priv)) {
- IWL_DEBUG_MAC80211(priv, "leave - RF-KILL - "
- "waiting for uCode\n");
- goto out;
- }
-
- if (!conf->radio_enabled)
- iwl_radio_kill_sw_disable_radio(priv);
- }
-
- if (!conf->radio_enabled) {
- IWL_DEBUG_MAC80211(priv, "leave - radio disabled\n");
- goto out;
- }
-
if (!iwl_is_ready(priv)) {
IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
goto out;
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-core.h 2009-06-02 12:53:58.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-core.h 2009-06-02 12:56:07.000000000 +0200
@@ -358,14 +358,6 @@ int iwl_txq_check_empty(struct iwl_priv
****************************************************/
int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);

-/*****************************************************
- * RF -Kill - here and not in iwl-rfkill.h to be available when
- * RF-kill subsystem is not compiled.
- ****************************************************/
-void iwl_bg_rf_kill(struct work_struct *work);
-void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv);
-int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv);
-
/*******************************************************************************
* Rate
******************************************************************************/
@@ -508,7 +500,6 @@ void iwlcore_free_geos(struct iwl_priv *
#define STATUS_HCMD_SYNC_ACTIVE 1 /* sync host command in progress */
#define STATUS_INT_ENABLED 2
#define STATUS_RF_KILL_HW 3
-#define STATUS_RF_KILL_SW 4
#define STATUS_INIT 5
#define STATUS_ALIVE 6
#define STATUS_READY 7
@@ -543,11 +534,6 @@ static inline int iwl_is_init(struct iwl
return test_bit(STATUS_INIT, &priv->status);
}

-static inline int iwl_is_rfkill_sw(struct iwl_priv *priv)
-{
- return test_bit(STATUS_RF_KILL_SW, &priv->status);
-}
-
static inline int iwl_is_rfkill_hw(struct iwl_priv *priv)
{
return test_bit(STATUS_RF_KILL_HW, &priv->status);
@@ -555,7 +541,7 @@ static inline int iwl_is_rfkill_hw(struc

static inline int iwl_is_rfkill(struct iwl_priv *priv)
{
- return iwl_is_rfkill_hw(priv) || iwl_is_rfkill_sw(priv);
+ return iwl_is_rfkill_hw(priv);
}

static inline int iwl_is_ready_rf(struct iwl_priv *priv)
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2009-06-02 12:53:45.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2009-06-02 12:56:07.000000000 +0200
@@ -449,8 +449,6 @@ static ssize_t iwl_dbgfs_status_read(str
test_bit(STATUS_INT_ENABLED, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_RF_KILL_HW:\t %d\n",
test_bit(STATUS_RF_KILL_HW, &priv->status));
- pos += scnprintf(buf + pos, bufsz - pos, "STATUS_RF_KILL_SW:\t %d\n",
- test_bit(STATUS_RF_KILL_SW, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_INIT:\t\t %d\n",
test_bit(STATUS_INIT, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_ALIVE:\t\t %d\n",
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-dev.h 2009-06-02 12:53:58.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-dev.h 2009-06-02 12:56:07.000000000 +0200
@@ -41,7 +41,6 @@
#include "iwl-prph.h"
#include "iwl-fh.h"
#include "iwl-debug.h"
-#include "iwl-rfkill.h"
#include "iwl-4965-hw.h"
#include "iwl-3945-hw.h"
#include "iwl-3945-led.h"
@@ -937,9 +936,6 @@ struct iwl_priv {
* 4965's initialize alive response contains some calibration data. */
struct iwl_init_alive_resp card_alive_init;
struct iwl_alive_resp card_alive;
-#if defined(CONFIG_IWLWIFI_RFKILL)
- struct rfkill *rfkill;
-#endif

#ifdef CONFIG_IWLWIFI_LEDS
unsigned long last_blink_time;
@@ -1073,7 +1069,6 @@ struct iwl_priv {
struct work_struct calibrated_work;
struct work_struct scan_completed;
struct work_struct rx_replenish;
- struct work_struct rf_kill;
struct work_struct abort_scan;
struct work_struct update_link_led;
struct work_struct auth_work;
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl3945-base.c 2009-06-02 12:53:58.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl3945-base.c 2009-06-02 12:56:07.000000000 +0200
@@ -1149,18 +1149,12 @@ static void iwl3945_rx_card_state_notif(
clear_bit(STATUS_RF_KILL_HW, &priv->status);


- if (flags & SW_CARD_DISABLED)
- set_bit(STATUS_RF_KILL_SW, &priv->status);
- else
- clear_bit(STATUS_RF_KILL_SW, &priv->status);
-
iwl_scan_cancel(priv);

if ((test_bit(STATUS_RF_KILL_HW, &status) !=
- test_bit(STATUS_RF_KILL_HW, &priv->status)) ||
- (test_bit(STATUS_RF_KILL_SW, &status) !=
- test_bit(STATUS_RF_KILL_SW, &priv->status)))
- queue_work(priv->workqueue, &priv->rf_kill);
+ test_bit(STATUS_RF_KILL_HW, &priv->status)))
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy,
+ test_bit(STATUS_RF_KILL_HW, &priv->status));
else
wake_up_interruptible(&priv->wait_command_queue);
}
@@ -2708,8 +2702,6 @@ static void __iwl3945_down(struct iwl_pr
if (!iwl_is_init(priv)) {
priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) <<
STATUS_RF_KILL_HW |
- test_bit(STATUS_RF_KILL_SW, &priv->status) <<
- STATUS_RF_KILL_SW |
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
STATUS_GEO_CONFIGURED |
test_bit(STATUS_EXIT_PENDING, &priv->status) <<
@@ -2718,11 +2710,9 @@ static void __iwl3945_down(struct iwl_pr
}

/* ...otherwise clear out all the status bits but the RF Kill
- * bits and continue taking the NIC down. */
+ * bit and continue taking the NIC down. */
priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) <<
STATUS_RF_KILL_HW |
- test_bit(STATUS_RF_KILL_SW, &priv->status) <<
- STATUS_RF_KILL_SW |
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
STATUS_GEO_CONFIGURED |
test_bit(STATUS_FW_ERROR, &priv->status) <<
@@ -2779,12 +2769,6 @@ static int __iwl3945_up(struct iwl_priv
return -EIO;
}

- if (test_bit(STATUS_RF_KILL_SW, &priv->status)) {
- IWL_WARN(priv, "Radio disabled by SW RF kill (module "
- "parameter)\n");
- return -ENODEV;
- }
-
if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
IWL_ERR(priv, "ucode not available for device bring up\n");
return -EIO;
@@ -2901,15 +2885,14 @@ static void iwl3945_rfkill_poll(struct w
{
struct iwl_priv *priv =
container_of(data, struct iwl_priv, rfkill_poll.work);
- unsigned long status = priv->status;

if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
clear_bit(STATUS_RF_KILL_HW, &priv->status);
else
set_bit(STATUS_RF_KILL_HW, &priv->status);

- if (test_bit(STATUS_RF_KILL_HW, &status) != test_bit(STATUS_RF_KILL_HW, &priv->status))
- queue_work(priv->workqueue, &priv->rf_kill);
+ wiphy_rfkill_set_hw_state(priv->hw->wiphy,
+ test_bit(STATUS_RF_KILL_HW, &priv->status));

queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
round_jiffies_relative(2 * HZ));
@@ -3141,7 +3124,6 @@ static void iwl3945_bg_up(struct work_st
mutex_lock(&priv->mutex);
__iwl3945_up(priv);
mutex_unlock(&priv->mutex);
- iwl_rfkill_set_hw_state(priv);
}

static void iwl3945_bg_restart(struct work_struct *data)
@@ -3304,8 +3286,6 @@ static int iwl3945_mac_start(struct ieee

mutex_unlock(&priv->mutex);

- iwl_rfkill_set_hw_state(priv);
-
if (ret)
goto out_release_irq;

@@ -3958,7 +3938,6 @@ static void iwl3945_setup_deferred_work(
INIT_WORK(&priv->up, iwl3945_bg_up);
INIT_WORK(&priv->restart, iwl3945_bg_restart);
INIT_WORK(&priv->rx_replenish, iwl3945_bg_rx_replenish);
- INIT_WORK(&priv->rf_kill, iwl_bg_rf_kill);
INIT_WORK(&priv->beacon_update, iwl3945_bg_beacon_update);
INIT_DELAYED_WORK(&priv->init_alive_start, iwl3945_bg_init_alive_start);
INIT_DELAYED_WORK(&priv->alive_start, iwl3945_bg_alive_start);
@@ -4325,13 +4304,6 @@ static int iwl3945_pci_probe(struct pci_
if (err)
IWL_ERR(priv, "failed to create debugfs files. Ignoring error: %d\n", err);

- err = iwl_rfkill_init(priv);
- if (err)
- IWL_ERR(priv, "Unable to initialize RFKILL system. "
- "Ignoring error: %d\n", err);
- else
- iwl_rfkill_set_hw_state(priv);
-
/* Start monitoring the killswitch */
queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
2 * HZ);
@@ -4397,7 +4369,6 @@ static void __devexit iwl3945_pci_remove

sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);

- iwl_rfkill_unregister(priv);
cancel_delayed_work_sync(&priv->rfkill_poll);

iwl3945_dealloc_ucode_pci(priv);
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-rfkill.c 2009-06-02 12:53:44.000000000 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,131 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved.
- *
- * Portions of this file are derived from the ipw3945 project, as well
- * as portions of the ieee80211 subsystem header files.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License 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, USA
- *
- * The full GNU General Public License is included in this distribution in the
- * file called LICENSE.
- *
- * Contact Information:
- * Intel Linux Wireless <[email protected]>
- * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
- *****************************************************************************/
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <net/mac80211.h>
-
-#include "iwl-eeprom.h"
-#include "iwl-dev.h"
-#include "iwl-core.h"
-
-/* software rf-kill from user */
-static int iwl_rfkill_soft_rf_kill(void *data, bool blocked)
-{
- struct iwl_priv *priv = data;
-
- if (!priv->rfkill)
- return -EINVAL;
-
- if (test_bit(STATUS_EXIT_PENDING, &priv->status))
- return 0;
-
- IWL_DEBUG_RF_KILL(priv, "received soft RFKILL: block=%d\n", blocked);
-
- mutex_lock(&priv->mutex);
-
- if (iwl_is_rfkill_hw(priv))
- goto out_unlock;
-
- if (!blocked)
- iwl_radio_kill_sw_enable_radio(priv);
- else
- iwl_radio_kill_sw_disable_radio(priv);
-
-out_unlock:
- mutex_unlock(&priv->mutex);
- return 0;
-}
-
-static const struct rfkill_ops iwl_rfkill_ops = {
- .set_block = iwl_rfkill_soft_rf_kill,
-};
-
-int iwl_rfkill_init(struct iwl_priv *priv)
-{
- struct device *device = wiphy_dev(priv->hw->wiphy);
- int ret = 0;
-
- BUG_ON(device == NULL);
-
- IWL_DEBUG_RF_KILL(priv, "Initializing RFKILL.\n");
- priv->rfkill = rfkill_alloc(priv->cfg->name,
- device,
- RFKILL_TYPE_WLAN,
- &iwl_rfkill_ops, priv);
- if (!priv->rfkill) {
- IWL_ERR(priv, "Unable to allocate RFKILL device.\n");
- ret = -ENOMEM;
- goto error;
- }
-
- ret = rfkill_register(priv->rfkill);
- if (ret) {
- IWL_ERR(priv, "Unable to register RFKILL: %d\n", ret);
- goto free_rfkill;
- }
-
- IWL_DEBUG_RF_KILL(priv, "RFKILL initialization complete.\n");
- return 0;
-
-free_rfkill:
- rfkill_destroy(priv->rfkill);
- priv->rfkill = NULL;
-
-error:
- IWL_DEBUG_RF_KILL(priv, "RFKILL initialization complete.\n");
- return ret;
-}
-EXPORT_SYMBOL(iwl_rfkill_init);
-
-void iwl_rfkill_unregister(struct iwl_priv *priv)
-{
-
- if (priv->rfkill) {
- rfkill_unregister(priv->rfkill);
- rfkill_destroy(priv->rfkill);
- }
-
- priv->rfkill = NULL;
-}
-EXPORT_SYMBOL(iwl_rfkill_unregister);
-
-/* set RFKILL to the right state. */
-void iwl_rfkill_set_hw_state(struct iwl_priv *priv)
-{
- if (!priv->rfkill)
- return;
-
- if (rfkill_set_hw_state(priv->rfkill,
- !!iwl_is_rfkill_hw(priv)))
- iwl_radio_kill_sw_disable_radio(priv);
- else
- iwl_radio_kill_sw_enable_radio(priv);
-}
-EXPORT_SYMBOL(iwl_rfkill_set_hw_state);
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-rfkill.h 2009-06-02 12:53:45.000000000 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
- *
- * Portions of this file are derived from the ipw3945 project, as well
- * as portions of the ieee80211 subsystem header files.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License 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, USA
- *
- * The full GNU General Public License is included in this distribution in the
- * file called LICENSE.
- *
- * Contact Information:
- * Intel Linux Wireless <[email protected]>
- * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
- *****************************************************************************/
-#ifndef __iwl_rf_kill_h__
-#define __iwl_rf_kill_h__
-
-struct iwl_priv;
-
-#include <linux/rfkill.h>
-
-#ifdef CONFIG_IWLWIFI_RFKILL
-
-void iwl_rfkill_set_hw_state(struct iwl_priv *priv);
-void iwl_rfkill_unregister(struct iwl_priv *priv);
-int iwl_rfkill_init(struct iwl_priv *priv);
-#else
-static inline void iwl_rfkill_set_hw_state(struct iwl_priv *priv) {}
-static inline void iwl_rfkill_unregister(struct iwl_priv *priv) {}
-static inline int iwl_rfkill_init(struct iwl_priv *priv) { return 0; }
-#endif
-
-
-
-#endif /* __iwl_rf_kill_h__ */
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/Makefile 2009-06-02 12:53:44.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/Makefile 2009-06-02 12:56:07.000000000 +0200
@@ -4,7 +4,6 @@ iwlcore-objs += iwl-rx.o iwl-tx.o iwl-
iwlcore-objs += iwl-scan.o
iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o
-iwlcore-$(CONFIG_IWLWIFI_RFKILL) += iwl-rfkill.o
iwlcore-$(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) += iwl-spectrum.o

obj-$(CONFIG_IWLAGN) += iwlagn.o

--



2009-06-03 21:05:54

by Reinette Chatre

[permalink] [raw]
Subject: Re: [RFT 1/3] iwlwifi: port to cfg80211 rfkill

Johannes,

On Tue, 2009-06-02 at 04:10 -0700, Johannes Berg wrote:
> This ports the iwlwifi rfkill code to the new API offered by
> cfg80211 and thus removes a lot of useless stuff. The soft-
> rfkill is completely removed since that is now handled by
> setting the interfaces down.
>
> Signed-off-by: Johannes Berg <[email protected]>
> Cc: Reinette Chatre <[email protected]>
> ---

* I tried this patch on top of latest wireless-testing (rc8 based) on a
Sony laptop. After I bring the interface up I enabled rfkill and saw a
gpf in the sony-laptop module (log is below). I tried this test many
times after this and did not see this gpf again.

* I tried to load the modules with rfkill enabled and then disabled
rfkill after interface up - that worked fine.

* In another test I had rfkill disabled and successfully associated with
AP. I then enabled rfkill and was disassociated as expected. I then
disabled rfkill again and used "iwconfig" to reassociate successfully.

* In another test rfkill was disabled and I associated with AP. I then
enabled and disabled rfkill rapidly and did not loose association.

In summary the testing went very well. There was that one gpf that
clouded the testing a bit. I have no idea how it can be connected to the
rfkill work though because the error appear to be contained in the
sony-laptop module.

Reinette


[ 680.856249] PM: Adding info for platform:regulatory.0
[ 680.856351] cfg80211: Using static regulatory domain info
[ 680.856358] cfg80211: Regulatory domain: US
[ 680.856362] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 680.856371] (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
[ 680.856378] (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 680.856386] (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 680.856393] (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 680.856400] (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 680.856407] (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[ 680.856897] cfg80211: Calling CRDA for country: US
[ 680.946854] cfg80211: Regulatory domain changed to country: US
[ 680.946862] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 680.946871] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 680.946878] (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 680.946886] (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 680.946893] (5490000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 680.946901] (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 681.002106] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 681.002109] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 681.002262] iwlagn 0000:06:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 681.002301] iwlagn 0000:06:00.0: setting latency timer to 64
[ 681.002356] iwlagn 0000:06:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
[ 681.042422] iwlagn 0000:06:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
[ 681.042514] iwlagn 0000:06:00.0: irq 30 for MSI/MSI-X
[ 681.042840] PM: Adding info for No Bus:phy0
[ 681.043112] PM: Adding info for No Bus:rfkill4
[ 681.046709] PM: Adding info for No Bus:wmaster0
[ 681.047776] phy0: Selected rate control algorithm 'iwl-agn-rs'
[ 681.049477] PM: Adding info for No Bus:wlan0
[ 681.050843] PM: Adding info for No Bus:rfkill5
[ 688.674007] iwlagn 0000:06:00.0: firmware: requesting iwlwifi-5000-2.ucode
[ 688.674495] PM: Adding info for No Bus:0000:06:00.0
[ 688.706155] PM: Removing info for No Bus:0000:06:00.0
[ 688.706893] iwlagn 0000:06:00.0: loaded firmware version 8.24.2.12
[ 688.966303] PM: Adding info for No Bus:iwl-phy0::radio
[ 688.967144] Registered led device: iwl-phy0::radio
[ 688.967231] PM: Adding info for No Bus:iwl-phy0::assoc
[ 688.967341] Registered led device: iwl-phy0::assoc
[ 688.967453] PM: Adding info for No Bus:iwl-phy0::RX
[ 688.967561] Registered led device: iwl-phy0::RX
[ 688.967642] PM: Adding info for No Bus:iwl-phy0::TX
[ 688.967749] Registered led device: iwl-phy0::TX
[ 689.180640] phy0: device now idle
[ 689.182350] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 692.451576] phy0: device no longer idle - scanning
[ 692.997766] cfg80211: Found new beacon on frequency: 5180 MHz (Ch 36) on phy0
[ 693.031112] cfg80211: Found new beacon on frequency: 5200 MHz (Ch 40) on phy0
[ 693.077197] cfg80211: Found new beacon on frequency: 5220 MHz (Ch 44) on phy0
[ 693.142511] cfg80211: Found new beacon on frequency: 5240 MHz (Ch 48) on phy0
[ 694.820445] cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on phy0
[ 694.851276] cfg80211: Found new beacon on frequency: 5765 MHz (Ch 153) on phy0
[ 694.887420] cfg80211: Found new beacon on frequency: 5785 MHz (Ch 157) on phy0
[ 694.911855] cfg80211: Found new beacon on frequency: 5805 MHz (Ch 161) on phy0
[ 695.050393] phy0: device now idle
[ 709.268874] iwlagn 0000:06:00.0: Radio Frequency Kill Switch is On:
[ 709.268879] Kill switch must be turned off for wireless networking to work.
[ 709.366404] general protection fault: 0000 [#1] SMP
[ 709.366551] last sysfs file: /sys/class/rfkill/rfkill5/state
[ 709.366616] CPU 1
[ 709.366707] Modules linked in: iwlagn iwlcore led_class mac80211 cfg80211 i915 drm i2c_algo_bit i2c_core ppdev ipv6 acpi_cpufreq cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_conservative cpufreq_stats freq_table container sbs sbshc lp parport arc4 ecb pcmcia joydev yenta_socket rsrc_nonstatic af_packet tpm_infineon sony_laptop psmouse iTCO_wdt iTCO_vendor_support pcmcia_core intel_agp video output tpm tpm_bios rfkill pcspkr serio_raw processor battery button ac evdev ext3 jbd mbcache sg sr_mod sd_mod cdrom ahci libata scsi_mod ehci_hcd uhci_hcd usbcore thermal fan thermal_sys fuse [last unloaded: cfg80211]
[ 709.369182] Pid: 66, comm: kacpi_notify Not tainted 2.6.30-rc8-wl #40 VGN-Z540N
[ 709.369182] RIP: 0010:[<ffffffffa0200dda>] [<ffffffffa0200dda>] sony_nc_rfkill_set+0xa/0x40 [sony_laptop]
[ 709.369182] RSP: 0018:ffff8800bb663dc0 EFLAGS: 00010286
[ 709.369182] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
[ 709.369182] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff880036f74480
[ 709.369182] RBP: ffff8800bb663dd0 R08: 0000000000000000 R09: 0000000000000000
[ 709.369182] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[ 709.369182] R13: 0000000000000000 R14: 0000000000000000 R15: ffff8800bb663df0
[ 709.369182] FS: 0000000000000000(0000) GS:ffff88000105e000(0000) knlGS:0000000000000000
[ 709.369182] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[ 709.369182] CR2: 00007ffff2051000 CR3: 00000000ba6b6000 CR4: 00000000000006e0
[ 709.369182] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 709.369182] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 709.369182] Process kacpi_notify (pid: 66, threadinfo ffff8800bb662000, task ffff8800bb658f40)
[ 709.369182] Stack:
[ 709.369182] 0000000000000000 0000000000000000 ffff8800bb663e20 ffffffffa0203292
[ 709.369182] ffff8800bb659548 0000000000000246 0000000000000202 ffff8800b729e2f8
[ 709.369182] ffff8800b5371898 ffff8800bb658f40 ffff880001058ec0 ffffffff803b5596
[ 709.369182] Call Trace:
[ 709.369182] [<ffffffffa0203292>] sony_nc_notify+0x222/0x260 [sony_laptop]
[ 709.369182] [<ffffffff803b5596>] ? acpi_os_execute_deferred+0x0/0x39
[ 709.369182] [<ffffffff803b8192>] acpi_device_notify+0x14/0x16
[ 709.369182] [<ffffffff803c5690>] acpi_ev_notify_dispatch+0x5f/0x6b
[ 709.369182] [<ffffffff803b55c2>] acpi_os_execute_deferred+0x2c/0x39
[ 709.369182] [<ffffffff8024d720>] worker_thread+0x1f0/0x340
[ 709.369182] [<ffffffff8024d6cd>] ? worker_thread+0x19d/0x340
[ 709.369182] [<ffffffff802525a0>] ? autoremove_wake_function+0x0/0x40
[ 709.369182] [<ffffffff80263a8d>] ? trace_hardirqs_on+0xd/0x10
[ 709.369182] [<ffffffff8024d530>] ? worker_thread+0x0/0x340
[ 709.369182] [<ffffffff8024d530>] ? worker_thread+0x0/0x340
[ 709.369182] [<ffffffff80252156>] kthread+0x56/0x90
[ 709.369182] [<ffffffff8020ce7a>] child_rip+0xa/0x20
[ 709.369182] [<ffffffff8020c87c>] ? restore_args+0x0/0x30
[ 709.369182] [<ffffffff80252100>] ? kthread+0x0/0x90
[ 709.369182] [<ffffffff8020ce70>] ? child_rip+0x0/0x20
[ 709.369182] Code: e1 89 c2 48 c7 c6 36 4e 20 a0 e8 b2 fe ff ff 89 c2 89 d0 48 8b 1c 24 4c 8b 64 24 08 c9 c3 0f 1f 00 55 89 f2 48 89 e5 48 83 ec 10 <8b> 34 bd 80 3e 20 a0 bf 24 01 00 00 81 c6 00 01 00 00 89 f0 0d
[ 709.369182] RIP [<ffffffffa0200dda>] sony_nc_rfkill_set+0xa/0x40 [sony_laptop]
[ 709.369182] RSP <ffff8800bb663dc0>
[ 709.375883] ---[ end trace 6c116875da7d6347 ]---
[ 709.432645] usb 6-2: USB disconnect, address 2
[ 709.432753] PM: Removing info for No Bus:usbdev6.2_ep81
[ 709.433263] PM: Removing info for No Bus:usbdev6.2_ep82
[ 709.433600] PM: Removing info for No Bus:usbdev6.2_ep02
[ 709.433922] PM: Removing info for usb:6-2:1.0
[ 709.434237] PM: Removing info for No Bus:usbdev6.2_ep83
[ 709.434548] PM: Removing info for No Bus:usbdev6.2_ep03
[ 709.435449] PM: Removing info for usb:6-2:1.1
[ 709.435886] PM: Removing info for No Bus:usbdev6.2_ep84
[ 709.436237] PM: Removing info for No Bus:usbdev6.2_ep04
[ 709.436596] PM: Removing info for usb:6-2:1.2
[ 709.436932] PM: Removing info for usb:6-2:1.3
[ 709.437280] PM: Removing info for No Bus:usbdev6.2_ep00
[ 709.437654] PM: Removing info for usb:6-2



2009-06-04 09:03:21

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFT 1/3] iwlwifi: port to cfg80211 rfkill

Reinette,

Thanks for the comprehensive test.

> * I tried this patch on top of latest wireless-testing (rc8 based) on a
> Sony laptop. After I bring the interface up I enabled rfkill and saw a
> gpf in the sony-laptop module (log is below). I tried this test many
> times after this and did not see this gpf again.
>
> * I tried to load the modules with rfkill enabled and then disabled
> rfkill after interface up - that worked fine.
>
> * In another test I had rfkill disabled and successfully associated with
> AP. I then enabled rfkill and was disassociated as expected. I then
> disabled rfkill again and used "iwconfig" to reassociate successfully.
>
> * In another test rfkill was disabled and I associated with AP. I then
> enabled and disabled rfkill rapidly and did not loose association.
>
> In summary the testing went very well. There was that one gpf that
> clouded the testing a bit. I have no idea how it can be connected to the
> rfkill work though because the error appear to be contained in the
> sony-laptop module.

That looks like an error in sony-laptop, indeed. Should we go ahead with
the iwlwifi part then?

> [ 709.366404] general protection fault: 0000 [#1] SMP
> [ 709.366551] last sysfs file: /sys/class/rfkill/rfkill5/state
> [ 709.366616] CPU 1

> [ 709.369182] Pid: 66, comm: kacpi_notify Not tainted 2.6.30-rc8-wl #40 VGN-Z540N
> [ 709.369182] RIP: 0010:[<ffffffffa0200dda>] [<ffffffffa0200dda>] sony_nc_rfkill_set+0xa/0x40 [sony_laptop]
> [ 709.369182] RSP: 0018:ffff8800bb663dc0 EFLAGS: 00010286
> [ 709.369182] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
> [ 709.369182] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff880036f74480
> [ 709.369182] RBP: ffff8800bb663dd0 R08: 0000000000000000 R09: 0000000000000000
> [ 709.369182] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
> [ 709.369182] R13: 0000000000000000 R14: 0000000000000000 R15: ffff8800bb663df0
> [ 709.369182] FS: 0000000000000000(0000) GS:ffff88000105e000(0000) knlGS:0000000000000000
> [ 709.369182] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> [ 709.369182] CR2: 00007ffff2051000 CR3: 00000000ba6b6000 CR4: 00000000000006e0
> [ 709.369182] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [ 709.369182] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> [ 709.369182] Process kacpi_notify (pid: 66, threadinfo ffff8800bb662000, task ffff8800bb658f40)
> [ 709.369182] Stack:
> [ 709.369182] 0000000000000000 0000000000000000 ffff8800bb663e20 ffffffffa0203292
> [ 709.369182] ffff8800bb659548 0000000000000246 0000000000000202 ffff8800b729e2f8
> [ 709.369182] ffff8800b5371898 ffff8800bb658f40 ffff880001058ec0 ffffffff803b5596
> [ 709.369182] Call Trace:
> [ 709.369182] [<ffffffffa0203292>] sony_nc_notify+0x222/0x260 [sony_laptop]
> [ 709.369182] [<ffffffff803b5596>] ? acpi_os_execute_deferred+0x0/0x39
> [ 709.369182] [<ffffffff803b8192>] acpi_device_notify+0x14/0x16

I wonder if sony has a race condition somewhere against itself.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-06-04 15:55:39

by Reinette Chatre

[permalink] [raw]
Subject: Re: [RFT 1/3] iwlwifi: port to cfg80211 rfkill

Hi Johannes,

On Thu, 2009-06-04 at 02:03 -0700, Johannes Berg wrote:
> > In summary the testing went very well. There was that one gpf that
> > clouded the testing a bit. I have no idea how it can be connected to the
> > rfkill work though because the error appear to be contained in the
> > sony-laptop module.
>
> That looks like an error in sony-laptop, indeed. Should we go ahead with
> the iwlwifi part then?

Please do. Please feel free to add my "tested-by" when you do so. Is it
possible to get this into 2.6.31?

I'll submit a bug for the issue I saw in sony-laptop and try to help to
get it resolved independently.

Reinette