Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278153
b: refs/heads/master
c: d317516
h: refs/heads/master
i:
  278151: f99810b
v: v3
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent 7fa594d commit 37c5ff5
Show file tree
Hide file tree
Showing 32 changed files with 300 additions and 303 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 232913b51e6f6e7105184b23a436dfc6b942491b
refs/heads/master: d31751679897441d89e6ae59da98f1424b3f7dfe
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ obj-$(CONFIG_ADM8211) += adm8211.o
obj-$(CONFIG_MWL8K) += mwl8k.o

obj-$(CONFIG_IWLWIFI) += iwlwifi/
obj-$(CONFIG_IWLWIFI_LEGACY) += iwlegacy/
obj-$(CONFIG_IWLEGACY) += iwlegacy/
obj-$(CONFIG_RT2X00) += rt2x00/

obj-$(CONFIG_P54_COMMON) += p54/
Expand Down
26 changes: 13 additions & 13 deletions trunk/drivers/net/wireless/iwlegacy/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config IWLWIFI_LEGACY
config IWLEGACY
tristate
select FW_LOADER
select NEW_LEDS
Expand All @@ -7,13 +7,13 @@ config IWLWIFI_LEGACY
select MAC80211_LEDS

menu "Debugging Options"
depends on IWLWIFI_LEGACY
depends on IWLEGACY

config IWLWIFI_LEGACY_DEBUG
bool "Enable full debugging output in 4965 and 3945 drivers"
depends on IWLWIFI_LEGACY
config IWLEGACY_DEBUG
bool "Enable full debugging output in iwlegacy (iwl 3945/4965) drivers"
depends on IWLEGACY
---help---
This option will enable debug tracing output for the iwlwifilegacy
This option will enable debug tracing output for the iwlegacy
drivers.

This will result in the kernel module being ~100k larger. You can
Expand All @@ -29,17 +29,17 @@ config IWLWIFI_LEGACY_DEBUG
% echo 0x43fff > /sys/class/net/wlan0/device/debug_level

You can find the list of debug mask values in:
drivers/net/wireless/iwlwifilegacy/iwl-debug.h
drivers/net/wireless/iwlegacy/iwl-debug.h

If this is your first time using this driver, you should say Y here
as the debug information can assist others in helping you resolve
any problems you may encounter.

config IWLWIFI_LEGACY_DEBUGFS
bool "4965 and 3945 debugfs support"
depends on IWLWIFI_LEGACY && MAC80211_DEBUGFS
config IWLEGACY_DEBUGFS
bool "iwlegacy (iwl 3945/4965) debugfs support"
depends on IWLEGACY && MAC80211_DEBUGFS
---help---
Enable creation of debugfs files for the iwlwifilegacy drivers. This
Enable creation of debugfs files for the iwlegacy drivers. This
is a low-impact option that allows getting insight into the
driver's state at runtime.

Expand All @@ -48,7 +48,7 @@ endmenu
config IWL4965
tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
depends on PCI && MAC80211
select IWLWIFI_LEGACY
select IWLEGACY
---help---
This option enables support for

Expand Down Expand Up @@ -76,7 +76,7 @@ config IWL4965
config IWL3945
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
depends on PCI && MAC80211
select IWLWIFI_LEGACY
select IWLEGACY
---help---
Select to build the driver supporting the:

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/iwlegacy/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
obj-$(CONFIG_IWLWIFI_LEGACY) += iwl-legacy.o
obj-$(CONFIG_IWLEGACY) += iwl-legacy.o
iwl-legacy-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
iwl-legacy-objs += iwl-rx.o iwl-tx.o iwl-sta.o
iwl-legacy-objs += iwl-scan.o iwl-led.o
iwl-legacy-$(CONFIG_IWLWIFI_LEGACY_DEBUGFS) += iwl-debugfs.o
iwl-legacy-$(CONFIG_IWLEGACY_DEBUGFS) += iwl-debugfs.o

iwl-legacy-objs += $(iwl-legacy-m)

Expand All @@ -12,11 +12,11 @@ iwl4965-objs := iwl-4965.o iwl4965-base.o iwl-4965-rs.o iwl-4965-led.o
iwl4965-objs += iwl-4965-ucode.o iwl-4965-tx.o
iwl4965-objs += iwl-4965-lib.o iwl-4965-rx.o iwl-4965-calib.o
iwl4965-objs += iwl-4965-sta.o iwl-4965-eeprom.o
iwl4965-$(CONFIG_IWLWIFI_LEGACY_DEBUGFS) += iwl-4965-debugfs.o
iwl4965-$(CONFIG_IWLEGACY_DEBUGFS) += iwl-4965-debugfs.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_LEGACY_DEBUGFS) += iwl-3945-debugfs.o
iwl3945-$(CONFIG_IWLEGACY_DEBUGFS) += iwl-3945-debugfs.o

ccflags-y += -D__CHECK_ENDIAN__
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlegacy/iwl-3945-debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "iwl-core.h"
#include "iwl-debug.h"

#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
#ifdef CONFIG_IWLEGACY_DEBUGFS
ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
Expand Down
34 changes: 17 additions & 17 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#include "iwl-eeprom.h"

/* RSSI to dBm */
#define IWL39_RSSI_OFFSET 95
#define IL39_RSSI_OFFSET 95

/*
* EEPROM related constants, enums, and structures.
Expand Down Expand Up @@ -214,16 +214,16 @@ struct il3945_eeprom {
u8 reserved16[172]; /* fill out to full 1024 byte block */
} __packed;

#define IWL3945_EEPROM_IMG_SIZE 1024
#define IL3945_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 IL39_NUM_QUEUES 5
#define IL39_CMD_QUEUE_NUM 4

#define IL_DEFAULT_TX_RETRY 15

Expand All @@ -245,27 +245,27 @@ struct il3945_eeprom {

/* 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 IL39_RTC_INST_LOWER_BOUND (0x000000)
#define IL39_RTC_INST_UPPER_BOUND (0x014000)

#define IWL39_RTC_DATA_LOWER_BOUND (0x800000)
#define IWL39_RTC_DATA_UPPER_BOUND (0x808000)
#define IL39_RTC_DATA_LOWER_BOUND (0x800000)
#define IL39_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 IL39_RTC_INST_SIZE (IL39_RTC_INST_UPPER_BOUND - \
IL39_RTC_INST_LOWER_BOUND)
#define IL39_RTC_DATA_SIZE (IL39_RTC_DATA_UPPER_BOUND - \
IL39_RTC_DATA_LOWER_BOUND)

#define IWL39_MAX_INST_SIZE IWL39_RTC_INST_SIZE
#define IWL39_MAX_DATA_SIZE IWL39_RTC_DATA_SIZE
#define IL39_MAX_INST_SIZE IL39_RTC_INST_SIZE
#define IL39_MAX_DATA_SIZE IL39_RTC_DATA_SIZE

/* Size of uCode instruction memory in bootstrap state machine */
#define IWL39_MAX_BSM_SIZE IWL39_RTC_INST_SIZE
#define IL39_MAX_BSM_SIZE IL39_RTC_INST_SIZE

static inline int il3945_hw_valid_rtc_data_addr(u32 addr)
{
return (addr >= IWL39_RTC_DATA_LOWER_BOUND &&
addr < IWL39_RTC_DATA_UPPER_BOUND);
return (addr >= IL39_RTC_DATA_LOWER_BOUND &&
addr < IL39_RTC_DATA_UPPER_BOUND);
}

/* Base physical address of il3945_shared is provided to FH_TSSR_CBB_BASE
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = {
#define IL_RATE_MAX_WINDOW 62
#define IL_RATE_FLUSH (3*HZ)
#define IL_RATE_WIN_FLUSH (HZ/2)
#define IWL39_RATE_HIGH_TH 11520
#define IL39_RATE_HIGH_TH 11520
#define IL_SUCCESS_UP_TH 8960
#define IL_SUCCESS_DOWN_TH 10880
#define IL_RATE_MIN_FAILURE_TH 6
Expand Down
52 changes: 26 additions & 26 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int il3945_hwrate_to_plcp_idx(u8 plcp)
return -1;
}

#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
#ifdef CONFIG_IWLEGACY_DEBUG
#define TX_STATUS_ENTRY(x) case TX_3945_STATUS_FAIL_ ## x: return #x

static const char *il3945_get_tx_fail_reason(u32 status)
Expand Down Expand Up @@ -281,7 +281,7 @@ static void il3945_tx_queue_reclaim(struct il_priv *il,
struct il_queue *q = &txq->q;
struct il_tx_info *tx_info;

BUG_ON(txq_id == IWL39_CMD_QUEUE_NUM);
BUG_ON(txq_id == IL39_CMD_QUEUE_NUM);

for (index = il_queue_inc_wrap(index, q->n_bd);
q->read_ptr != index;
Expand All @@ -294,7 +294,7 @@ static void il3945_tx_queue_reclaim(struct il_priv *il,
}

if (il_queue_space(q) > q->low_mark && txq_id >= 0 &&
txq_id != IWL39_CMD_QUEUE_NUM && il->mac80211_registered)
txq_id != IL39_CMD_QUEUE_NUM && il->mac80211_registered)
il_wake_queue(il, txq);
}

Expand Down Expand Up @@ -361,7 +361,7 @@ static void il3945_rx_reply_tx(struct il_priv *il,
* RX handler implementations
*
*****************************************************************************/
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
#ifdef CONFIG_IWLEGACY_DEBUGFS
static void il3945_accumulative_statistics(struct il_priv *il,
__le32 *stats)
{
Expand Down Expand Up @@ -403,7 +403,7 @@ void il3945_hw_rx_statistics(struct il_priv *il,
D_RX("Statistics notification received (%d vs %d).\n",
(int)sizeof(struct il3945_notif_statistics),
le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
#ifdef CONFIG_IWLEGACY_DEBUGFS
il3945_accumulative_statistics(il, (__le32 *)&pkt->u.raw);
#endif

Expand All @@ -417,7 +417,7 @@ void il3945_reply_statistics(struct il_priv *il,
__le32 *flag = (__le32 *)&pkt->u.raw;

if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) {
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
#ifdef CONFIG_IWLEGACY_DEBUGFS
memset(&il->_3945.accum_statistics, 0,
sizeof(struct il3945_notif_statistics));
memset(&il->_3945.delta_statistics, 0,
Expand Down Expand Up @@ -468,7 +468,7 @@ static void il3945_pass_packet_to_mac80211(struct il_priv *il,
__le16 fc = hdr->frame_control;

/* We received data from the HW, so stop the watchdog */
if (unlikely(len + IWL39_RX_FRAME_SIZE >
if (unlikely(len + IL39_RX_FRAME_SIZE >
PAGE_SIZE << il->hw_params.rx_page_order)) {
D_DROP("Corruption detected!\n");
return;
Expand Down Expand Up @@ -552,7 +552,7 @@ static void il3945_rx_reply_rx(struct il_priv *il,


/* Convert 3945's rssi indicator to dBm */
rx_status.signal = rx_stats->rssi - IWL39_RSSI_OFFSET;
rx_status.signal = rx_stats->rssi - IL39_RSSI_OFFSET;

D_STATS("Rssi %d sig_avg %d noise_diff %d\n",
rx_status.signal, rx_stats_sig_avg,
Expand Down Expand Up @@ -698,7 +698,7 @@ void il3945_hw_build_tx_cmd_rate(struct il_priv *il,
data_retry_limit = IL_DEFAULT_TX_RETRY;
tx_cmd->data_retry_limit = data_retry_limit;

if (tx_id >= IWL39_CMD_QUEUE_NUM)
if (tx_id >= IL39_CMD_QUEUE_NUM)
rts_retry_limit = 3;
else
rts_retry_limit = 7;
Expand Down Expand Up @@ -849,7 +849,7 @@ static int il3945_txq_ctx_reset(struct il_priv *il)

/* Tx queue(s) */
for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) {
slots_num = (txq_id == IWL39_CMD_QUEUE_NUM) ?
slots_num = (txq_id == IL39_CMD_QUEUE_NUM) ?
TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
rc = il_tx_queue_init(il, &il->txq[txq_id],
slots_num, txq_id);
Expand Down Expand Up @@ -1010,7 +1010,7 @@ void il3945_hw_txq_ctx_free(struct il_priv *il)
if (il->txq)
for (txq_id = 0; txq_id < il->hw_params.max_txq_num;
txq_id++)
if (txq_id == IWL39_CMD_QUEUE_NUM)
if (txq_id == IL39_CMD_QUEUE_NUM)
il_cmd_queue_free(il);
else
il_tx_queue_free(il, txq_id);
Expand Down Expand Up @@ -1402,7 +1402,7 @@ static int il3945_send_tx_power(struct il_priv *il)
/* fill cmd with power settings for all rates for current channel */
/* Fill OFDM rate */
for (rate_idx = IL_FIRST_OFDM_RATE, i = 0;
rate_idx <= IWL39_LAST_OFDM_RATE; rate_idx++, i++) {
rate_idx <= IL39_LAST_OFDM_RATE; rate_idx++, i++) {

txpower.power[i].tpc = ch_info->power_info[i].tpc;
txpower.power[i].rate = il3945_rates[rate_idx].plcp;
Expand Down Expand Up @@ -2400,14 +2400,14 @@ int il3945_hw_set_hw_params(struct il_priv *il)
il->hw_params.rx_page_order = get_order(IL_RX_BUF_SIZE_3K);
il->hw_params.max_rxq_size = RX_QUEUE_SIZE;
il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG;
il->hw_params.max_stations = IWL3945_STATION_COUNT;
il->contexts[IL_RXON_CTX_BSS].bcast_sta_id = IWL3945_BROADCAST_ID;
il->hw_params.max_stations = IL3945_STATION_COUNT;
il->contexts[IL_RXON_CTX_BSS].bcast_sta_id = IL3945_BROADCAST_ID;

il->sta_key_max_num = STA_KEY_MAX_NUM;

il->hw_params.rx_wrt_ptr_reg = FH39_RSCSR_CHNL0_WPTR;
il->hw_params.max_beacon_itrvl = IWL39_MAX_UCODE_BEACON_INTERVAL;
il->hw_params.beacon_time_tsf_bits = IWL3945_EXT_BEACON_TIME_POS;
il->hw_params.max_beacon_itrvl = IL39_MAX_UCODE_BEACON_INTERVAL;
il->hw_params.beacon_time_tsf_bits = IL3945_EXT_BEACON_TIME_POS;

return 0;
}
Expand Down Expand Up @@ -2569,7 +2569,7 @@ static int il3945_load_bsm(struct il_priv *il)
D_INFO("Begin load bsm\n");

/* make sure bootstrap program is no larger than BSM's SRAM size */
if (len > IWL39_MAX_BSM_SIZE)
if (len > IL39_MAX_BSM_SIZE)
return -EINVAL;

/* Tell bootstrap uCode where to find the "Initialize" uCode
Expand Down Expand Up @@ -2601,7 +2601,7 @@ static int il3945_load_bsm(struct il_priv *il)
/* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */
il_wr_prph(il, BSM_WR_MEM_SRC_REG, 0x0);
il_wr_prph(il, BSM_WR_MEM_DST_REG,
IWL39_RTC_INST_LOWER_BOUND);
IL39_RTC_INST_LOWER_BOUND);
il_wr_prph(il, BSM_WR_DWCOUNT_REG, len / sizeof(u32));

/* Load bootstrap code into instruction SRAM now,
Expand Down Expand Up @@ -2692,8 +2692,8 @@ static const struct il_ops il3945_ops = {
};

static struct il_base_params il3945_base_params = {
.eeprom_size = IWL3945_EEPROM_IMG_SIZE,
.num_of_queues = IWL39_NUM_QUEUES,
.eeprom_size = IL3945_EEPROM_IMG_SIZE,
.num_of_queues = IL39_NUM_QUEUES,
.pll_cfg_val = CSR39_ANA_PLL_CFG_VAL,
.set_l0s = false,
.use_bsm = true,
Expand All @@ -2703,9 +2703,9 @@ static struct il_base_params il3945_base_params = {

static struct il_cfg il3945_bg_cfg = {
.name = "3945BG",
.fw_name_pre = IWL3945_FW_PRE,
.ucode_api_max = IWL3945_UCODE_API_MAX,
.ucode_api_min = IWL3945_UCODE_API_MIN,
.fw_name_pre = IL3945_FW_PRE,
.ucode_api_max = IL3945_UCODE_API_MAX,
.ucode_api_min = IL3945_UCODE_API_MIN,
.sku = IL_SKU_G,
.eeprom_ver = EEPROM_3945_EEPROM_VERSION,
.ops = &il3945_ops,
Expand All @@ -2716,9 +2716,9 @@ static struct il_cfg il3945_bg_cfg = {

static struct il_cfg il3945_abg_cfg = {
.name = "3945ABG",
.fw_name_pre = IWL3945_FW_PRE,
.ucode_api_max = IWL3945_UCODE_API_MAX,
.ucode_api_min = IWL3945_UCODE_API_MIN,
.fw_name_pre = IL3945_FW_PRE,
.ucode_api_max = IL3945_UCODE_API_MAX,
.ucode_api_min = IL3945_UCODE_API_MIN,
.sku = IL_SKU_A|IL_SKU_G,
.eeprom_ver = EEPROM_3945_EEPROM_VERSION,
.ops = &il3945_ops,
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ extern const struct pci_device_id il3945_hw_card_ids[];
#include "iwl-led.h"

/* Highest firmware API version supported */
#define IWL3945_UCODE_API_MAX 2
#define IL3945_UCODE_API_MAX 2

/* Lowest firmware API version supported */
#define IWL3945_UCODE_API_MIN 1
#define IL3945_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)
#define IL3945_FW_PRE "iwlwifi-3945-"
#define _IL3945_MODULE_FIRMWARE(api) IL3945_FW_PRE #api ".ucode"
#define IL3945_MODULE_FIRMWARE(api) _IL3945_MODULE_FIRMWARE(api)

/* Default noise level to report when noise measurement is not available.
* This may be because we're:
Expand Down
Loading

0 comments on commit 37c5ff5

Please sign in to comment.