2008-03-07 02:40:19 +08:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* GPL LICENSE SUMMARY
|
|
|
|
*
|
|
|
|
* Copyright(c) 2008 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* 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.GPL.
|
|
|
|
*
|
|
|
|
* Contact Information:
|
|
|
|
* Tomas Winkler <tomas.winkler@intel.com>
|
|
|
|
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/version.h>
|
2008-03-15 01:38:48 +08:00
|
|
|
#include <net/mac80211.h>
|
2008-03-07 02:40:19 +08:00
|
|
|
|
2008-03-13 07:58:52 +08:00
|
|
|
struct iwl_priv; /* FIXME: remove */
|
2008-03-13 07:58:49 +08:00
|
|
|
#include "iwl-debug.h"
|
2008-03-12 07:17:18 +08:00
|
|
|
#include "iwl-eeprom.h"
|
2008-03-07 02:40:19 +08:00
|
|
|
#include "iwl-core.h"
|
|
|
|
|
2008-03-15 01:38:48 +08:00
|
|
|
#include "iwl-4965.h" /* FIXME: remove */
|
|
|
|
|
2008-03-07 02:40:19 +08:00
|
|
|
MODULE_DESCRIPTION("iwl core");
|
|
|
|
MODULE_VERSION(IWLWIFI_VERSION);
|
|
|
|
MODULE_AUTHOR(DRV_COPYRIGHT);
|
2008-03-13 07:58:52 +08:00
|
|
|
MODULE_LICENSE("GPL");
|
2008-03-07 02:40:19 +08:00
|
|
|
|
2008-03-13 07:58:49 +08:00
|
|
|
#ifdef CONFIG_IWLWIFI_DEBUG
|
|
|
|
u32 iwl_debug_level;
|
|
|
|
EXPORT_SYMBOL(iwl_debug_level);
|
2008-03-07 02:40:19 +08:00
|
|
|
#endif
|
2008-03-15 01:38:48 +08:00
|
|
|
|
|
|
|
/* This function both allocates and initializes hw and priv. */
|
|
|
|
struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
|
|
|
|
struct ieee80211_ops *hw_ops)
|
|
|
|
{
|
|
|
|
struct iwl_priv *priv;
|
|
|
|
|
|
|
|
/* mac80211 allocates memory for this device instance, including
|
|
|
|
* space for this driver's private structure */
|
|
|
|
struct ieee80211_hw *hw =
|
|
|
|
ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops);
|
|
|
|
if (hw == NULL) {
|
|
|
|
IWL_ERROR("Can not allocate network device\n");
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
priv = hw->priv;
|
|
|
|
priv->hw = hw;
|
|
|
|
|
|
|
|
out:
|
|
|
|
return hw;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(iwl_alloc_all);
|
|
|
|
|