--- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-priv.h.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-priv.h 2007-07-02 15:04:00.000000000 -0400 @@ -258,12 +258,12 @@ struct iwl_priv { struct tasklet_struct irq_tasklet; - struct delayed_work init_alive_start; - struct delayed_work alive_start; - struct delayed_work activity_timer; - struct delayed_work thermal_periodic; - struct delayed_work gather_stats; - struct delayed_work scan_check; + struct work_struct init_alive_start; + struct work_struct alive_start; + struct work_struct activity_timer; + struct work_struct thermal_periodic; + struct work_struct gather_stats; + struct work_struct scan_check; #define IWL_DEFAULT_TX_POWER 0x0F s8 user_txpower_limit; --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-3945.h.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-3945.h 2007-07-02 15:02:53.000000000 -0400 @@ -35,7 +35,7 @@ static inline int iwl3945_init_hw_rate_table(struct iwl_priv *priv) { return 0; } static inline void iwl3945_reg_txpower_periodic(struct iwl_priv *priv) {} -static inline void iwl3945_bg_reg_txpower_periodic(struct work_struct *work) +static inline void iwl3945_bg_reg_txpower_periodic(void *p) {} static inline int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv) { return 0; } @@ -45,7 +45,7 @@ static inline int iwl3945_txpower_set_fr */ extern int iwl3945_init_hw_rate_table(struct iwl_priv *priv); extern void iwl3945_reg_txpower_periodic(struct iwl_priv *priv); -extern void iwl3945_bg_reg_txpower_periodic(struct work_struct *work); +extern void iwl3945_bg_reg_txpower_periodic(void *p); extern int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv); #endif /* IWL == 3945 */ --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/base.c.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/base.c 2007-07-02 15:09:08.000000000 -0400 @@ -3422,7 +3422,7 @@ static void iwl_rx_reply_alive(struct iw { struct iwl_rx_packet *pkt = (void *)rxb->skb->data; struct iwl_alive_resp *palive; - struct delayed_work *pwork; + struct work_struct *pwork; palive = &pkt->u.alive_frame; @@ -4687,7 +4687,7 @@ static void iwl_irq_tasklet(struct iwl_p spin_unlock_irqrestore(&priv->lock, flags); } -static irqreturn_t iwl_isr(int irq, void *data) +static irqreturn_t iwl_isr(int irq, void *data, struct pt_regs *regs) { struct iwl_priv *priv = data; u32 inta, inta_mask; @@ -6411,10 +6411,9 @@ static int iwl_up(struct iwl_priv *priv) * *****************************************************************************/ -static void iwl_bg_init_alive_start(struct work_struct *data) +static void iwl_bg_init_alive_start(void *p) { - struct iwl_priv *priv = - container_of(data, struct iwl_priv, init_alive_start.work); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6424,10 +6423,9 @@ static void iwl_bg_init_alive_start(stru mutex_unlock(&priv->mutex); } -static void iwl_bg_alive_start(struct work_struct *data) +static void iwl_bg_alive_start(void *p) { - struct iwl_priv *priv = - container_of(data, struct iwl_priv, alive_start.work); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6437,9 +6435,9 @@ static void iwl_bg_alive_start(struct wo mutex_unlock(&priv->mutex); } -static void iwl_bg_rf_kill(struct work_struct *work) +static void iwl_bg_rf_kill(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill); + struct iwl_priv *priv = p; wake_up_interruptible(&priv->wait_command_queue); @@ -6471,10 +6469,9 @@ static void iwl_bg_rf_kill(struct work_s #define IWL_SCAN_CHECK_WATCHDOG (7 * HZ) -static void iwl_bg_scan_check(struct work_struct *data) +static void iwl_bg_scan_check(void *p) { - struct iwl_priv *priv = - container_of(data, struct iwl_priv, scan_check.work); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6491,10 +6488,9 @@ static void iwl_bg_scan_check(struct wor mutex_unlock(&priv->mutex); } -static void iwl_bg_request_scan(struct work_struct *data) +static void iwl_bg_request_scan(void *p) { - struct iwl_priv *priv = - container_of(data, struct iwl_priv, request_scan); + struct iwl_priv *priv = p; struct iwl_host_cmd cmd = { .id = REPLY_SCAN_CMD, .len = sizeof(struct iwl_scan_cmd), @@ -6700,9 +6696,9 @@ static void iwl_bg_request_scan(struct w mutex_unlock(&priv->mutex); } -static void iwl_bg_up(struct work_struct *data) +static void iwl_bg_up(void *p) { - struct iwl_priv *priv = container_of(data, struct iwl_priv, up); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6712,9 +6708,9 @@ static void iwl_bg_up(struct work_struct mutex_unlock(&priv->mutex); } -static void iwl_bg_restart(struct work_struct *data) +static void iwl_bg_restart(void *p) { - struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6726,10 +6722,9 @@ static void iwl_bg_restart(struct work_s queue_work(priv->workqueue, &priv->up); } -static void iwl_bg_rx_replenish(struct work_struct *data) +static void iwl_bg_rx_replenish(void *p) { - struct iwl_priv *priv = - container_of(data, struct iwl_priv, rx_replenish); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -6739,10 +6734,9 @@ static void iwl_bg_rx_replenish(struct w mutex_unlock(&priv->mutex); } -static void iwl_bg_post_associate(struct work_struct *data) +static void iwl_bg_post_associate(void *p) { - struct iwl_priv *priv = container_of(data, struct iwl_priv, - post_associate); + struct iwl_priv *priv = p; int rc = 0; struct ieee80211_conf *conf = NULL; @@ -6857,10 +6851,9 @@ static void iwl_bg_post_associate(struct mutex_unlock(&priv->mutex); } -static void iwl_bg_abort_scan(struct work_struct *work) +static void iwl_bg_abort_scan(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - abort_scan); + struct iwl_priv *priv = p; if (!iwl_is_ready(priv)) return; @@ -6874,10 +6867,9 @@ static void iwl_bg_abort_scan(struct wor mutex_unlock(&priv->mutex); } -static void iwl_bg_scan_completed(struct work_struct *work) +static void iwl_bg_scan_completed(void *p) { - struct iwl_priv *priv = - container_of(work, struct iwl_priv, scan_completed); + struct iwl_priv *priv = p; IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n"); @@ -7157,7 +7149,7 @@ static int d_config_interface(struct iee /* FIXME: The unlock here is a patch. the Locks * should be moved out of iwl_bg_post_associate */ mutex_unlock(&priv->mutex); - iwl_bg_post_associate(&priv->post_associate); + iwl_bg_post_associate(priv); mutex_lock(&priv->mutex); } } else { @@ -8336,18 +8328,18 @@ static void iwl_setup_deferred_work(stru init_waitqueue_head(&priv->wait_command_queue); - 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->scan_completed, iwl_bg_scan_completed); - INIT_WORK(&priv->request_scan, iwl_bg_request_scan); - INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); - INIT_WORK(&priv->rf_kill, iwl_bg_rf_kill); - INIT_WORK(&priv->post_associate, iwl_bg_post_associate); - INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); - INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); - INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); - INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); + INIT_WORK(&priv->up, iwl_bg_up, priv); + INIT_WORK(&priv->restart, iwl_bg_restart, priv); + INIT_WORK(&priv->rx_replenish, iwl_bg_rx_replenish, priv); + INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed, priv); + INIT_WORK(&priv->request_scan, iwl_bg_request_scan, priv); + INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan, priv); + INIT_WORK(&priv->rf_kill, iwl_bg_rf_kill, priv); + INIT_WORK(&priv->post_associate, iwl_bg_post_associate, priv); + INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed, priv); + INIT_WORK(&priv->init_alive_start, iwl_bg_init_alive_start, priv); + INIT_WORK(&priv->alive_start, iwl_bg_alive_start, priv); + INIT_WORK(&priv->scan_check, iwl_bg_scan_check, priv); iwl_hw_setup_deferred_work(priv); --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/Kconfig.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/Kconfig 2007-07-02 15:02:53.000000000 -0400 @@ -1,6 +1,6 @@ config IWLWIFI bool "Intel Wireless WiFi Link Drivers" - depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL + depends on PCI && MAC80211 && NET_RADIO && EXPERIMENTAL select FW_LOADER default n ---help--- --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-4965.c 2007-07-02 15:06:50.000000000 -0400 @@ -696,10 +696,9 @@ static void iwl4965_bg_statistics_period * * This is queued by iwl_bg_statistics_periodic. */ -static void iwl4965_bg_statistics_work(struct work_struct *work) +static void iwl4965_bg_statistics_work(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - statistics_work); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -1658,10 +1657,9 @@ static void iwl4965_sensitivity_calibrat return; } -static void iwl4965_bg_sensitivity_work(struct work_struct *work) +static void iwl4965_bg_sensitivity_work(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - sensitivity_work); + struct iwl_priv *priv = p; mutex_lock(&priv->mutex); @@ -1687,10 +1685,9 @@ static void iwl4965_bg_sensitivity_work( } #endif /*CONFIG_IWLWIFI_SENSITIVITY*/ -static void iwl4965_bg_txpower_work(struct work_struct *work) +static void iwl4965_bg_txpower_work(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - txpower_work); + struct iwl_priv *priv = p; mutex_lock(&priv->mutex); @@ -4002,13 +3999,13 @@ void iwl_hw_rx_handler_setup(struct iwl_ void iwl_hw_setup_deferred_work(struct iwl_priv *priv) { - INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); - INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work); + INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work, priv); + INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work, priv); #ifdef CONFIG_IWLWIFI_SENSITIVITY - INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work); + INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work, priv); #endif #ifdef CONFIG_IWLWIFI_HT_AGG - INIT_WORK(&priv->agg_work, iwl4965_bg_agg_work); + INIT_WORK(&priv->agg_work, iwl4965_bg_agg_work, priv); #endif init_timer(&priv->statistics_periodic); priv->statistics_periodic.data = (unsigned long)priv; --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c.orig 2007-07-02 14:59:21.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-3945.c 2007-07-02 15:02:53.000000000 -0400 @@ -1668,10 +1668,9 @@ void iwl3945_reg_txpower_periodic(struct &priv->thermal_periodic, REG_RECALIB_PERIOD * HZ); } -void iwl3945_bg_reg_txpower_periodic(struct work_struct *work) +void iwl3945_bg_reg_txpower_periodic(void *p) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - thermal_periodic.work); + struct iwl_priv *priv = p; if (priv->status & STATUS_EXIT_PENDING) return; @@ -2180,8 +2179,8 @@ void iwl_hw_rx_handler_setup(struct iwl_ void iwl_hw_setup_deferred_work(struct iwl_priv *priv) { - INIT_DELAYED_WORK(&priv->thermal_periodic, - iwl3945_bg_reg_txpower_periodic); + INIT_WORK(&priv->thermal_periodic, + iwl3945_bg_reg_txpower_periodic, priv); } void iwl_hw_cancel_deferred_work(struct iwl_priv *priv)