diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 6 |
3 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index da51349cbd8b..342a269b8abb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -249,3 +249,24 @@ int iwl_setup(struct iwl_priv *priv) | |||
249 | } | 249 | } |
250 | EXPORT_SYMBOL(iwl_setup); | 250 | EXPORT_SYMBOL(iwl_setup); |
251 | 251 | ||
252 | /* Low level driver call this function to update iwlcore with | ||
253 | * driver status. | ||
254 | */ | ||
255 | int iwlcore_low_level_notify(struct iwl_priv *priv, | ||
256 | enum iwlcore_card_notify notify) | ||
257 | { | ||
258 | switch (notify) { | ||
259 | case IWLCORE_INIT_EVT: | ||
260 | break; | ||
261 | case IWLCORE_START_EVT: | ||
262 | break; | ||
263 | case IWLCORE_STOP_EVT: | ||
264 | break; | ||
265 | case IWLCORE_REMOVE_EVT: | ||
266 | break; | ||
267 | } | ||
268 | |||
269 | return 0; | ||
270 | } | ||
271 | EXPORT_SYMBOL(iwlcore_low_level_notify); | ||
272 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index ce7f90ebf367..4dfa05948d73 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -146,4 +146,13 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len, | |||
146 | struct iwl_cmd *cmd, | 146 | struct iwl_cmd *cmd, |
147 | struct sk_buff *skb)); | 147 | struct sk_buff *skb)); |
148 | 148 | ||
149 | enum iwlcore_card_notify { | ||
150 | IWLCORE_INIT_EVT = 0, | ||
151 | IWLCORE_START_EVT = 1, | ||
152 | IWLCORE_STOP_EVT = 2, | ||
153 | IWLCORE_REMOVE_EVT = 3, | ||
154 | }; | ||
155 | |||
156 | int iwlcore_low_level_notify(struct iwl_priv *priv, | ||
157 | enum iwlcore_card_notify notify); | ||
149 | #endif /* __iwl_core_h__ */ | 158 | #endif /* __iwl_core_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index cf56b95dd221..5261b6179a86 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -5724,6 +5724,7 @@ static void iwl4965_alive_start(struct iwl_priv *priv) | |||
5724 | if (priv->error_recovering) | 5724 | if (priv->error_recovering) |
5725 | iwl4965_error_recovery(priv); | 5725 | iwl4965_error_recovery(priv); |
5726 | 5726 | ||
5727 | iwlcore_low_level_notify(priv, IWLCORE_START_EVT); | ||
5727 | return; | 5728 | return; |
5728 | 5729 | ||
5729 | restart: | 5730 | restart: |
@@ -5747,6 +5748,8 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
5747 | 5748 | ||
5748 | iwl_leds_unregister(priv); | 5749 | iwl_leds_unregister(priv); |
5749 | 5750 | ||
5751 | iwlcore_low_level_notify(priv, IWLCORE_STOP_EVT); | ||
5752 | |||
5750 | iwlcore_clear_stations_table(priv); | 5753 | iwlcore_clear_stations_table(priv); |
5751 | 5754 | ||
5752 | /* Unblock any waiting calls */ | 5755 | /* Unblock any waiting calls */ |
@@ -8167,6 +8170,8 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8167 | pci_save_state(pdev); | 8170 | pci_save_state(pdev); |
8168 | pci_disable_device(pdev); | 8171 | pci_disable_device(pdev); |
8169 | 8172 | ||
8173 | /* notify iwlcore to init */ | ||
8174 | iwlcore_low_level_notify(priv, IWLCORE_INIT_EVT); | ||
8170 | return 0; | 8175 | return 0; |
8171 | 8176 | ||
8172 | out_remove_sysfs: | 8177 | out_remove_sysfs: |
@@ -8209,6 +8214,7 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
8209 | } | 8214 | } |
8210 | } | 8215 | } |
8211 | 8216 | ||
8217 | iwlcore_low_level_notify(priv, IWLCORE_REMOVE_EVT); | ||
8212 | iwl_dbgfs_unregister(priv); | 8218 | iwl_dbgfs_unregister(priv); |
8213 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 8219 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); |
8214 | 8220 | ||