]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/iwlwifi/iwl-core.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / net / wireless / iwlwifi / iwl-core.c
index da51349cbd8b6b989a6ce6ebdc0209618881ce84..d8a226e68ed1645a23cef1c0de7dbe7db7444124 100644 (file)
 struct iwl_priv; /* FIXME: remove */
 #include "iwl-debug.h"
 #include "iwl-eeprom.h"
+#include "iwl-4965.h" /* FIXME: remove */
 #include "iwl-core.h"
+#include "iwl-rfkill.h"
 
-#include "iwl-4965.h" /* FIXME: remove */
 
 MODULE_DESCRIPTION("iwl core");
 MODULE_VERSION(IWLWIFI_VERSION);
@@ -249,3 +250,30 @@ int iwl_setup(struct iwl_priv *priv)
 }
 EXPORT_SYMBOL(iwl_setup);
 
+/* Low level driver call this function to update iwlcore with
+ * driver status.
+ */
+int iwlcore_low_level_notify(struct iwl_priv *priv,
+                             enum iwlcore_card_notify notify)
+{
+       int ret;
+       switch (notify) {
+       case IWLCORE_INIT_EVT:
+               ret = iwl_rfkill_init(priv);
+               if (ret)
+                       IWL_ERROR("Unable to initialize RFKILL system. "
+                                 "Ignoring error: %d\n", ret);
+               break;
+       case IWLCORE_START_EVT:
+               break;
+       case IWLCORE_STOP_EVT:
+               break;
+       case IWLCORE_REMOVE_EVT:
+               iwl_rfkill_unregister(priv);
+               break;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL(iwlcore_low_level_notify);
+