You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"
This reverts commit aa833c4b1a.
This commit is contained in:
@@ -274,7 +274,6 @@ source "drivers/net/wireless/b43legacy/Kconfig"
|
||||
source "drivers/net/wireless/hostap/Kconfig"
|
||||
source "drivers/net/wireless/ipw2x00/Kconfig"
|
||||
source "drivers/net/wireless/iwlwifi/Kconfig"
|
||||
source "drivers/net/wireless/iwlegacy/Kconfig"
|
||||
source "drivers/net/wireless/iwmc3200wifi/Kconfig"
|
||||
source "drivers/net/wireless/libertas/Kconfig"
|
||||
source "drivers/net/wireless/orinoco/Kconfig"
|
||||
|
||||
@@ -41,8 +41,7 @@ obj-$(CONFIG_ADM8211) += adm8211.o
|
||||
|
||||
obj-$(CONFIG_MWL8K) += mwl8k.o
|
||||
|
||||
obj-$(CONFIG_IWLAGN) += iwlwifi/
|
||||
obj-$(CONFIG_IWLWIFI_LEGACY) += iwlegacy/
|
||||
obj-$(CONFIG_IWLWIFI) += iwlwifi/
|
||||
obj-$(CONFIG_RT2X00) += rt2x00/
|
||||
|
||||
obj-$(CONFIG_P54_COMMON) += p54/
|
||||
|
||||
@@ -1,52 +1,18 @@
|
||||
config IWLAGN
|
||||
tristate "Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlagn) "
|
||||
config IWLWIFI
|
||||
tristate "Intel Wireless Wifi"
|
||||
depends on PCI && MAC80211
|
||||
select FW_LOADER
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
select LEDS_TRIGGERS
|
||||
select MAC80211_LEDS
|
||||
---help---
|
||||
Select to build the driver supporting the:
|
||||
|
||||
Intel Wireless WiFi Link Next-Gen AGN
|
||||
|
||||
This option enables support for use with the following hardware:
|
||||
Intel Wireless WiFi Link 6250AGN Adapter
|
||||
Intel 6000 Series Wi-Fi Adapters (6200AGN and 6300AGN)
|
||||
Intel WiFi Link 1000BGN
|
||||
Intel Wireless WiFi 5150AGN
|
||||
Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
|
||||
Intel 6005 Series Wi-Fi Adapters
|
||||
Intel 6030 Series Wi-Fi Adapters
|
||||
Intel Wireless WiFi Link 6150BGN 2 Adapter
|
||||
Intel 100 Series Wi-Fi Adapters (100BGN and 130BGN)
|
||||
Intel 2000 Series Wi-Fi Adapters
|
||||
|
||||
|
||||
This driver uses the kernel's mac80211 subsystem.
|
||||
|
||||
In order to use this driver, you will need a microcode (uCode)
|
||||
image for it. You can obtain the microcode from:
|
||||
|
||||
<http://intellinuxwireless.org/>.
|
||||
|
||||
The microcode is typically installed in /lib/firmware. You can
|
||||
look in the hotplug script /etc/hotplug/firmware.agent to
|
||||
determine which directory FIRMWARE_DIR is set to when the script
|
||||
runs.
|
||||
|
||||
If you want to compile the driver as a module ( = code which can be
|
||||
inserted in and removed from the running kernel whenever you want),
|
||||
say M here and read <file:Documentation/kbuild/modules.txt>. The
|
||||
module will be called iwlagn.
|
||||
|
||||
menu "Debugging Options"
|
||||
depends on IWLAGN
|
||||
depends on IWLWIFI
|
||||
|
||||
config IWLWIFI_DEBUG
|
||||
bool "Enable full debugging output in the iwlagn driver"
|
||||
depends on IWLAGN
|
||||
bool "Enable full debugging output in iwlagn and iwl3945 drivers"
|
||||
depends on IWLWIFI
|
||||
---help---
|
||||
This option will enable debug tracing output for the iwlwifi drivers
|
||||
|
||||
@@ -71,7 +37,7 @@ config IWLWIFI_DEBUG
|
||||
|
||||
config IWLWIFI_DEBUGFS
|
||||
bool "iwlagn debugfs support"
|
||||
depends on IWLAGN && MAC80211_DEBUGFS
|
||||
depends on IWLWIFI && MAC80211_DEBUGFS
|
||||
---help---
|
||||
Enable creation of debugfs files for the iwlwifi drivers. This
|
||||
is a low-impact option that allows getting insight into the
|
||||
@@ -79,13 +45,13 @@ config IWLWIFI_DEBUGFS
|
||||
|
||||
config IWLWIFI_DEBUG_EXPERIMENTAL_UCODE
|
||||
bool "Experimental uCode support"
|
||||
depends on IWLAGN && IWLWIFI_DEBUG
|
||||
depends on IWLWIFI && IWLWIFI_DEBUG
|
||||
---help---
|
||||
Enable use of experimental ucode for testing and debugging.
|
||||
|
||||
config IWLWIFI_DEVICE_TRACING
|
||||
bool "iwlwifi device access tracing"
|
||||
depends on IWLAGN
|
||||
depends on IWLWIFI
|
||||
depends on EVENT_TRACING
|
||||
help
|
||||
Say Y here to trace all commands, including TX frames and IO
|
||||
@@ -102,9 +68,57 @@ config IWLWIFI_DEVICE_TRACING
|
||||
occur.
|
||||
endmenu
|
||||
|
||||
config IWLAGN
|
||||
tristate "Intel Wireless WiFi Next Gen AGN (iwlagn)"
|
||||
depends on IWLWIFI
|
||||
---help---
|
||||
Select to build the driver supporting the:
|
||||
|
||||
Intel Wireless WiFi Link Next-Gen AGN
|
||||
|
||||
This driver uses the kernel's mac80211 subsystem.
|
||||
|
||||
In order to use this driver, you will need a microcode (uCode)
|
||||
image for it. You can obtain the microcode from:
|
||||
|
||||
<http://intellinuxwireless.org/>.
|
||||
|
||||
The microcode is typically installed in /lib/firmware. You can
|
||||
look in the hotplug script /etc/hotplug/firmware.agent to
|
||||
determine which directory FIRMWARE_DIR is set to when the script
|
||||
runs.
|
||||
|
||||
If you want to compile the driver as a module ( = code which can be
|
||||
inserted in and removed from the running kernel whenever you want),
|
||||
say M here and read <file:Documentation/kbuild/modules.txt>. The
|
||||
module will be called iwlagn.
|
||||
|
||||
|
||||
config IWL4965
|
||||
bool "Intel Wireless WiFi 4965AGN"
|
||||
depends on IWLAGN
|
||||
---help---
|
||||
This option enables support for Intel Wireless WiFi Link 4965AGN
|
||||
|
||||
config IWL5000
|
||||
bool "Intel Wireless-N/Advanced-N/Ultimate-N WiFi Link"
|
||||
depends on IWLAGN
|
||||
---help---
|
||||
This option enables support for use with the following hardware:
|
||||
Intel Wireless WiFi Link 6250AGN Adapter
|
||||
Intel 6000 Series Wi-Fi Adapters (6200AGN and 6300AGN)
|
||||
Intel WiFi Link 1000BGN
|
||||
Intel Wireless WiFi 5150AGN
|
||||
Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
|
||||
Intel 6005 Series Wi-Fi Adapters
|
||||
Intel 6030 Series Wi-Fi Adapters
|
||||
Intel Wireless WiFi Link 6150BGN 2 Adapter
|
||||
Intel 100 Series Wi-Fi Adapters (100BGN and 130BGN)
|
||||
Intel 2000 Series Wi-Fi Adapters
|
||||
|
||||
config IWL_P2P
|
||||
bool "iwlwifi experimental P2P support"
|
||||
depends on IWLAGN
|
||||
depends on IWL5000
|
||||
help
|
||||
This option enables experimental P2P support for some devices
|
||||
based on microcode support. Since P2P support is still under
|
||||
@@ -118,3 +132,27 @@ config IWL_P2P
|
||||
|
||||
Say Y only if you want to experiment with P2P.
|
||||
|
||||
config IWL3945
|
||||
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
|
||||
depends on IWLWIFI
|
||||
---help---
|
||||
Select to build the driver supporting the:
|
||||
|
||||
Intel PRO/Wireless 3945ABG/BG Network Connection
|
||||
|
||||
This driver uses the kernel's mac80211 subsystem.
|
||||
|
||||
In order to use this driver, you will need a microcode (uCode)
|
||||
image for it. You can obtain the microcode from:
|
||||
|
||||
<http://intellinuxwireless.org/>.
|
||||
|
||||
The microcode is typically installed in /lib/firmware. You can
|
||||
look in the hotplug script /etc/hotplug/firmware.agent to
|
||||
determine which directory FIRMWARE_DIR is set to when the script
|
||||
runs.
|
||||
|
||||
If you want to compile the driver as a module ( = code which can be
|
||||
inserted in and removed from the running kernel whenever you want),
|
||||
say M here and read <file:Documentation/kbuild/modules.txt>. The
|
||||
module will be called iwl3945.
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
obj-$(CONFIG_IWLWIFI) += iwlcore.o
|
||||
iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
|
||||
iwlcore-objs += iwl-rx.o iwl-tx.o iwl-sta.o
|
||||
iwlcore-objs += iwl-scan.o iwl-led.o
|
||||
iwlcore-$(CONFIG_IWL3945) += iwl-legacy.o
|
||||
iwlcore-$(CONFIG_IWL4965) += iwl-legacy.o
|
||||
iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
|
||||
iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
|
||||
|
||||
# If 3945 is selected only, iwl-legacy.o will be added
|
||||
# to iwlcore-m above, but it needs to be built in.
|
||||
iwlcore-objs += $(iwlcore-m)
|
||||
|
||||
CFLAGS_iwl-devtrace.o := -I$(src)
|
||||
|
||||
# AGN
|
||||
obj-$(CONFIG_IWLAGN) += iwlagn.o
|
||||
iwlagn-objs := iwl-agn.o iwl-agn-rs.o iwl-agn-led.o
|
||||
iwlagn-objs += iwl-agn-ucode.o iwl-agn-tx.o
|
||||
iwlagn-objs += iwl-agn-lib.o iwl-agn-rx.o iwl-agn-calib.o
|
||||
iwlagn-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-eeprom.o
|
||||
|
||||
iwlagn-objs += iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
|
||||
iwlagn-objs += iwl-rx.o iwl-tx.o iwl-sta.o
|
||||
iwlagn-objs += iwl-scan.o iwl-led.o
|
||||
iwlagn-objs += iwl-agn-rxon.o iwl-agn-hcmd.o iwl-agn-ict.o
|
||||
iwlagn-objs += iwl-5000.o
|
||||
iwlagn-objs += iwl-6000.o
|
||||
iwlagn-objs += iwl-1000.o
|
||||
iwlagn-objs += iwl-2000.o
|
||||
|
||||
iwlagn-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-agn-debugfs.o
|
||||
iwlagn-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
|
||||
iwlagn-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
|
||||
|
||||
CFLAGS_iwl-devtrace.o := -I$(src)
|
||||
iwlagn-$(CONFIG_IWL4965) += iwl-4965.o
|
||||
iwlagn-$(CONFIG_IWL5000) += iwl-agn-rxon.o iwl-agn-hcmd.o iwl-agn-ict.o
|
||||
iwlagn-$(CONFIG_IWL5000) += iwl-5000.o
|
||||
iwlagn-$(CONFIG_IWL5000) += iwl-6000.o
|
||||
iwlagn-$(CONFIG_IWL5000) += iwl-1000.o
|
||||
iwlagn-$(CONFIG_IWL5000) += iwl-2000.o
|
||||
|
||||
# 3945
|
||||
obj-$(CONFIG_IWL3945) += iwl3945.o
|
||||
iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o iwl-3945-led.o
|
||||
iwl3945-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-3945-debugfs.o
|
||||
|
||||
ccflags-y += -D__CHECK_ENDIAN__
|
||||
|
||||
522
drivers/net/wireless/iwlwifi/iwl-3945-debugfs.c
Normal file
522
drivers/net/wireless/iwlwifi/iwl-3945-debugfs.c
Normal file
File diff suppressed because it is too large
Load Diff
60
drivers/net/wireless/iwlwifi/iwl-3945-debugfs.h
Normal file
60
drivers/net/wireless/iwlwifi/iwl-3945-debugfs.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* GPL LICENSE SUMMARY
|
||||
*
|
||||
* Copyright(c) 2008 - 2010 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:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*****************************************************************************/
|
||||
|
||||
#include "iwl-dev.h"
|
||||
#include "iwl-core.h"
|
||||
#include "iwl-debug.h"
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
ssize_t iwl3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t iwl3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos);
|
||||
ssize_t iwl3945_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos);
|
||||
#else
|
||||
static ssize_t iwl3945_ucode_rx_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static ssize_t iwl3945_ucode_tx_stats_read(struct file *file,
|
||||
char __user *user_buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static ssize_t iwl3945_ucode_general_stats_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
188
drivers/net/wireless/iwlwifi/iwl-3945-fh.h
Normal file
188
drivers/net/wireless/iwlwifi/iwl-3945-fh.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
*
|
||||
* GPL LICENSE SUMMARY
|
||||
*
|
||||
* Copyright(c) 2005 - 2010 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:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright(c) 2005 - 2010 Intel Corporation. All rights reserved.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __iwl_3945_fh_h__
|
||||
#define __iwl_3945_fh_h__
|
||||
|
||||
/************************************/
|
||||
/* iwl3945 Flow Handler Definitions */
|
||||
/************************************/
|
||||
|
||||
/**
|
||||
* This I/O area is directly read/writable by driver (e.g. Linux uses writel())
|
||||
* Addresses are offsets from device's PCI hardware base address.
|
||||
*/
|
||||
#define FH39_MEM_LOWER_BOUND (0x0800)
|
||||
#define FH39_MEM_UPPER_BOUND (0x1000)
|
||||
|
||||
#define FH39_CBCC_TABLE (FH39_MEM_LOWER_BOUND + 0x140)
|
||||
#define FH39_TFDB_TABLE (FH39_MEM_LOWER_BOUND + 0x180)
|
||||
#define FH39_RCSR_TABLE (FH39_MEM_LOWER_BOUND + 0x400)
|
||||
#define FH39_RSSR_TABLE (FH39_MEM_LOWER_BOUND + 0x4c0)
|
||||
#define FH39_TCSR_TABLE (FH39_MEM_LOWER_BOUND + 0x500)
|
||||
#define FH39_TSSR_TABLE (FH39_MEM_LOWER_BOUND + 0x680)
|
||||
|
||||
/* TFDB (Transmit Frame Buffer Descriptor) */
|
||||
#define FH39_TFDB(_ch, buf) (FH39_TFDB_TABLE + \
|
||||
((_ch) * 2 + (buf)) * 0x28)
|
||||
#define FH39_TFDB_CHNL_BUF_CTRL_REG(_ch) (FH39_TFDB_TABLE + 0x50 * (_ch))
|
||||
|
||||
/* CBCC channel is [0,2] */
|
||||
#define FH39_CBCC(_ch) (FH39_CBCC_TABLE + (_ch) * 0x8)
|
||||
#define FH39_CBCC_CTRL(_ch) (FH39_CBCC(_ch) + 0x00)
|
||||
#define FH39_CBCC_BASE(_ch) (FH39_CBCC(_ch) + 0x04)
|
||||
|
||||
/* RCSR channel is [0,2] */
|
||||
#define FH39_RCSR(_ch) (FH39_RCSR_TABLE + (_ch) * 0x40)
|
||||
#define FH39_RCSR_CONFIG(_ch) (FH39_RCSR(_ch) + 0x00)
|
||||
#define FH39_RCSR_RBD_BASE(_ch) (FH39_RCSR(_ch) + 0x04)
|
||||
#define FH39_RCSR_WPTR(_ch) (FH39_RCSR(_ch) + 0x20)
|
||||
#define FH39_RCSR_RPTR_ADDR(_ch) (FH39_RCSR(_ch) + 0x24)
|
||||
|
||||
#define FH39_RSCSR_CHNL0_WPTR (FH39_RCSR_WPTR(0))
|
||||
|
||||
/* RSSR */
|
||||
#define FH39_RSSR_CTRL (FH39_RSSR_TABLE + 0x000)
|
||||
#define FH39_RSSR_STATUS (FH39_RSSR_TABLE + 0x004)
|
||||
|
||||
/* TCSR */
|
||||
#define FH39_TCSR(_ch) (FH39_TCSR_TABLE + (_ch) * 0x20)
|
||||
#define FH39_TCSR_CONFIG(_ch) (FH39_TCSR(_ch) + 0x00)
|
||||
#define FH39_TCSR_CREDIT(_ch) (FH39_TCSR(_ch) + 0x04)
|
||||
#define FH39_TCSR_BUFF_STTS(_ch) (FH39_TCSR(_ch) + 0x08)
|
||||
|
||||
/* TSSR */
|
||||
#define FH39_TSSR_CBB_BASE (FH39_TSSR_TABLE + 0x000)
|
||||
#define FH39_TSSR_MSG_CONFIG (FH39_TSSR_TABLE + 0x008)
|
||||
#define FH39_TSSR_TX_STATUS (FH39_TSSR_TABLE + 0x010)
|
||||
|
||||
|
||||
/* DBM */
|
||||
|
||||
#define FH39_SRVC_CHNL (6)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_POS_RBDC_SIZE (20)
|
||||
#define FH39_RCSR_RX_CONFIG_REG_POS_IRQ_RBTH (4)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN (0x08000000)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE (0x80000000)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE (0x20000000)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_VAL_MAX_FRAG_SIZE_128 (0x01000000)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_VAL_IRQ_DEST_INT_HOST (0x00001000)
|
||||
|
||||
#define FH39_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH (0x00000000)
|
||||
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000)
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER (0x00000001)
|
||||
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL (0x00000000)
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008)
|
||||
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000)
|
||||
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000)
|
||||
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000)
|
||||
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000)
|
||||
|
||||
#define FH39_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00004000)
|
||||
|
||||
#define FH39_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR (0x00000001)
|
||||
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON (0xFF000000)
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON (0x00FF0000)
|
||||
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B (0x00000400)
|
||||
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON (0x00000100)
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON (0x00000080)
|
||||
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH (0x00000020)
|
||||
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH (0x00000005)
|
||||
|
||||
#define FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_ch) (BIT(_ch) << 24)
|
||||
#define FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch) (BIT(_ch) << 16)
|
||||
|
||||
#define FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_ch) \
|
||||
(FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_ch) | \
|
||||
FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch))
|
||||
|
||||
#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
|
||||
|
||||
struct iwl3945_tfd_tb {
|
||||
__le32 addr;
|
||||
__le32 len;
|
||||
} __packed;
|
||||
|
||||
struct iwl3945_tfd {
|
||||
__le32 control_flags;
|
||||
struct iwl3945_tfd_tb tbs[4];
|
||||
u8 __pad[28];
|
||||
} __packed;
|
||||
|
||||
|
||||
#endif /* __iwl_3945_fh_h__ */
|
||||
|
||||
294
drivers/net/wireless/iwlwifi/iwl-3945-hw.h
Normal file
294
drivers/net/wireless/iwlwifi/iwl-3945-hw.h
Normal file
@@ -0,0 +1,294 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
*
|
||||
* GPL LICENSE SUMMARY
|
||||
*
|
||||
* Copyright(c) 2005 - 2010 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:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright(c) 2005 - 2010 Intel Corporation. All rights reserved.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* Please use this file (iwl-3945-hw.h) only for hardware-related definitions.
|
||||
* Please use iwl-commands.h for uCode API definitions.
|
||||
* Please use iwl-3945.h for driver implementation definitions.
|
||||
*/
|
||||
|
||||
#ifndef __iwl_3945_hw__
|
||||
#define __iwl_3945_hw__
|
||||
|
||||
#include "iwl-eeprom.h"
|
||||
|
||||
/* RSSI to dBm */
|
||||
#define IWL39_RSSI_OFFSET 95
|
||||
|
||||
#define IWL_DEFAULT_TX_POWER 0x0F
|
||||
|
||||
/*
|
||||
* EEPROM related constants, enums, and structures.
|
||||
*/
|
||||
#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7)
|
||||
|
||||
/*
|
||||
* Mapping of a Tx power level, at factory calibration temperature,
|
||||
* to a radio/DSP gain table index.
|
||||
* One for each of 5 "sample" power levels in each band.
|
||||
* v_det is measured at the factory, using the 3945's built-in power amplifier
|
||||
* (PA) output voltage detector. This same detector is used during Tx of
|
||||
* long packets in normal operation to provide feedback as to proper output
|
||||
* level.
|
||||
* Data copied from EEPROM.
|
||||
* DO NOT ALTER THIS STRUCTURE!!!
|
||||
*/
|
||||
struct iwl3945_eeprom_txpower_sample {
|
||||
u8 gain_index; /* index into power (gain) setup table ... */
|
||||
s8 power; /* ... for this pwr level for this chnl group */
|
||||
u16 v_det; /* PA output voltage */
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* Mappings of Tx power levels -> nominal radio/DSP gain table indexes.
|
||||
* One for each channel group (a.k.a. "band") (1 for BG, 4 for A).
|
||||
* Tx power setup code interpolates between the 5 "sample" power levels
|
||||
* to determine the nominal setup for a requested power level.
|
||||
* Data copied from EEPROM.
|
||||
* DO NOT ALTER THIS STRUCTURE!!!
|
||||
*/
|
||||
struct iwl3945_eeprom_txpower_group {
|
||||
struct iwl3945_eeprom_txpower_sample samples[5]; /* 5 power levels */
|
||||
s32 a, b, c, d, e; /* coefficients for voltage->power
|
||||
* formula (signed) */
|
||||
s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on
|
||||
* frequency (signed) */
|
||||
s8 saturation_power; /* highest power possible by h/w in this
|
||||
* band */
|
||||
u8 group_channel; /* "representative" channel # in this band */
|
||||
s16 temperature; /* h/w temperature at factory calib this band
|
||||
* (signed) */
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* Temperature-based Tx-power compensation data, not band-specific.
|
||||
* These coefficients are use to modify a/b/c/d/e coeffs based on
|
||||
* difference between current temperature and factory calib temperature.
|
||||
* Data copied from EEPROM.
|
||||
*/
|
||||
struct iwl3945_eeprom_temperature_corr {
|
||||
u32 Ta;
|
||||
u32 Tb;
|
||||
u32 Tc;
|
||||
u32 Td;
|
||||
u32 Te;
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* EEPROM map
|
||||
*/
|
||||
struct iwl3945_eeprom {
|
||||
u8 reserved0[16];
|
||||
u16 device_id; /* abs.ofs: 16 */
|
||||
u8 reserved1[2];
|
||||
u16 pmc; /* abs.ofs: 20 */
|
||||
u8 reserved2[20];
|
||||
u8 mac_address[6]; /* abs.ofs: 42 */
|
||||
u8 reserved3[58];
|
||||
u16 board_revision; /* abs.ofs: 106 */
|
||||
u8 reserved4[11];
|
||||
u8 board_pba_number[9]; /* abs.ofs: 119 */
|
||||
u8 reserved5[8];
|
||||
u16 version; /* abs.ofs: 136 */
|
||||
u8 sku_cap; /* abs.ofs: 138 */
|
||||
u8 leds_mode; /* abs.ofs: 139 */
|
||||
u16 oem_mode;
|
||||
u16 wowlan_mode; /* abs.ofs: 142 */
|
||||
u16 leds_time_interval; /* abs.ofs: 144 */
|
||||
u8 leds_off_time; /* abs.ofs: 146 */
|
||||
u8 leds_on_time; /* abs.ofs: 147 */
|
||||
u8 almgor_m_version; /* abs.ofs: 148 */
|
||||
u8 antenna_switch_type; /* abs.ofs: 149 */
|
||||
u8 reserved6[42];
|
||||
u8 sku_id[4]; /* abs.ofs: 192 */
|
||||
|
||||
/*
|
||||
* Per-channel regulatory data.
|
||||
*
|
||||
* Each channel that *might* be supported by 3945 or 4965 has a fixed location
|
||||
* in EEPROM containing EEPROM_CHANNEL_* usage flags (LSB) and max regulatory
|
||||
* txpower (MSB).
|
||||
*
|
||||
* Entries immediately below are for 20 MHz channel width. HT40 (40 MHz)
|
||||
* channels (only for 4965, not supported by 3945) appear later in the EEPROM.
|
||||
*
|
||||
* 2.4 GHz channels 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
|
||||
*/
|
||||
u16 band_1_count; /* abs.ofs: 196 */
|
||||
struct iwl_eeprom_channel band_1_channels[14]; /* abs.ofs: 198 */
|
||||
|
||||
/*
|
||||
* 4.9 GHz channels 183, 184, 185, 187, 188, 189, 192, 196,
|
||||
* 5.0 GHz channels 7, 8, 11, 12, 16
|
||||
* (4915-5080MHz) (none of these is ever supported)
|
||||
*/
|
||||
u16 band_2_count; /* abs.ofs: 226 */
|
||||
struct iwl_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
|
||||
|
||||
/*
|
||||
* 5.2 GHz channels 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64
|
||||
* (5170-5320MHz)
|
||||
*/
|
||||
u16 band_3_count; /* abs.ofs: 254 */
|
||||
struct iwl_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
|
||||
|
||||
/*
|
||||
* 5.5 GHz channels 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140
|
||||
* (5500-5700MHz)
|
||||
*/
|
||||
u16 band_4_count; /* abs.ofs: 280 */
|
||||
struct iwl_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
|
||||
|
||||
/*
|
||||
* 5.7 GHz channels 145, 149, 153, 157, 161, 165
|
||||
* (5725-5825MHz)
|
||||
*/
|
||||
u16 band_5_count; /* abs.ofs: 304 */
|
||||
struct iwl_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
|
||||
|
||||
u8 reserved9[194];
|
||||
|
||||
/*
|
||||
* 3945 Txpower calibration data.
|
||||
*/
|
||||
#define IWL_NUM_TX_CALIB_GROUPS 5
|
||||
struct iwl3945_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS];
|
||||
/* abs.ofs: 512 */
|
||||
struct iwl3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */
|
||||
u8 reserved16[172]; /* fill out to full 1024 byte block */
|
||||
} __packed;
|
||||
|
||||
#define IWL3945_EEPROM_IMG_SIZE 1024
|
||||
|
||||
/* End of EEPROM */
|
||||
|
||||
#define PCI_CFG_REV_ID_BIT_BASIC_SKU (0x40) /* bit 6 */
|
||||
#define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */
|
||||
|
||||
/* 4 DATA + 1 CMD. There are 2 HCCA queues that are not used. */
|
||||
#define IWL39_NUM_QUEUES 5
|
||||
#define IWL39_CMD_QUEUE_NUM 4
|
||||
|
||||
#define IWL_DEFAULT_TX_RETRY 15
|
||||
|
||||
/*********************************************/
|
||||
|
||||
#define RFD_SIZE 4
|
||||
#define NUM_TFD_CHUNKS 4
|
||||
|
||||
#define RX_QUEUE_SIZE 256
|
||||
#define RX_QUEUE_MASK 255
|
||||
#define RX_QUEUE_SIZE_LOG 8
|
||||
|
||||
#define U32_PAD(n) ((4-(n))&0x3)
|
||||
|
||||
#define TFD_CTL_COUNT_SET(n) (n << 24)
|
||||
#define TFD_CTL_COUNT_GET(ctl) ((ctl >> 24) & 7)
|
||||
#define TFD_CTL_PAD_SET(n) (n << 28)
|
||||
#define TFD_CTL_PAD_GET(ctl) (ctl >> 28)
|
||||
|
||||
/* Sizes and addresses for instruction and data memory (SRAM) in
|
||||
* 3945's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */
|
||||
#define IWL39_RTC_INST_LOWER_BOUND (0x000000)
|
||||
#define IWL39_RTC_INST_UPPER_BOUND (0x014000)
|
||||
|
||||
#define IWL39_RTC_DATA_LOWER_BOUND (0x800000)
|
||||
#define IWL39_RTC_DATA_UPPER_BOUND (0x808000)
|
||||
|
||||
#define IWL39_RTC_INST_SIZE (IWL39_RTC_INST_UPPER_BOUND - \
|
||||
IWL39_RTC_INST_LOWER_BOUND)
|
||||
#define IWL39_RTC_DATA_SIZE (IWL39_RTC_DATA_UPPER_BOUND - \
|
||||
IWL39_RTC_DATA_LOWER_BOUND)
|
||||
|
||||
#define IWL39_MAX_INST_SIZE IWL39_RTC_INST_SIZE
|
||||
#define IWL39_MAX_DATA_SIZE IWL39_RTC_DATA_SIZE
|
||||
|
||||
/* Size of uCode instruction memory in bootstrap state machine */
|
||||
#define IWL39_MAX_BSM_SIZE IWL39_RTC_INST_SIZE
|
||||
|
||||
static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr)
|
||||
{
|
||||
return (addr >= IWL39_RTC_DATA_LOWER_BOUND) &&
|
||||
(addr < IWL39_RTC_DATA_UPPER_BOUND);
|
||||
}
|
||||
|
||||
/* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE
|
||||
* and &iwl3945_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
|
||||
struct iwl3945_shared {
|
||||
__le32 tx_base_ptr[8];
|
||||
} __packed;
|
||||
|
||||
static inline u8 iwl3945_hw_get_rate(__le16 rate_n_flags)
|
||||
{
|
||||
return le16_to_cpu(rate_n_flags) & 0xFF;
|
||||
}
|
||||
|
||||
static inline u16 iwl3945_hw_get_rate_n_flags(__le16 rate_n_flags)
|
||||
{
|
||||
return le16_to_cpu(rate_n_flags);
|
||||
}
|
||||
|
||||
static inline __le16 iwl3945_hw_set_rate_n_flags(u8 rate, u16 flags)
|
||||
{
|
||||
return cpu_to_le16((u16)rate|flags);
|
||||
}
|
||||
#endif
|
||||
64
drivers/net/wireless/iwlwifi/iwl-3945-led.c
Normal file
64
drivers/net/wireless/iwlwifi/iwl-3945-led.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2010 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.
|
||||
*
|
||||
* Contact Information:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "iwl-commands.h"
|
||||
#include "iwl-3945.h"
|
||||
#include "iwl-core.h"
|
||||
#include "iwl-dev.h"
|
||||
#include "iwl-3945-led.h"
|
||||
|
||||
|
||||
/* Send led command */
|
||||
static int iwl3945_send_led_cmd(struct iwl_priv *priv,
|
||||
struct iwl_led_cmd *led_cmd)
|
||||
{
|
||||
struct iwl_host_cmd cmd = {
|
||||
.id = REPLY_LEDS_CMD,
|
||||
.len = sizeof(struct iwl_led_cmd),
|
||||
.data = led_cmd,
|
||||
.flags = CMD_ASYNC,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
return iwl_send_cmd(priv, &cmd);
|
||||
}
|
||||
|
||||
const struct iwl_led_ops iwl3945_led_ops = {
|
||||
.cmd = iwl3945_send_led_cmd,
|
||||
};
|
||||
32
drivers/net/wireless/iwlwifi/iwl-3945-led.h
Normal file
32
drivers/net/wireless/iwlwifi/iwl-3945-led.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2010 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.
|
||||
*
|
||||
* Contact Information:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __iwl_3945_led_h__
|
||||
#define __iwl_3945_led_h__
|
||||
|
||||
extern const struct iwl_led_ops iwl3945_led_ops;
|
||||
|
||||
#endif /* __iwl_3945_led_h__ */
|
||||
995
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
Normal file
995
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
Normal file
File diff suppressed because it is too large
Load Diff
2819
drivers/net/wireless/iwlwifi/iwl-3945.c
Normal file
2819
drivers/net/wireless/iwlwifi/iwl-3945.c
Normal file
File diff suppressed because it is too large
Load Diff
308
drivers/net/wireless/iwlwifi/iwl-3945.h
Normal file
308
drivers/net/wireless/iwlwifi/iwl-3945.h
Normal file
@@ -0,0 +1,308 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2010 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.
|
||||
*
|
||||
* Contact Information:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* Please use this file (iwl-3945.h) for driver implementation definitions.
|
||||
* Please use iwl-3945-commands.h for uCode API definitions.
|
||||
* Please use iwl-3945-hw.h for hardware-related definitions.
|
||||
*/
|
||||
|
||||
#ifndef __iwl_3945_h__
|
||||
#define __iwl_3945_h__
|
||||
|
||||
#include <linux/pci.h> /* for struct pci_device_id */
|
||||
#include <linux/kernel.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
|
||||
/* Hardware specific file defines the PCI IDs table for that hardware module */
|
||||
extern const struct pci_device_id iwl3945_hw_card_ids[];
|
||||
|
||||
#include "iwl-csr.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "iwl-fh.h"
|
||||
#include "iwl-3945-hw.h"
|
||||
#include "iwl-debug.h"
|
||||
#include "iwl-power.h"
|
||||
#include "iwl-dev.h"
|
||||
#include "iwl-led.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL3945_UCODE_API_MAX 2
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL3945_UCODE_API_MIN 1
|
||||
|
||||
#define IWL3945_FW_PRE "iwlwifi-3945-"
|
||||
#define _IWL3945_MODULE_FIRMWARE(api) IWL3945_FW_PRE #api ".ucode"
|
||||
#define IWL3945_MODULE_FIRMWARE(api) _IWL3945_MODULE_FIRMWARE(api)
|
||||
|
||||
/* Default noise level to report when noise measurement is not available.
|
||||
* This may be because we're:
|
||||
* 1) Not associated (4965, no beacon statistics being sent to driver)
|
||||
* 2) Scanning (noise measurement does not apply to associated channel)
|
||||
* 3) Receiving CCK (3945 delivers noise info only for OFDM frames)
|
||||
* Use default noise value of -127 ... this is below the range of measurable
|
||||
* Rx dBm for either 3945 or 4965, so it can indicate "unmeasurable" to user.
|
||||
* Also, -127 works better than 0 when averaging frames with/without
|
||||
* noise info (e.g. averaging might be done in app); measured dBm values are
|
||||
* always negative ... using a negative value as the default keeps all
|
||||
* averages within an s8's (used in some apps) range of negative values. */
|
||||
#define IWL_NOISE_MEAS_NOT_AVAILABLE (-127)
|
||||
|
||||
/* Module parameters accessible from iwl-*.c */
|
||||
extern struct iwl_mod_params iwl3945_mod_params;
|
||||
|
||||
struct iwl3945_rate_scale_data {
|
||||
u64 data;
|
||||
s32 success_counter;
|
||||
s32 success_ratio;
|
||||
s32 counter;
|
||||
s32 average_tpt;
|
||||
unsigned long stamp;
|
||||
};
|
||||
|
||||
struct iwl3945_rs_sta {
|
||||
spinlock_t lock;
|
||||
struct iwl_priv *priv;
|
||||
s32 *expected_tpt;
|
||||
unsigned long last_partial_flush;
|
||||
unsigned long last_flush;
|
||||
u32 flush_time;
|
||||
u32 last_tx_packets;
|
||||
u32 tx_packets;
|
||||
u8 tgg;
|
||||
u8 flush_pending;
|
||||
u8 start_rate;
|
||||
struct timer_list rate_scale_flush;
|
||||
struct iwl3945_rate_scale_data win[IWL_RATE_COUNT_3945];
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
struct dentry *rs_sta_dbgfs_stats_table_file;
|
||||
#endif
|
||||
|
||||
/* used to be in sta_info */
|
||||
int last_txrate_idx;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The common struct MUST be first because it is shared between
|
||||
* 3945 and agn!
|
||||
*/
|
||||
struct iwl3945_sta_priv {
|
||||
struct iwl_station_priv_common common;
|
||||
struct iwl3945_rs_sta rs_sta;
|
||||
};
|
||||
|
||||
enum iwl3945_antenna {
|
||||
IWL_ANTENNA_DIVERSITY,
|
||||
IWL_ANTENNA_MAIN,
|
||||
IWL_ANTENNA_AUX
|
||||
};
|
||||
|
||||
/*
|
||||
* RTS threshold here is total size [2347] minus 4 FCS bytes
|
||||
* Per spec:
|
||||
* a value of 0 means RTS on all data/management packets
|
||||
* a value > max MSDU size means no RTS
|
||||
* else RTS for data/management frames where MPDU is larger
|
||||
* than RTS value.
|
||||
*/
|
||||
#define DEFAULT_RTS_THRESHOLD 2347U
|
||||
#define MIN_RTS_THRESHOLD 0U
|
||||
#define MAX_RTS_THRESHOLD 2347U
|
||||
#define MAX_MSDU_SIZE 2304U
|
||||
#define MAX_MPDU_SIZE 2346U
|
||||
#define DEFAULT_BEACON_INTERVAL 100U
|
||||
#define DEFAULT_SHORT_RETRY_LIMIT 7U
|
||||
#define DEFAULT_LONG_RETRY_LIMIT 4U
|
||||
|
||||
#define IWL_TX_FIFO_AC0 0
|
||||
#define IWL_TX_FIFO_AC1 1
|
||||
#define IWL_TX_FIFO_AC2 2
|
||||
#define IWL_TX_FIFO_AC3 3
|
||||
#define IWL_TX_FIFO_HCCA_1 5
|
||||
#define IWL_TX_FIFO_HCCA_2 6
|
||||
#define IWL_TX_FIFO_NONE 7
|
||||
|
||||
#define IEEE80211_DATA_LEN 2304
|
||||
#define IEEE80211_4ADDR_LEN 30
|
||||
#define IEEE80211_HLEN (IEEE80211_4ADDR_LEN)
|
||||
#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
|
||||
|
||||
struct iwl3945_frame {
|
||||
union {
|
||||
struct ieee80211_hdr frame;
|
||||
struct iwl3945_tx_beacon_cmd beacon;
|
||||
u8 raw[IEEE80211_FRAME_LEN];
|
||||
u8 cmd[360];
|
||||
} u;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
#define SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4)
|
||||
#define SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ)
|
||||
#define MAX_SN ((IEEE80211_SCTL_SEQ) >> 4)
|
||||
|
||||
#define SUP_RATE_11A_MAX_NUM_CHANNELS 8
|
||||
#define SUP_RATE_11B_MAX_NUM_CHANNELS 4
|
||||
#define SUP_RATE_11G_MAX_NUM_CHANNELS 12
|
||||
|
||||
#define IWL_SUPPORTED_RATES_IE_LEN 8
|
||||
|
||||
#define SCAN_INTERVAL 100
|
||||
|
||||
#define MAX_TID_COUNT 9
|
||||
|
||||
#define IWL_INVALID_RATE 0xFF
|
||||
#define IWL_INVALID_VALUE -1
|
||||
|
||||
#define STA_PS_STATUS_WAKE 0
|
||||
#define STA_PS_STATUS_SLEEP 1
|
||||
|
||||
struct iwl3945_ibss_seq {
|
||||
u8 mac[ETH_ALEN];
|
||||
u16 seq_num;
|
||||
u16 frag_num;
|
||||
unsigned long packet_time;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
#define IWL_RX_HDR(x) ((struct iwl3945_rx_frame_hdr *)(\
|
||||
x->u.rx_frame.stats.payload + \
|
||||
x->u.rx_frame.stats.phy_count))
|
||||
#define IWL_RX_END(x) ((struct iwl3945_rx_frame_end *)(\
|
||||
IWL_RX_HDR(x)->payload + \
|
||||
le16_to_cpu(IWL_RX_HDR(x)->len)))
|
||||
#define IWL_RX_STATS(x) (&x->u.rx_frame.stats)
|
||||
#define IWL_RX_DATA(x) (IWL_RX_HDR(x)->payload)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Functions implemented in iwl-base.c which are forward declared here
|
||||
* for use by iwl-*.c
|
||||
*
|
||||
*****************************************************************************/
|
||||
extern int iwl3945_calc_db_from_ratio(int sig_ratio);
|
||||
extern void iwl3945_rx_replenish(void *data);
|
||||
extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
|
||||
extern unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
|
||||
struct ieee80211_hdr *hdr,int left);
|
||||
extern int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
|
||||
char **buf, bool display);
|
||||
extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Functions implemented in iwl-[34]*.c which are forward declared here
|
||||
* for use by iwl-base.c
|
||||
*
|
||||
* NOTE: The implementation of these functions are hardware specific
|
||||
* which is why they are in the hardware specific files (vs. iwl-base.c)
|
||||
*
|
||||
* Naming convention --
|
||||
* iwl3945_ <-- Its part of iwlwifi (should be changed to iwl3945_)
|
||||
* iwl3945_hw_ <-- Hardware specific (implemented in iwl-XXXX.c by all HW)
|
||||
* iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX)
|
||||
* iwl3945_bg_ <-- Called from work queue context
|
||||
* iwl3945_mac_ <-- mac80211 callback
|
||||
*
|
||||
****************************************************************************/
|
||||
extern void iwl3945_hw_rx_handler_setup(struct iwl_priv *priv);
|
||||
extern void iwl3945_hw_setup_deferred_work(struct iwl_priv *priv);
|
||||
extern void iwl3945_hw_cancel_deferred_work(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_rxq_stop(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_set_hw_params(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_nic_init(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_nic_stop_master(struct iwl_priv *priv);
|
||||
extern void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv);
|
||||
extern void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_nic_reset(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
|
||||
struct iwl_tx_queue *txq,
|
||||
dma_addr_t addr, u16 len,
|
||||
u8 reset, u8 pad);
|
||||
extern void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv,
|
||||
struct iwl_tx_queue *txq);
|
||||
extern int iwl3945_hw_get_temperature(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_tx_queue_init(struct iwl_priv *priv,
|
||||
struct iwl_tx_queue *txq);
|
||||
extern unsigned int iwl3945_hw_get_beacon_cmd(struct iwl_priv *priv,
|
||||
struct iwl3945_frame *frame, u8 rate);
|
||||
void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
|
||||
struct iwl_device_cmd *cmd,
|
||||
struct ieee80211_tx_info *info,
|
||||
struct ieee80211_hdr *hdr,
|
||||
int sta_id, int tx_id);
|
||||
extern int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv);
|
||||
extern int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power);
|
||||
extern void iwl3945_hw_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
void iwl3945_reply_statistics(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb);
|
||||
extern void iwl3945_disable_events(struct iwl_priv *priv);
|
||||
extern int iwl4965_get_temperature(const struct iwl_priv *priv);
|
||||
extern void iwl3945_post_associate(struct iwl_priv *priv);
|
||||
extern void iwl3945_config_ap(struct iwl_priv *priv);
|
||||
|
||||
extern int iwl3945_commit_rxon(struct iwl_priv *priv,
|
||||
struct iwl_rxon_context *ctx);
|
||||
|
||||
/**
|
||||
* iwl3945_hw_find_station - Find station id for a given BSSID
|
||||
* @bssid: MAC address of station ID to find
|
||||
*
|
||||
* NOTE: This should not be hardware specific but the code has
|
||||
* not yet been merged into a single common layer for managing the
|
||||
* station tables.
|
||||
*/
|
||||
extern u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *bssid);
|
||||
|
||||
extern struct ieee80211_ops iwl3945_hw_ops;
|
||||
|
||||
/*
|
||||
* Forward declare iwl-3945.c functions for iwl-base.c
|
||||
*/
|
||||
extern __le32 iwl3945_get_antenna_flags(const struct iwl_priv *priv);
|
||||
extern int iwl3945_init_hw_rate_table(struct iwl_priv *priv);
|
||||
extern void iwl3945_reg_txpower_periodic(struct iwl_priv *priv);
|
||||
extern int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv);
|
||||
|
||||
extern const struct iwl_channel_info *iwl3945_get_channel_info(
|
||||
const struct iwl_priv *priv, enum ieee80211_band band, u16 channel);
|
||||
|
||||
extern int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate);
|
||||
|
||||
/* scanning */
|
||||
int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif);
|
||||
void iwl3945_post_scan(struct iwl_priv *priv);
|
||||
|
||||
/* rates */
|
||||
extern const struct iwl3945_rate_info iwl3945_rates[IWL_RATE_COUNT_3945];
|
||||
|
||||
/* Requires full declaration of iwl_priv before including */
|
||||
#include "iwl-io.h"
|
||||
|
||||
#endif
|
||||
792
drivers/net/wireless/iwlwifi/iwl-4965-hw.h
Normal file
792
drivers/net/wireless/iwlwifi/iwl-4965-hw.h
Normal file
File diff suppressed because it is too large
Load Diff
2666
drivers/net/wireless/iwlwifi/iwl-4965.c
Normal file
2666
drivers/net/wireless/iwlwifi/iwl-4965.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -86,6 +86,7 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("iwl4965");
|
||||
|
||||
static int iwlagn_ant_coupling;
|
||||
static bool iwlagn_bt_ch_announce = 1;
|
||||
@@ -3809,6 +3810,7 @@ static void iwlagn_bg_roc_done(struct work_struct *work)
|
||||
mutex_unlock(&priv->mutex);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IWL5000
|
||||
static int iwl_mac_remain_on_channel(struct ieee80211_hw *hw,
|
||||
struct ieee80211_channel *channel,
|
||||
enum nl80211_channel_type channel_type,
|
||||
@@ -3864,6 +3866,7 @@ static int iwl_mac_cancel_remain_on_channel(struct ieee80211_hw *hw)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -4033,6 +4036,7 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
|
||||
kfree(priv->scan_cmd);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IWL5000
|
||||
struct ieee80211_ops iwlagn_hw_ops = {
|
||||
.tx = iwlagn_mac_tx,
|
||||
.start = iwlagn_mac_start,
|
||||
@@ -4057,6 +4061,7 @@ struct ieee80211_ops iwlagn_hw_ops = {
|
||||
.remain_on_channel = iwl_mac_remain_on_channel,
|
||||
.cancel_remain_on_channel = iwl_mac_cancel_remain_on_channel,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void iwl_hw_detect(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -4124,7 +4129,12 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (cfg->mod_params->disable_hw_scan) {
|
||||
dev_printk(KERN_DEBUG, &(pdev->dev),
|
||||
"sw scan support is deprecated\n");
|
||||
#ifdef CONFIG_IWL5000
|
||||
iwlagn_hw_ops.hw_scan = NULL;
|
||||
#endif
|
||||
#ifdef CONFIG_IWL4965
|
||||
iwl4965_hw_ops.hw_scan = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
hw = iwl_alloc_all(cfg);
|
||||
@@ -4503,6 +4513,12 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
|
||||
|
||||
/* Hardware specific file defines the PCI IDs table for that hardware module */
|
||||
static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
||||
#ifdef CONFIG_IWL4965
|
||||
{IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
|
||||
#endif /* CONFIG_IWL4965 */
|
||||
#ifdef CONFIG_IWL5000
|
||||
/* 5100 Series WiFi */
|
||||
{IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
|
||||
{IWL_PCI_DEVICE(0x4232, 0x1301, iwl5100_agn_cfg)}, /* Half Mini Card */
|
||||
{IWL_PCI_DEVICE(0x4232, 0x1204, iwl5100_agn_cfg)}, /* Mini Card */
|
||||
@@ -4688,6 +4704,8 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
||||
{IWL_PCI_DEVICE(0x0893, 0x0266, iwl230_bg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0892, 0x0466, iwl230_bg_cfg)},
|
||||
|
||||
#endif /* CONFIG_IWL5000 */
|
||||
|
||||
{0}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
#include "iwl-helpers.h"
|
||||
|
||||
|
||||
MODULE_DESCRIPTION("iwl core");
|
||||
MODULE_VERSION(IWLWIFI_VERSION);
|
||||
MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
/*
|
||||
* set bt_coex_active to true, uCode will do kill/defer
|
||||
* every time the priority line is asserted (BT is sending signals on the
|
||||
@@ -60,12 +65,15 @@
|
||||
* default: bt_coex_active = true (BT_COEX_ENABLE)
|
||||
*/
|
||||
bool bt_coex_active = true;
|
||||
EXPORT_SYMBOL_GPL(bt_coex_active);
|
||||
module_param(bt_coex_active, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(bt_coex_active, "enable wifi/bluetooth co-exist");
|
||||
|
||||
u32 iwl_debug_level;
|
||||
EXPORT_SYMBOL(iwl_debug_level);
|
||||
|
||||
const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
EXPORT_SYMBOL(iwl_bcast_addr);
|
||||
|
||||
|
||||
/* This function both allocates and initializes hw and priv. */
|
||||
@@ -90,6 +98,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg)
|
||||
out:
|
||||
return hw;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_alloc_all);
|
||||
|
||||
#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
|
||||
#define MAX_BIT_RATE_20_MHZ 72 /* Mbps */
|
||||
@@ -263,6 +272,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwlcore_init_geos);
|
||||
|
||||
/*
|
||||
* iwlcore_free_geos - undo allocations in iwlcore_init_geos
|
||||
@@ -273,6 +283,7 @@ void iwlcore_free_geos(struct iwl_priv *priv)
|
||||
kfree(priv->ieee_rates);
|
||||
clear_bit(STATUS_GEO_CONFIGURED, &priv->status);
|
||||
}
|
||||
EXPORT_SYMBOL(iwlcore_free_geos);
|
||||
|
||||
static bool iwl_is_channel_extension(struct iwl_priv *priv,
|
||||
enum ieee80211_band band,
|
||||
@@ -317,6 +328,7 @@ bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
|
||||
le16_to_cpu(ctx->staging.channel),
|
||||
ctx->ht.extension_chan_offset);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_is_ht40_tx_allowed);
|
||||
|
||||
static u16 iwl_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
|
||||
{
|
||||
@@ -417,6 +429,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
||||
return iwl_send_cmd_pdu(priv, ctx->rxon_timing_cmd,
|
||||
sizeof(ctx->timing), &ctx->timing);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_send_rxon_timing);
|
||||
|
||||
void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
|
||||
int hw_decrypt)
|
||||
@@ -429,6 +442,7 @@ void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
|
||||
rxon->filter_flags |= RXON_FILTER_DIS_DECRYPT_MSK;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_rxon_hwcrypto);
|
||||
|
||||
/* validate RXON structure is valid */
|
||||
int iwl_check_rxon_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
||||
@@ -501,6 +515,7 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_check_rxon_cmd);
|
||||
|
||||
/**
|
||||
* iwl_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed
|
||||
@@ -564,6 +579,7 @@ int iwl_full_rxon_required(struct iwl_priv *priv,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_full_rxon_required);
|
||||
|
||||
u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv,
|
||||
struct iwl_rxon_context *ctx)
|
||||
@@ -577,6 +593,7 @@ u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv,
|
||||
else
|
||||
return IWL_RATE_6M_PLCP;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_rate_get_lowest_plcp);
|
||||
|
||||
static void _iwl_set_rxon_ht(struct iwl_priv *priv,
|
||||
struct iwl_ht_config *ht_conf,
|
||||
@@ -653,6 +670,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf)
|
||||
for_each_context(priv, ctx)
|
||||
_iwl_set_rxon_ht(priv, ht_conf, ctx);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_rxon_ht);
|
||||
|
||||
/* Return valid, unused, channel for a passive scan to reset the RF */
|
||||
u8 iwl_get_single_channel_number(struct iwl_priv *priv,
|
||||
@@ -693,6 +711,7 @@ u8 iwl_get_single_channel_number(struct iwl_priv *priv,
|
||||
|
||||
return channel;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_get_single_channel_number);
|
||||
|
||||
/**
|
||||
* iwl_set_rxon_channel - Set the band and channel values in staging RXON
|
||||
@@ -723,6 +742,7 @@ int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_rxon_channel);
|
||||
|
||||
void iwl_set_flags_for_band(struct iwl_priv *priv,
|
||||
struct iwl_rxon_context *ctx,
|
||||
@@ -746,6 +766,7 @@ void iwl_set_flags_for_band(struct iwl_priv *priv,
|
||||
ctx->staging.flags &= ~RXON_FLG_CCK_MSK;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_flags_for_band);
|
||||
|
||||
/*
|
||||
* initialize rxon structure with default values from eeprom
|
||||
@@ -817,6 +838,7 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv,
|
||||
ctx->staging.ofdm_ht_dual_stream_basic_rates = 0xff;
|
||||
ctx->staging.ofdm_ht_triple_stream_basic_rates = 0xff;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_connection_init_rx_config);
|
||||
|
||||
void iwl_set_rate(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -849,6 +871,7 @@ void iwl_set_rate(struct iwl_priv *priv)
|
||||
(IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_rate);
|
||||
|
||||
void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
|
||||
{
|
||||
@@ -868,6 +891,7 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
|
||||
mutex_unlock(&priv->mutex);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_chswitch_done);
|
||||
|
||||
void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
||||
{
|
||||
@@ -895,6 +919,7 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_rx_csa);
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
void iwl_print_rx_config_cmd(struct iwl_priv *priv,
|
||||
@@ -916,6 +941,7 @@ void iwl_print_rx_config_cmd(struct iwl_priv *priv,
|
||||
IWL_DEBUG_RADIO(priv, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
|
||||
IWL_DEBUG_RADIO(priv, "u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_print_rx_config_cmd);
|
||||
#endif
|
||||
/**
|
||||
* iwl_irq_handle_error - called for HW or SW error interrupt from card
|
||||
@@ -995,6 +1021,7 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
|
||||
queue_work(priv->workqueue, &priv->restart);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_irq_handle_error);
|
||||
|
||||
static int iwl_apm_stop_master(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1031,6 +1058,7 @@ void iwl_apm_stop(struct iwl_priv *priv)
|
||||
*/
|
||||
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_apm_stop);
|
||||
|
||||
|
||||
/*
|
||||
@@ -1145,6 +1173,7 @@ int iwl_apm_init(struct iwl_priv *priv)
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_apm_init);
|
||||
|
||||
|
||||
int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
|
||||
@@ -1204,6 +1233,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_set_tx_power);
|
||||
|
||||
void iwl_send_bt_config(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1227,6 +1257,7 @@ void iwl_send_bt_config(struct iwl_priv *priv)
|
||||
sizeof(struct iwl_bt_cmd), &bt_cmd))
|
||||
IWL_ERR(priv, "failed to send BT Coex Config\n");
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_send_bt_config);
|
||||
|
||||
int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
|
||||
{
|
||||
@@ -1244,6 +1275,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
|
||||
sizeof(struct iwl_statistics_cmd),
|
||||
&statistics_cmd);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_send_statistics_request);
|
||||
|
||||
void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
@@ -1255,6 +1287,7 @@ void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
|
||||
sleep->pm_sleep_mode, sleep->pm_wakeup_src);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_rx_pm_sleep_notif);
|
||||
|
||||
void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
@@ -1266,6 +1299,7 @@ void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
||||
get_cmd_string(pkt->hdr.cmd));
|
||||
iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, len);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_rx_pm_debug_statistics_notif);
|
||||
|
||||
void iwl_rx_reply_error(struct iwl_priv *priv,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
@@ -1280,6 +1314,7 @@ void iwl_rx_reply_error(struct iwl_priv *priv,
|
||||
le16_to_cpu(pkt->u.err_resp.bad_cmd_seq_num),
|
||||
le32_to_cpu(pkt->u.err_resp.error_info));
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_rx_reply_error);
|
||||
|
||||
void iwl_clear_isr_stats(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1331,6 +1366,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
|
||||
IWL_DEBUG_MAC80211(priv, "leave\n");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_conf_tx);
|
||||
|
||||
int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw)
|
||||
{
|
||||
@@ -1338,6 +1374,7 @@ int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw)
|
||||
|
||||
return priv->ibss_manager == IWL_IBSS_MANAGER;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iwl_mac_tx_last_beacon);
|
||||
|
||||
static int iwl_set_mode(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
||||
{
|
||||
@@ -1447,6 +1484,7 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
IWL_DEBUG_MAC80211(priv, "leave\n");
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_add_interface);
|
||||
|
||||
static void iwl_teardown_interface(struct iwl_priv *priv,
|
||||
struct ieee80211_vif *vif,
|
||||
@@ -1499,6 +1537,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
|
||||
IWL_DEBUG_MAC80211(priv, "leave\n");
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_remove_interface);
|
||||
|
||||
int iwl_alloc_txq_mem(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1513,12 +1552,14 @@ int iwl_alloc_txq_mem(struct iwl_priv *priv)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_alloc_txq_mem);
|
||||
|
||||
void iwl_free_txq_mem(struct iwl_priv *priv)
|
||||
{
|
||||
kfree(priv->txq);
|
||||
priv->txq = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_free_txq_mem);
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
|
||||
@@ -1557,6 +1598,7 @@ int iwl_alloc_traffic_mem(struct iwl_priv *priv)
|
||||
iwl_reset_traffic_log(priv);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_alloc_traffic_mem);
|
||||
|
||||
void iwl_free_traffic_mem(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1566,6 +1608,7 @@ void iwl_free_traffic_mem(struct iwl_priv *priv)
|
||||
kfree(priv->rx_traffic);
|
||||
priv->rx_traffic = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_free_traffic_mem);
|
||||
|
||||
void iwl_dbg_log_tx_data_frame(struct iwl_priv *priv,
|
||||
u16 length, struct ieee80211_hdr *header)
|
||||
@@ -1590,6 +1633,7 @@ void iwl_dbg_log_tx_data_frame(struct iwl_priv *priv,
|
||||
(priv->tx_traffic_idx + 1) % IWL_TRAFFIC_ENTRIES;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_dbg_log_tx_data_frame);
|
||||
|
||||
void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv,
|
||||
u16 length, struct ieee80211_hdr *header)
|
||||
@@ -1614,6 +1658,7 @@ void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv,
|
||||
(priv->rx_traffic_idx + 1) % IWL_TRAFFIC_ENTRIES;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_dbg_log_rx_data_frame);
|
||||
|
||||
const char *get_mgmt_string(int cmd)
|
||||
{
|
||||
@@ -1750,6 +1795,7 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
|
||||
stats->data_bytes += len;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_update_stats);
|
||||
#endif
|
||||
|
||||
static void iwl_force_rf_reset(struct iwl_priv *priv)
|
||||
@@ -1888,6 +1934,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
mutex_unlock(&priv->mutex);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_mac_change_interface);
|
||||
|
||||
/*
|
||||
* On every watchdog tick we check (latest) time stamp. If it does not
|
||||
@@ -1959,6 +2006,7 @@ void iwl_bg_watchdog(unsigned long data)
|
||||
mod_timer(&priv->watchdog, jiffies +
|
||||
msecs_to_jiffies(IWL_WD_TICK(timeout)));
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_bg_watchdog);
|
||||
|
||||
void iwl_setup_watchdog(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -1970,6 +2018,7 @@ void iwl_setup_watchdog(struct iwl_priv *priv)
|
||||
else
|
||||
del_timer(&priv->watchdog);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_setup_watchdog);
|
||||
|
||||
/*
|
||||
* extended beacon time format
|
||||
@@ -1995,6 +2044,7 @@ u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval)
|
||||
|
||||
return (quot << priv->hw_params.beacon_time_tsf_bits) + rem;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_usecs_to_beacons);
|
||||
|
||||
/* base is usually what we get from ucode with each received frame,
|
||||
* the same as HW timer counter counting down
|
||||
@@ -2022,6 +2072,7 @@ __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base,
|
||||
|
||||
return cpu_to_le32(res);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_add_beacon_time);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -2041,6 +2092,7 @@ int iwl_pci_suspend(struct device *device)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_pci_suspend);
|
||||
|
||||
int iwl_pci_resume(struct device *device)
|
||||
{
|
||||
@@ -2069,6 +2121,7 @@ int iwl_pci_resume(struct device *device)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_pci_resume);
|
||||
|
||||
const struct dev_pm_ops iwl_pm_ops = {
|
||||
.suspend = iwl_pci_suspend,
|
||||
@@ -2078,5 +2131,6 @@ const struct dev_pm_ops iwl_pm_ops = {
|
||||
.poweroff = iwl_pci_suspend,
|
||||
.restore = iwl_pci_resume,
|
||||
};
|
||||
EXPORT_SYMBOL(iwl_pm_ops);
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -1788,6 +1788,7 @@ err:
|
||||
iwl_dbgfs_unregister(priv);
|
||||
return -ENOMEM;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_dbgfs_register);
|
||||
|
||||
/**
|
||||
* Remove the debugfs files and directories
|
||||
@@ -1801,6 +1802,7 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv)
|
||||
debugfs_remove_recursive(priv->debugfs_dir);
|
||||
priv->debugfs_dir = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_dbgfs_unregister);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
#include "iwl-prph.h"
|
||||
#include "iwl-fh.h"
|
||||
#include "iwl-debug.h"
|
||||
#include "iwl-4965-hw.h"
|
||||
#include "iwl-3945-hw.h"
|
||||
#include "iwl-agn-hw.h"
|
||||
#include "iwl-led.h"
|
||||
#include "iwl-power.h"
|
||||
#include "iwl-agn-rs.h"
|
||||
#include "iwl-agn-tt.h"
|
||||
|
||||
#define U32_PAD(n) ((4-(n))&0x3)
|
||||
|
||||
struct iwl_tx_queue;
|
||||
|
||||
/* CT-KILL constants */
|
||||
|
||||
@@ -222,6 +222,7 @@ const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset)
|
||||
BUG_ON(offset >= priv->cfg->base_params->eeprom_size);
|
||||
return &priv->eeprom[offset];
|
||||
}
|
||||
EXPORT_SYMBOL(iwlcore_eeprom_query_addr);
|
||||
|
||||
static int iwl_init_otp_access(struct iwl_priv *priv)
|
||||
{
|
||||
@@ -381,6 +382,7 @@ const u8 *iwl_eeprom_query_addr(const struct iwl_priv *priv, size_t offset)
|
||||
{
|
||||
return priv->cfg->ops->lib->eeprom_ops.query_addr(priv, offset);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_eeprom_query_addr);
|
||||
|
||||
u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset)
|
||||
{
|
||||
@@ -388,6 +390,7 @@ u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset)
|
||||
return 0;
|
||||
return (u16)priv->eeprom[offset] | ((u16)priv->eeprom[offset + 1] << 8);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_eeprom_query16);
|
||||
|
||||
/**
|
||||
* iwl_eeprom_init - read EEPROM contents
|
||||
@@ -506,12 +509,14 @@ err:
|
||||
alloc_err:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_eeprom_init);
|
||||
|
||||
void iwl_eeprom_free(struct iwl_priv *priv)
|
||||
{
|
||||
kfree(priv->eeprom);
|
||||
priv->eeprom = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_eeprom_free);
|
||||
|
||||
static void iwl_init_band_reference(const struct iwl_priv *priv,
|
||||
int eep_band, int *eeprom_ch_count,
|
||||
@@ -774,6 +779,7 @@ int iwl_init_channel_map(struct iwl_priv *priv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_init_channel_map);
|
||||
|
||||
/*
|
||||
* iwl_free_channel_map - undo allocations in iwl_init_channel_map
|
||||
@@ -783,6 +789,7 @@ void iwl_free_channel_map(struct iwl_priv *priv)
|
||||
kfree(priv->channel_info);
|
||||
priv->channel_count = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_free_channel_map);
|
||||
|
||||
/**
|
||||
* iwl_get_channel_info - Find driver's private channel info
|
||||
@@ -811,3 +818,4 @@ const struct iwl_channel_info *iwl_get_channel_info(const struct iwl_priv *priv,
|
||||
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_get_channel_info);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user