blob: 244318af53fcb3043fea520884a06c85418a96c1 [file] [log] [blame]
Tomas Winklerdf48c322008-03-06 10:40:19 -08001/******************************************************************************
2 *
Tomas Winklerdf48c322008-03-06 10:40:19 -08003 * GPL LICENSE SUMMARY
4 *
5 * Copyright(c) 2008 Intel Corporation. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of version 2 of the GNU General Public License as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
19 * USA
20 *
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
23 *
24 * Contact Information:
25 * Tomas Winkler <tomas.winkler@intel.com>
26 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27 *****************************************************************************/
28
29#include <linux/kernel.h>
30#include <linux/module.h>
31#include <linux/version.h>
Assaf Krauss1d0a0822008-03-14 10:38:48 -070032#include <net/mac80211.h>
Tomas Winklerdf48c322008-03-06 10:40:19 -080033
Tomas Winkler712b6cf2008-03-12 16:58:52 -070034struct iwl_priv; /* FIXME: remove */
Tomas Winkler0a6857e2008-03-12 16:58:49 -070035#include "iwl-debug.h"
Assaf Krauss6bc913b2008-03-11 16:17:18 -070036#include "iwl-eeprom.h"
Tomas Winklerdf48c322008-03-06 10:40:19 -080037#include "iwl-core.h"
38
Assaf Krauss1d0a0822008-03-14 10:38:48 -070039#include "iwl-4965.h" /* FIXME: remove */
40
Tomas Winklerdf48c322008-03-06 10:40:19 -080041MODULE_DESCRIPTION("iwl core");
42MODULE_VERSION(IWLWIFI_VERSION);
43MODULE_AUTHOR(DRV_COPYRIGHT);
Tomas Winkler712b6cf2008-03-12 16:58:52 -070044MODULE_LICENSE("GPL");
Tomas Winklerdf48c322008-03-06 10:40:19 -080045
Tomas Winkler0a6857e2008-03-12 16:58:49 -070046#ifdef CONFIG_IWLWIFI_DEBUG
47u32 iwl_debug_level;
48EXPORT_SYMBOL(iwl_debug_level);
Tomas Winklerdf48c322008-03-06 10:40:19 -080049#endif
Assaf Krauss1d0a0822008-03-14 10:38:48 -070050
51/* This function both allocates and initializes hw and priv. */
52struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
53 struct ieee80211_ops *hw_ops)
54{
55 struct iwl_priv *priv;
56
57 /* mac80211 allocates memory for this device instance, including
58 * space for this driver's private structure */
59 struct ieee80211_hw *hw =
60 ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops);
61 if (hw == NULL) {
62 IWL_ERROR("Can not allocate network device\n");
63 goto out;
64 }
65
66 priv = hw->priv;
67 priv->hw = hw;
68
69out:
70 return hw;
71}
72EXPORT_SYMBOL(iwl_alloc_all);
73