iwlwifi: fix various spelling and typos
PATCH 1/30 iwlwifi: fix various spelling and typos
From: Ian Schram <[email protected]>
Fixing various spelling errors and typos. Mostly in comments. In total 27 words were corrected, some of which occurred more than ones.
--- drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 2 +- drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 4 +- drivers/net/wireless/iwlwifi/iwl-3945-rs.h | 4 +- drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 2 +- drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 6 ++-- drivers/net/wireless/iwlwifi/iwl-4965-rs.h | 4 +- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 +- drivers/net/wireless/iwlwifi/iwl-commands.h | 2 +- drivers/net/wireless/iwlwifi/iwl-eeprom.h | 2 +- drivers/net/wireless/iwlwifi/iwl-hw.h | 2 +- drivers/net/wireless/iwlwifi/iwl-prph.h | 2 +- drivers/net/wireless/iwlwifi/iwl3945-base.c | 32 +++++++++++++------------- drivers/net/wireless/iwlwifi/iwl4965-base.c | 32 +++++++++++++------------- drivers/net/wireless/iwlwifi/iwlwifi.h | 6 ++-- 14 files changed, 52 insertions(+), 52 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-hw.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl-3945-rs.c +2 -2
@@ -358,7 +358,7 @@ static void *rs_alloc(struct ieee80211_local *local)return local->hw.priv; } -/* rate scale requires free function to be implmented */ +/* rate scale requires free function to be implemented */ static void rs_free (void *priv) {return ;
@@ -551,7 +551,7 @@ static u16 iwl_get_adjacent_rate(struct iwl_rate_scale_priv *rs_priv,u8 high =IWL_RATE_INVALID ;u8 low =IWL_RATE_INVALID ; -/* 802.11A walks to the next literal adjascent rate in +/* 802.11A walks to the next literal adjacent rate in * the rate table */ if (unlikely (phymode ==MODE_IEEE80211A )) {int i;
drivers/net/wireless/iwlwifi/iwl-3945-rs.h +2 -2
@@ -155,7 +155,7 @@ static inline u8 iwl_get_prev_ieee_rate(u8 rate_index)* iwl_fill_rs_info - Fill an output text buffer with the rate representation * * NOTE: This is provided as a quick mechanism for a user to visualize -* the performance of the rate control alogirthm and is not meant to be +* the performance of the rate control algorithm and is not meant to be * parsed software. */ extern int iwl_fill_rs_info (struct ieee80211_hw *,char *buf,u8 sta_id);
@@ -163,7 +163,7 @@ extern int iwl_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);/** * iwl_rate_scale_init - Initialize the rate scale table based on assoc info * -* The specific througput table used is based on the type of network +* The specific throughput table used is based on the type of network * the associated with, including A, B, G, and G w/ TGG protection */ extern void iwl_rate_scale_init (struct ieee80211_hw *hw,s32 sta_id);
drivers/net/wireless/iwlwifi/iwl-4965-hw.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl-4965-rs.c +3 -3
@@ -498,7 +498,7 @@ static u16 rs_get_adjacent_rate(u8 index, u16 rate_mask, int rate_type)u8 high =IWL_RATE_INVALID ;u8 low =IWL_RATE_INVALID ; -/* 802.11A or ht walks to the next literal adjascent rate in +/* 802.11A or ht walks to the next literal adjacent rate in * the rate table */ if (is_a_band (rate_type) || !is_legacy (rate_type)) {int i;
@@ -1413,7 +1413,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, index =IWL_INVALID_VALUE ; update_lq =1 ; -/* get the lowest availabe rate */ +/* get the lowest available rate */ for (i =0 ; i <=IWL_RATE_COUNT ; i++) {if ((1 << i) & rate_scale_index_msk) index = i;
@@ -2268,7 +2268,7 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id) max_time, good * 100 / samples, good, samples); else count += sprintf(&buf[count], "\nAverage rate: 0Mbs\n"); - count +=sprintf (&buf[count],"\nrate scale type %d anntena %d " + count +=sprintf (&buf[count],"\nrate scale type %d antenna %d " "active_search %d rate index %d\n" , lq_type, antenna, rs_priv->search_better_tbl, sta->last_txrate);
drivers/net/wireless/iwlwifi/iwl-4965-rs.h +2 -2
@@ -230,7 +230,7 @@ extern int iwl_rate_index_from_plcp(int plcp);* iwl_fill_rs_info - Fill an output text buffer with the rate representation * * NOTE: This is provided as a quick mechanism for a user to visualize -* the performance of the rate control alogirthm and is not meant to be +* the performance of the rate control algorithm and is not meant to be * parsed software. */ extern int iwl_fill_rs_info (struct ieee80211_hw *,char *buf,u8 sta_id);
@@ -238,7 +238,7 @@ extern int iwl_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);/** * iwl_rate_scale_init - Initialize the rate scale table based on assoc info * -* The specific througput table used is based on the type of network +* The specific throughput table used is based on the type of network * the associated with, including A, B, G, and G w/ TGG protection */ extern void iwl_rate_scale_init (struct ieee80211_hw *hw,s32 sta_id);
drivers/net/wireless/iwlwifi/iwl-4965.c +2 -2
@@ -4046,7 +4046,7 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl_priv *priv, agg->wait_for_ba =0 ;IWL_DEBUG_TX_REPLY ("BA %d %d\n" , agg->start_idx, ba_resp->ba_seq_ctl); sh = agg->start_idx -SEQ_TO_INDEX (ba_seq_ctl>>4 ); -if (sh <0 )/* tbw something is wrong with indeces */ +if (sh <0 )/* tbw something is wrong with indices */ sh +=0x100 ;/* don't use 64 bits for now */
@@ -4104,7 +4104,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv, agg = &priv->stations[ba_resp->sta_id].tid[ba_resp->tid].agg; index =iwl_queue_dec_wrap (ba_resp_scd_ssn &0xff , txq->q.n_bd); -/* TODO: Need to get this copy more sefely - now good for debug */ +/* TODO: Need to get this copy more safely - now good for debug */ /* IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from " MAC_FMT ", sta_id = %d\n",
drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl-eeprom.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl-hw.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl-prph.h +1 -1
@@ -8,7 +8,7 @@* Copyright(c) 2005 - 2007 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 Geeral Public License as +* 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
drivers/net/wireless/iwlwifi/iwl3945-base.c +16 -16
@@ -287,7 +287,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv, txq->txb =kmalloc (sizeof (txq->txb[0 ]) *TFD_QUEUE_SIZE_MAX ,GFP_KERNEL );if (!txq->txb) { -IWL_ERROR ("kmalloc for auxilary BD " +IWL_ERROR ("kmalloc for auxiliary BD " "structures failed\n" ); goto error; }
@@ -323,7 +323,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv,int len;int rc =0 ; -/* alocate command space + one big command for scan since scan +/* allocate command space + one big command for scan since scan * command is very huge the system will not have two scan at the * same time */ len =sizeof (struct iwl_cmd ) * slots_num;
@@ -405,7 +405,7 @@ const u8 BROADCAST_ADDR[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };*/ /**************************************************************/ -#if 0 /* temparary disable till we add real remove station */ +#if 0 /* temporary disable till we add real remove station */ static u8 iwl_remove_station (struct iwl_priv *priv,const u8 *addr,int is_ap) {int index =IWL_INVALID_STATION ;
@@ -481,7 +481,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags) index = i; } -/* These twh conditions has the same outcome but keep them separate +/* These two conditions has the same outcome but keep them separate since they have different meaning */ if (unlikely (index ==IWL_INVALID_STATION )) {spin_unlock_irqrestore (&priv->sta_lock, flags_spin);
@@ -958,7 +958,7 @@ static int iwl_check_rxon_cmd(struct iwl_rxon_cmd *rxon)/** * iwl_full_rxon_required - determine if RXON_ASSOC can be used in RXON commit -* @priv: staging_rxon is comapred to active_rxon +* @priv: staging_rxon is compared to active_rxon * * If the RXON structure is changing sufficient to require a new * tune or to clear and reset the RXON_FILTER_ASSOC_MSK then return 1
@@ -1046,7 +1046,7 @@ static int iwl_send_rxon_assoc(struct iwl_priv *priv)/** * iwl_commit_rxon - commit staging_rxon to hardware * -* The RXON command in staging_rxon is commited to the hardware and +* The RXON command in staging_rxon is committed to the hardware and * the active_rxon structure is updated with the new data. This * function correctly transitions out of the RXON_ASSOC_MSK state if * a HW tune is required based on the RXON structure changes.
@@ -2148,7 +2148,7 @@ static int iwl_send_power_mode(struct iwl_priv *priv, u32 mode)struct iwl_powertable_cmd cmd;/* If on battery, set to 3, -* if plugged into AC power, set to CAM ("continuosly aware mode"), +* if plugged into AC power, set to CAM ("continuously aware mode"), * else user level */ switch (mode) {case IWL_POWER_BATTERY :
@@ -2438,7 +2438,7 @@ static void iwl_set_flags_for_phymode(struct iwl_priv *priv, u8 phymode) }/* -* initilize rxon structure with default values fromm eeprom +* initialize rxon structure with default values from eeprom */ static void iwl_connection_init_rx_config (struct iwl_priv *priv) {
@@ -2700,7 +2700,7 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)return priv->hw_setting.bcast_sta_id;default : -IWL_WARNING ("Unkown mode of operation: %d" , priv->iw_mode); +IWL_WARNING ("Unknown mode of operation: %d" , priv->iw_mode);return priv->hw_setting.bcast_sta_id; } }
@@ -3880,7 +3880,7 @@ static void iwl_tx_cmd_complete(struct iwl_priv *priv,* The management in the driver is as follows: * + A list of pre-allocated SKBs is stored in iwl->rxq->rx_free. When * iwl->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled -* to replensish the iwl->rxq->rx_free. +* to replenish the iwl->rxq->rx_free. * + In iwl_rx_replenish (scheduled) if 'processed' != 'read' then the * iwl->rxq is replenished and the READ INDEX is updated (updating the * 'processed' and 'read' driver indexes as well)
@@ -4037,12 +4037,12 @@ int iwl_rx_queue_restock(struct iwl_priv *priv) }/** -* iwl_rx_replensih - Move all used packet from rx_used to rx_free +* iwl_rx_replenish - Move all used packet from rx_used to rx_free * * When moving to rx_free an SKB is allocated for the slot. * * Also restock the Rx queue via iwl_rx_queue_restock. -* This is called as a scheduled work item (except for during intialization) +* This is called as a scheduled work item (except for during initialization) */ void iwl_rx_replenish (void *data) {
@@ -6027,7 +6027,7 @@ static int iwl_set_ucode_ptrs(struct iwl_priv *priv) }/** -* iwl_init_alive_start - Called after REPLY_ALIVE notification receieved +* iwl_init_alive_start - Called after REPLY_ALIVE notification received * * Called after REPLY_ALIVE notification received from "initialize" uCode. *
@@ -6670,7 +6670,7 @@ static void iwl_bg_request_scan(struct work_struct *data)return ; done: -/* inform mac80211 sacn aborted */ +/* inform mac80211 scan aborted */ queue_work (priv->workqueue, &priv->scan_completed);mutex_unlock (&priv->mutex); }
@@ -6952,7 +6952,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) }/* TODO: Figure out how to get ieee80211_local->sta_scanning w/ only -* what is exposed through include/ declrations */ +* what is exposed through include/ declarations */ if (unlikely (!iwl_param_disable_hw_scan &&test_bit (STATUS_SCANNING , &priv->status))) {IWL_DEBUG_MAC80211 ("leave - scanning\n" );
@@ -8470,7 +8470,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)mutex_unlock (&priv->mutex); -IWL_DEBUG_INFO ("Queing UP work.\n" ); +IWL_DEBUG_INFO ("Queueing UP work.\n" );queue_work (priv->workqueue, &priv->up);
drivers/net/wireless/iwlwifi/iwl4965-base.c +16 -16
@@ -286,7 +286,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv, txq->txb =kmalloc (sizeof (txq->txb[0 ]) *TFD_QUEUE_SIZE_MAX ,GFP_KERNEL );if (!txq->txb) { -IWL_ERROR ("kmalloc for auxilary BD " +IWL_ERROR ("kmalloc for auxiliary BD " "structures failed\n" ); goto error; }
@@ -322,7 +322,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv,int len;int rc =0 ; -/* alocate command space + one big command for scan since scan +/* allocate command space + one big command for scan since scan * command is very huge the system will not have two scan at the * same time */ len =sizeof (struct iwl_cmd ) * slots_num;
@@ -405,7 +405,7 @@ const u8 BROADCAST_ADDR[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };/**************************************************************/ -#if 0 /* temparary disable till we add real remove station */ +#if 0 /* temporary disable till we add real remove station */ static u8 iwl_remove_station (struct iwl_priv *priv,const u8 *addr,int is_ap) {int index =IWL_INVALID_STATION ;
@@ -481,7 +481,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags) } -/* These twh conditions has the same outcome but keep them separate +/* These two conditions has the same outcome but keep them separate since they have different meaning */ if (unlikely (index ==IWL_INVALID_STATION )) {spin_unlock_irqrestore (&priv->sta_lock, flags_spin);
@@ -969,7 +969,7 @@ static int iwl_check_rxon_cmd(struct iwl_rxon_cmd *rxon)/** * iwl_full_rxon_required - determine if RXON_ASSOC can be used in RXON commit -* @priv: staging_rxon is comapred to active_rxon +* @priv: staging_rxon is compared to active_rxon * * If the RXON structure is changing sufficient to require a new * tune or to clear and reset the RXON_FILTER_ASSOC_MSK then return 1
@@ -1072,7 +1072,7 @@ static int iwl_send_rxon_assoc(struct iwl_priv *priv)/** * iwl_commit_rxon - commit staging_rxon to hardware * -* The RXON command in staging_rxon is commited to the hardware and +* The RXON command in staging_rxon is committed to the hardware and * the active_rxon structure is updated with the new data. This * function correctly transitions out of the RXON_ASSOC_MSK state if * a HW tune is required based on the RXON structure changes.
@@ -2222,7 +2222,7 @@ static int iwl_send_power_mode(struct iwl_priv *priv, u32 mode)struct iwl_powertable_cmd cmd;/* If on battery, set to 3, -* if plugged into AC power, set to CAM ("continuosly aware mode"), +* if plugged into AC power, set to CAM ("continuously aware mode"), * else user level */ switch (mode) {case IWL_POWER_BATTERY :
@@ -2514,7 +2514,7 @@ static void iwl_set_flags_for_phymode(struct iwl_priv *priv, u8 phymode) }/* -* initilize rxon structure with default values fromm eeprom +* initialize rxon structure with default values from eeprom */ static void iwl_connection_init_rx_config (struct iwl_priv *priv) {
@@ -2784,7 +2784,7 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)return priv->hw_setting.bcast_sta_id;default : -IWL_WARNING ("Unkown mode of operation: %d" , priv->iw_mode); +IWL_WARNING ("Unknown mode of operation: %d" , priv->iw_mode);return priv->hw_setting.bcast_sta_id; } }
@@ -4201,7 +4201,7 @@ static void iwl_tx_cmd_complete(struct iwl_priv *priv,* The management in the driver is as follows: * + A list of pre-allocated SKBs is stored in iwl->rxq->rx_free. When * iwl->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled -* to replensish the iwl->rxq->rx_free. +* to replenish the iwl->rxq->rx_free. * + In iwl_rx_replenish (scheduled) if 'processed' != 'read' then the * iwl->rxq is replenished and the READ INDEX is updated (updating the * 'processed' and 'read' driver indexes as well)
@@ -4359,12 +4359,12 @@ int iwl_rx_queue_restock(struct iwl_priv *priv) }/** -* iwl_rx_replensih - Move all used packet from rx_used to rx_free +* iwl_rx_replenish - Move all used packet from rx_used to rx_free * * When moving to rx_free an SKB is allocated for the slot. * * Also restock the Rx queue via iwl_rx_queue_restock. -* This is called as a scheduled work item (except for during intialization) +* This is called as a scheduled work item (except for during initialization) */ void iwl_rx_replenish (void *data) {
@@ -6400,7 +6400,7 @@ static int iwl_set_ucode_ptrs(struct iwl_priv *priv) }/** -* iwl_init_alive_start - Called after REPLY_ALIVE notification receieved +* iwl_init_alive_start - Called after REPLY_ALIVE notification received * * Called after REPLY_ALIVE notification received from "initialize" uCode. *
@@ -7045,7 +7045,7 @@ static void iwl_bg_request_scan(struct work_struct *data)return ; done: -/* inform mac80211 sacn aborted */ +/* inform mac80211 scan aborted */ queue_work (priv->workqueue, &priv->scan_completed);mutex_unlock (&priv->mutex); }
@@ -7342,7 +7342,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) }/* TODO: Figure out how to get ieee80211_local->sta_scanning w/ only -* what is exposed through include/ declrations */ +* what is exposed through include/ declarations */ if (unlikely (!iwl_param_disable_hw_scan &&test_bit (STATUS_SCANNING , &priv->status))) {IWL_DEBUG_MAC80211 ("leave - scanning\n" );
@@ -9066,7 +9066,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)mutex_unlock (&priv->mutex); -IWL_DEBUG_INFO ("Queing UP work.\n" ); +IWL_DEBUG_INFO ("Queueing UP work.\n" );queue_work (priv->workqueue, &priv->up);
drivers/net/wireless/iwlwifi/iwlwifi.h +3 -3
@@ -54,9 +54,9 @@ extern struct pci_device_id iwl_hw_card_ids[];* Driver implementation data structures, constants, inline * functions * -* NOTE: DO NOT PUT HARDWARE/UCODE SPECIFIC DECLRATIONS HERE +* NOTE: DO NOT PUT HARDWARE/UCODE SPECIFIC DECLARATIONS HERE * -* Hardware specific declrations go into iwl-*hw.h +* Hardware specific declarations go into iwl-*hw.h * */
@@ -467,7 +467,7 @@ union iwl_qos_capabity {u8 val; }; -/* QoS sturctures */ +/* QoS structures */ struct iwl_qos_info {int qos_enable;int qos_active;
Signature · 1 line
1.5.2
PATCH 2/30 iwlwifi: rename iwl_eeprom_aqcuire_semaphore to _acquire_
From: Ian Schram <[email protected]>
Correct the spelling of aqcuire.
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 2 +- drivers/net/wireless/iwlwifi/iwl-3945.h | 2 +- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 ++-- drivers/net/wireless/iwlwifi/iwl-4965.h | 2 +- drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 ++-- drivers/net/wireless/iwlwifi/iwl4965-base.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
@@ -2282,7 +2282,7 @@ struct pci_device_id iwl_hw_card_ids[] = { {0} }; -inline int iwl_eeprom_aqcuire_semaphore (struct iwl_priv *priv) +inline int iwl_eeprom_acquire_semaphore (struct iwl_priv *priv) {_iwl_clear_bit (priv,CSR_EEPROM_GP ,CSR_EEPROM_GP_IF_OWNER_MSK );return 0 ;
drivers/net/wireless/iwlwifi/iwl-3945.h +1 -1
@@ -30,7 +30,7 @@/* * Forward declare iwl-3945.c functions for iwl-base.c */ -extern int iwl_eeprom_aqcuire_semaphore (struct iwl_priv *priv); +extern int iwl_eeprom_acquire_semaphore (struct iwl_priv *priv);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);
drivers/net/wireless/iwlwifi/iwl-4965.c +2 -2
@@ -4687,7 +4687,7 @@ struct pci_device_id iwl_hw_card_ids[] = { {0} }; -int iwl_eeprom_aqcuire_semaphore (struct iwl_priv *priv) +int iwl_eeprom_acquire_semaphore (struct iwl_priv *priv) {u16 count;int rc;
@@ -4700,7 +4700,7 @@ int iwl_eeprom_aqcuire_semaphore(struct iwl_priv *priv)CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM , EEPROM_SEM_TIMEOUT);if (rc >=0 ) { -IWL_DEBUG_IO ("Aqcuired semaphore after %d tries.\n" , +IWL_DEBUG_IO ("Acquired semaphore after %d tries.\n" , count+1 );return rc; }
drivers/net/wireless/iwlwifi/iwl-4965.h +1 -1
@@ -32,7 +32,7 @@ struct sta_ht_info;/* * Forward declare iwl-4965.c functions for iwl-base.c */ -extern int iwl_eeprom_aqcuire_semaphore (struct iwl_priv *priv); +extern int iwl_eeprom_acquire_semaphore (struct iwl_priv *priv);extern void iwl_eeprom_release_semaphore (struct iwl_priv *priv); extern int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
drivers/net/wireless/iwlwifi/iwl3945-base.c +2 -2
@@ -1551,9 +1551,9 @@ int iwl_eeprom_init(struct iwl_priv *priv)return -ENOENT ; } - rc =iwl_eeprom_aqcuire_semaphore (priv); + rc =iwl_eeprom_acquire_semaphore (priv);if (rc <0 ) { -IWL_ERROR ("Failed to aqcuire EEPROM semaphore.\n" ); +IWL_ERROR ("Failed to acquire EEPROM semaphore.\n" );return -ENOENT ; }
drivers/net/wireless/iwlwifi/iwl4965-base.c +2 -2
@@ -1600,9 +1600,9 @@ int iwl_eeprom_init(struct iwl_priv *priv)return -ENOENT ; } - rc =iwl_eeprom_aqcuire_semaphore (priv); + rc =iwl_eeprom_acquire_semaphore (priv);if (rc <0 ) { -IWL_ERROR ("Failed to aqcuire EEPROM semaphore.\n" ); +IWL_ERROR ("Failed to acquire EEPROM semaphore.\n" );return -ENOENT ; }
Signature · 1 line
1.5.2
PATCH 3/30 iwlwifi: renaming last_used and first_empty
From: Tomas Winkler <[email protected]>
This patch renames queue pointers to write_ptr and read_ptr instead of first_empty and last_used. This is closer to technical terminology we everyday use
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 12 +++--- drivers/net/wireless/iwlwifi/iwl-4965.c | 26 +++++----- drivers/net/wireless/iwlwifi/iwl3945-base.c | 60 ++++++++++++------------ drivers/net/wireless/iwlwifi/iwl4965-base.c | 64 +++++++++++++------------- drivers/net/wireless/iwlwifi/iwlwifi.h | 4 +- 5 files changed, 83 insertions(+), 83 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +6 -6
@@ -517,14 +517,14 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, }/** -* iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.last_used] +* iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.read_ptr] * * Does NOT advance any indexes */ int iwl_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl_tx_queue *txq) {struct iwl_tfd_frame *bd_tmp = (struct iwl_tfd_frame *)&txq->bd[0 ]; -struct iwl_tfd_frame *bd = &bd_tmp[txq->q.last_used]; +struct iwl_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];struct pci_dev *dev = priv->pci_dev;int i;int counter;
@@ -547,12 +547,12 @@ int iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)for (i =1 ; i < counter; i++) {pci_unmap_single (dev,le32_to_cpu (bd->pa[i].addr),le32_to_cpu (bd->pa[i].len),PCI_DMA_TODEVICE ); -if (txq->txb[txq->q.last_used].skb[0 ]) { -struct sk_buff *skb = txq->txb[txq->q.last_used].skb[0 ]; -if (txq->txb[txq->q.last_used].skb[0 ]) { +if (txq->txb[txq->q.read_ptr].skb[0 ]) { +struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[0 ]; +if (txq->txb[txq->q.read_ptr].skb[0 ]) {/* Can be called from interrupt context */ dev_kfree_skb_any (skb); - txq->txb[txq->q.last_used].skb[0 ] =NULL ; + txq->txb[txq->q.read_ptr].skb[0 ] =NULL ; } } }
drivers/net/wireless/iwlwifi/iwl-4965.c +13 -13
@@ -1748,14 +1748,14 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv) }/** -* iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.last_used] +* iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.read_ptr] * * Does NOT advance any indexes */ int iwl_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl_tx_queue *txq) {struct iwl_tfd_frame *bd_tmp = (struct iwl_tfd_frame *)&txq->bd[0 ]; -struct iwl_tfd_frame *bd = &bd_tmp[txq->q.last_used]; +struct iwl_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];struct pci_dev *dev = priv->pci_dev;int i;int counter =0 ;
@@ -1795,11 +1795,11 @@ int iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)IWL_GET_BITS (bd->pa[index], tb1_len), PCI_DMA_TODEVICE); -if (txq->txb[txq->q.last_used].skb[i]) { -struct sk_buff *skb = txq->txb[txq->q.last_used].skb[i]; +if (txq->txb[txq->q.read_ptr].skb[i]) { +struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[i];dev_kfree_skb (skb); - txq->txb[txq->q.last_used].skb[i] =NULL ; + txq->txb[txq->q.read_ptr].skb[i] =NULL ; } }return 0 ;
@@ -2775,11 +2775,11 @@ int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv, len = byte_cnt +IWL_TX_CRC_SIZE +IWL_TX_DELIMITER_SIZE ;IWL_SET_BITS16 (shared_data->queues_byte_cnt_tbls[txq_id]. - tfd_offset[txq->q.first_empty], byte_cnt, len); + tfd_offset[txq->q.write_ptr], byte_cnt, len); -if (txq->q.first_empty <IWL4965_MAX_WIN_SIZE ) +if (txq->q.write_ptr <IWL4965_MAX_WIN_SIZE )IWL_SET_BITS16 (shared_data->queues_byte_cnt_tbls[txq_id]. - tfd_offset[IWL4965_QUEUE_SIZE + txq->q.first_empty], + tfd_offset[IWL4965_QUEUE_SIZE + txq->q.write_ptr], byte_cnt, len);return 0 ;
@@ -4126,7 +4126,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,*/ iwl4965_tx_status_reply_compressed_ba (priv, agg, ba_resp);/* releases all the TFDs until the SSN */ -if (txq->q.last_used != (ba_resp_scd_ssn &0xff )) +if (txq->q.read_ptr != (ba_resp_scd_ssn &0xff ))iwl_tx_queue_reclaim (priv, ba_resp_scd_flow, index); }
@@ -4197,8 +4197,8 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,iwl_set_bits_restricted_reg (priv,SCD_QUEUECHAIN_SEL , (1 <<txq_id)); - priv->txq[txq_id].q.last_used = (ssn_idx &0xff ); - priv->txq[txq_id].q.first_empty = (ssn_idx &0xff ); + priv->txq[txq_id].q.read_ptr = (ssn_idx &0xff ); + priv->txq[txq_id].q.write_ptr = (ssn_idx &0xff );/* supposes that ssn_idx is valid (!= 0xFFF) */ iwl4965_set_wr_ptrs (priv, txq_id, ssn_idx);
@@ -4249,8 +4249,8 @@ static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,iwl_clear_bits_restricted_reg (priv,SCD_QUEUECHAIN_SEL , (1 << txq_id)); - priv->txq[txq_id].q.last_used = (ssn_idx &0xff ); - priv->txq[txq_id].q.first_empty = (ssn_idx &0xff ); + priv->txq[txq_id].q.read_ptr = (ssn_idx &0xff ); + priv->txq[txq_id].q.write_ptr = (ssn_idx &0xff );/* supposes that ssn_idx is valid (!= 0xFFF) */ iwl4965_set_wr_ptrs (priv, txq_id, ssn_idx);
drivers/net/wireless/iwlwifi/iwl3945-base.c +30 -30
166 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl4965-base.c +32 -32
186 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwlwifi.h +2 -2
@@ -144,8 +144,8 @@ struct iwl_rt_tx_hdr {*/ struct iwl_queue {int n_bd;/* number of BDs in this queue */ -int first_empty;/* 1-st empty entry (index) host_w*/ -int last_used;/* last used entry (index) host_r*/ +int write_ptr;/* 1-st empty entry (index) host_w*/ +int read_ptr;/* last used entry (index) host_r*/ dma_addr_t dma_addr;/* physical addr for BD's */ int n_window;/* safe queue window */ u32 id;
Signature · 1 line
1.5.2
PATCH 4/30 iwlwifi: rs-4965 fix return values
From: Tomas Winkler <[email protected]>
This patch cleans up style of 'return' of rate scale 4965 functions. It renames return name variables rc to ret, change functions to void if no meaningful value was returned it add return of -EINVAL for checks of wrong arguments.
--- drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 101 ++++++++++------------------ 1 files changed, 37 insertions(+), 64 deletions(-)
drivers/net/wireless/iwlwifi/iwl-4965-rs.c +37 -64
@@ -202,8 +202,6 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,#ifdef CONFIG_IWLWIFI_DEBUG int i;#endif -int rc =-1 ; -struct iwl_host_cmd cmd = { .id =REPLY_TX_LINK_QUALITY_CMD , .len =sizeof (struct iwl_link_quality_cmd ),
@@ -213,7 +211,7 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,if ((lq->sta_id ==0xFF ) && (priv->iw_mode ==IEEE80211_IF_TYPE_IBSS )) -return rc; +return -EINVAL ;if (lq->sta_id ==0xFF ) lq->sta_id =IWL_AP_ID ;
@@ -233,12 +231,12 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,if (iwl_is_associated (priv) && priv->assoc_station_added && priv->lq_mngr.lq_ready) - rc =iwl_send_cmd (priv, &cmd); +return iwl_send_cmd (priv, &cmd); -return rc; +return 0 ; } -static int rs_rate_scale_clear_window (struct iwl_rate_scale_data *window) +static void rs_rate_scale_clear_window (struct iwl_rate_scale_data *window) { window->data =0 ; window->success_counter =0 ;
@@ -246,24 +244,18 @@ static int rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) window->counter =0 ; window->average_tpt =IWL_INVALID_VALUE ; window->stamp =0 ; - -return 0 ; }static int rs_collect_tx_data (struct iwl_rate_scale_data *windows,int scale_index,s32 tpt,u32 status) { -int rc =0 ;struct iwl_rate_scale_data *window =NULL ;u64 mask;u8 win_size =IWL_RATE_MAX_WINDOW ;s32 fail_count; -if (scale_index <0 ) -return -1 ; - -if (scale_index >=IWL_RATE_COUNT ) -return -1 ; +if (scale_index <0 || scale_index >=IWL_RATE_COUNT ) +return -EINVAL ; window = &(windows[scale_index]);
@@ -302,15 +294,13 @@ static int rs_collect_tx_data(struct iwl_rate_scale_data *windows, window->stamp = jiffies; -return rc; +return 0 ; } -int static rs_mcs_from_tbl (struct iwl_rate *mcs_rate, +static void rs_mcs_from_tbl (struct iwl_rate *mcs_rate,struct iwl_scale_tbl_info *tbl,int index,u8 use_green) { -int rc =0 ; -if (is_legacy (tbl->lq_type)) { mcs_rate->rate_n_flags = iwl_rates[index].plcp;if (index >=IWL_FIRST_CCK_RATE && index <=IWL_LAST_CCK_RATE )
@@ -343,7 +333,7 @@ int static rs_mcs_from_tbl(struct iwl_rate *mcs_rate, }if (is_legacy (tbl->lq_type)) -return rc; +return ;if (tbl->is_fat) {if (tbl->is_dup)
@@ -359,7 +349,6 @@ int static rs_mcs_from_tbl(struct iwl_rate *mcs_rate,if (is_siso (tbl->lq_type)) mcs_rate->rate_n_flags &= ~RATE_MCS_SGI_MSK ; } -return rc; } static int rs_get_tbl_info_from_mcs(const struct iwl_rate *mcs_rate,
@@ -373,7 +362,7 @@ static int rs_get_tbl_info_from_mcs(const struct iwl_rate *mcs_rate,if (index ==IWL_RATE_INVALID ) { *rate_idx =-1 ; -return -1 ; +return -EINVAL ; } tbl->is_SGI =0 ; tbl->is_fat =0 ;
@@ -453,18 +442,16 @@ static inline void rs_toggle_antenna(struct iwl_rate *new_rate, } } -static inline s8 rs_use_green (struct iwl_priv *priv) +static inline u8 rs_use_green (struct iwl_priv *priv) { -s8 rc =0 ;#ifdef CONFIG_IWLWIFI_HT if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht)return 0 ; -if ((priv->current_assoc_ht.is_green_field) && - !(priv->current_assoc_ht.operating_mode &0x4 )) - rc =1 ; +return ((priv->current_assoc_ht.is_green_field) && + !(priv->current_assoc_ht.operating_mode &0x4 ));#endif /*CONFIG_IWLWIFI_HT */ -return rc; +return 0 ; }/**
@@ -548,7 +535,7 @@ static u16 rs_get_adjacent_rate(u8 index, u16 rate_mask, int rate_type)return (high <<8 ) | low; } -static int rs_get_lower_rate (struct iwl_rate_scale_priv *lq_data, +static void rs_get_lower_rate (struct iwl_rate_scale_priv *lq_data,struct iwl_scale_tbl_info *tbl,u8 scale_index,u8 ht_possible,struct iwl_rate *mcs_rate) {
@@ -589,10 +576,9 @@ static int rs_get_lower_rate(struct iwl_rate_scale_priv *lq_data, }/* if we did switched from HT to legacy check current rate */ -if ((switch_to_legacy) && - (rate_mask & (1 << scale_index))) { +if (switch_to_legacy && (rate_mask & (1 << scale_index))) {rs_mcs_from_tbl (mcs_rate, tbl, scale_index, is_green); -return 0 ; +return ; } high_low =rs_get_adjacent_rate (scale_index, rate_mask, tbl->lq_type);
@@ -602,8 +588,6 @@ static int rs_get_lower_rate(struct iwl_rate_scale_priv *lq_data,rs_mcs_from_tbl (mcs_rate, tbl, low, is_green); elsers_mcs_from_tbl (mcs_rate ,tbl ,scale_index ,is_green ); - -return 0 ; } static void rs_tx_status(void *priv_rate,
@@ -775,12 +759,8 @@ static u8 rs_is_ant_connected(u8 valid_antenna,return ((valid_antenna &0x2 ) ?1 :0 ); else if (antenna_type == ANT_MAIN) return ((valid_antenna & 0x1) ? 1:0); - else if (antenna_type == ANT_BOTH) { -if ((valid_antenna &0x3 ) ==0x3 ) -return 1 ; -else -return 0 ; - } + else if (antenna_type == ANT_BOTH) + return ((valid_antenna & 0x3) == 0x3);return 1 ; }
@@ -789,9 +769,9 @@ static u8 rs_is_other_ant_connected(u8 valid_antenna, enum iwl_antenna_type antenna_type) {if (antenna_type ==ANT_AUX ) -return (rs_is_ant_connected (valid_antenna,ANT_MAIN )); +return rs_is_ant_connected (valid_antenna,ANT_MAIN );else -return (rs_is_ant_connected (valid_antenna,ANT_AUX )); +return rs_is_ant_connected (valid_antenna,ANT_AUX );return 0 ; }
@@ -912,7 +892,6 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, int index) { - int rc = -1; #ifdef CONFIG_IWLWIFI_HT u16 rate_mask;s32 rate;
@@ -932,7 +911,6 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,if (!rs_is_both_ant_supp (lq_data->antenna))return -1 ; - rc =0 ; tbl->is_dup = lq_data->is_dup; tbl->action =0 ;if (priv->current_channel_width ==IWL_CHANNEL_WIDTH_40MHZ )
@@ -963,14 +941,13 @@ static int rs_switch_to_mimo(struct iwl_priv *priv, tbl->current_rate.rate_n_flags, is_green);#endif /*CONFIG_IWLWIFI_HT */ -return rc; +return 0 ; }static int rs_switch_to_siso (struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data,struct iwl_scale_tbl_info *tbl,int index) { -int rc =-1 ;#ifdef CONFIG_IWLWIFI_HT u16 rate_mask;u8 is_green = lq_data->is_green;
@@ -980,7 +957,6 @@ static int rs_switch_to_siso(struct iwl_priv *priv,if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht)return -1 ; - rc =0 ; tbl->is_dup = lq_data->is_dup; tbl->lq_type =LQ_SISO ; tbl->action =0 ;
@@ -1019,14 +995,14 @@ static int rs_switch_to_siso(struct iwl_priv *priv, tbl->current_rate.rate_n_flags, is_green);#endif /*CONFIG_IWLWIFI_HT */ -return rc; +return 0 ; }static int rs_move_legacy_other (struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data,int index) { -int rc =0 ; +int ret =0 ;struct iwl_scale_tbl_info *tbl = &(lq_data->lq_info[lq_data->active_tbl]); struct iwl_scale_tbl_info *search_tbl =
@@ -1063,14 +1039,13 @@ static int rs_move_legacy_other(struct iwl_priv *priv, search_tbl->lq_type =LQ_SISO ; search_tbl->is_SGI =0 ; search_tbl->is_fat =0 ; - rc =rs_switch_to_siso (priv, lq_data, search_tbl, + ret =rs_switch_to_siso (priv, lq_data, search_tbl, index); -if (!rc) { +if (!ret) { lq_data->search_better_tbl =1 ; lq_data->action_counter =0 ; - } -if (!rc) goto out; + }break ;case IWL_LEGACY_SWITCH_MIMO :
@@ -1080,14 +1055,13 @@ static int rs_move_legacy_other(struct iwl_priv *priv, search_tbl->is_SGI =0 ; search_tbl->is_fat =0 ; search_tbl->antenna_type =ANT_BOTH ; - rc =rs_switch_to_mimo (priv, lq_data, search_tbl, + ret =rs_switch_to_mimo (priv, lq_data, search_tbl, index); -if (!rc) { +if (!ret) { lq_data->search_better_tbl =1 ; lq_data->action_counter =0 ; - } -if (!rc) goto out; + }break ; } tbl->action++;
@@ -1112,7 +1086,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data, int index) { - int rc = -1; + int ret;u8 is_green = lq_data->is_green;struct iwl_scale_tbl_info *tbl = &(lq_data->lq_info[lq_data->active_tbl]);
@@ -1150,13 +1124,12 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, search_tbl->is_SGI =0 ; search_tbl->is_fat =0 ; search_tbl->antenna_type =ANT_BOTH ; - rc =rs_switch_to_mimo (priv, lq_data, search_tbl, + ret =rs_switch_to_mimo (priv, lq_data, search_tbl, index); -if (!rc) +if (!ret) { lq_data->search_better_tbl =1 ; - -if (!rc) goto out; + }break ;case IWL_SISO_SWITCH_GI :IWL_DEBUG_HT ("LQ: SISO SWITCH TO GI\n" );
@@ -1203,7 +1176,7 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data, int index) { - int rc = -1; + int ret;s8 is_green = lq_data->is_green;struct iwl_scale_tbl_info *tbl = &(lq_data->lq_info[lq_data->active_tbl]);
@@ -1228,9 +1201,9 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv,else search_tbl->antenna_type =ANT_AUX ; - rc =rs_switch_to_siso (priv, lq_data, search_tbl, + ret =rs_switch_to_siso (priv, lq_data, search_tbl, index); -if (!rc) { +if (!ret) { lq_data->search_better_tbl =1 ; goto out; }
Signature · 1 line
1.5.2
PATCH 5/30 iwlwifi: add TGN flag to qos parameters
From: Tomas Winkler <[email protected]>
This patch adds TGN flag to QoS parameters. This flag governs enablement of NAV shortening with CF-End and filters in 4 or 8K RX AMSDU packets
--- drivers/net/wireless/iwlwifi/iwl4965-base.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl4965-base.c +8 -3
@@ -2055,16 +2055,21 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) !priv->qos_data.qos_cap.q_AP.txop_request) priv->qos_data.def_qos_parm.qos_flags |=QOS_PARAM_FLG_TXOP_TYPE_MSK ; -if (priv->qos_data.qos_active) priv->qos_data.def_qos_parm.qos_flags |=QOS_PARAM_FLG_UPDATE_EDCA_MSK ; +#ifdef CONFIG_IWLWIFI_HT +if (priv->is_ht_enabled && priv->current_assoc_ht.is_ht) + priv->qos_data.def_qos_parm.qos_flags |=QOS_PARAM_FLG_TGN_MSK ; +#endif /* CONFIG_IWLWIFI_HT */ +spin_unlock_irqrestore (&priv->lock, flags);if (force ||iwl_is_associated (priv)) { -IWL_DEBUG_QOS ("send QoS cmd with Qos active %d \n" , - priv->qos_data.qos_active); +IWL_DEBUG_QOS ("send QoS cmd with Qos active=%d FLAGS=0x%X\n" , + priv->qos_data.qos_active, + priv->qos_data.def_qos_parm.qos_flags);iwl_send_qos_params_command (priv, &(priv->qos_data.def_qos_parm));
Signature · 1 line
1.5.2
PATCH 6/30 iwlwifi: remove cck_flag from iwl_driver_hw_info
From: Tomas Winkler <[email protected]>
This patch remove cck_flag from iwl_driver_hw_info, this flag is unused after spliting the iwl-base.c
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 1 - drivers/net/wireless/iwlwifi/iwl-4965.c | 2 -- drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 ++++-- drivers/net/wireless/iwlwifi/iwlwifi.h | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +0 -1
@@ -2210,7 +2210,6 @@ int iwl_hw_set_hw_setting(struct iwl_priv *priv) priv->hw_setting.tx_cmd_len =sizeof (struct iwl_tx_cmd ); priv->hw_setting.max_rxq_size =RX_QUEUE_SIZE ; priv->hw_setting.max_rxq_log =RX_QUEUE_SIZE_LOG ; - priv->hw_setting.cck_flag =0 ; priv->hw_setting.max_stations =IWL3945_STATION_COUNT ; priv->hw_setting.bcast_sta_id =IWL3945_BROADCAST_ID ;return 0 ;
drivers/net/wireless/iwlwifi/iwl-4965.c +0 -2
@@ -1720,8 +1720,6 @@ int iwl_hw_set_hw_setting(struct iwl_priv *priv) priv->hw_setting.max_txq_num = iwl_param_queues_num; priv->hw_setting.ac_queue_count =AC_NUM ; - - priv->hw_setting.cck_flag =RATE_MCS_CCK_MSK ; priv->hw_setting.tx_cmd_len =sizeof (struct iwl_tx_cmd ); priv->hw_setting.max_rxq_size =RX_QUEUE_SIZE ; priv->hw_setting.max_rxq_log =RX_QUEUE_SIZE_LOG ;
drivers/net/wireless/iwlwifi/iwl3945-base.c +4 -2
@@ -505,8 +505,10 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags) station->sta.sta.sta_id = index; station->sta.station_flags =0 ; - rate = (priv->phymode ==MODE_IEEE80211A ) ?IWL_RATE_6M_PLCP : -IWL_RATE_1M_PLCP | priv->hw_setting.cck_flag; +if (priv->phymode ==MODE_IEEE80211A ) + rate =IWL_RATE_6M_PLCP ; +else + rate =IWL_RATE_1M_PLCP ;/* Turn on both antennas for the station... */ station->sta.rate_n_flags =
drivers/net/wireless/iwlwifi/iwlwifi.h +1 -2
@@ -527,11 +527,10 @@ struct iwl_ibss_seq {struct iwl_driver_hw_info {u16 max_txq_num;u16 ac_queue_count; -u32 rx_buffer_size;u16 tx_cmd_len;u16 max_rxq_size; +u32 rx_buffer_size;u16 max_rxq_log; -u32 cck_flag;u8 max_stations;u8 bcast_sta_id;void *shared_virt;
Signature · 1 line
1.5.2
PATCH 7/30 iwlwifi: Two comments in iwl-3945.c were longer than 80 columns
From: Ian Schram <[email protected]>
This patch shorten two comments lines in iwl-3945.c
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +6 -4
@@ -1136,8 +1136,9 @@ int iwl_hw_nic_reset(struct iwl_priv *priv) }/** -* iwl_hw_reg_adjust_power_by_temp - return index delta into power gain settings table -*/ +* iwl_hw_reg_adjust_power_by_temp +* return index delta into power gain settings table +*/ static int iwl_hw_reg_adjust_power_by_temp (int new_reading,int old_reading) {return (new_reading - old_reading) * (-11 ) /100 ;
@@ -1157,8 +1158,9 @@ int iwl_hw_get_temperature(struct iwl_priv *priv) }/** -* iwl_hw_reg_txpower_get_temperature - get current temperature by reading from NIC -*/ +* iwl_hw_reg_txpower_get_temperature +* get the current temperature by reading from NIC +*/ static int iwl_hw_reg_txpower_get_temperature (struct iwl_priv *priv) {int temperature;
Signature · 1 line
1.5.2
PATCH 8/30 iwlwifi: Beautify by removing superfluous newlines and code
From: Ian Schram <[email protected]>
Moving code around, lindent, and whatnot created several places where there appeared to be an 75 column "rule" instead of 80. This patch removes those that I can spot, hopefully increasing readability.
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 44 +++++++++----------------- drivers/net/wireless/iwlwifi/iwl4965-base.c | 19 ++++-------- 2 files changed, 21 insertions(+), 42 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +15 -29
@@ -1350,7 +1350,6 @@ static int iwl_update_sta_key_info(struct iwl_priv *priv,break ;case ALG_TKIP :case ALG_WEP : -return -EINVAL ;default :return -EINVAL ; }
@@ -2645,11 +2644,9 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv,if ((fc &IEEE80211_FCTL_FTYPE ) ==IEEE80211_FTYPE_MGMT ) {if ((fc &IEEE80211_FCTL_STYPE ) ==IEEE80211_STYPE_ASSOC_REQ || (fc &IEEE80211_FCTL_STYPE ) ==IEEE80211_STYPE_REASSOC_REQ ) - cmd->cmd.tx.timeout.pm_frame_timeout = -cpu_to_le16 (3 ); + cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (3 );else - cmd->cmd.tx.timeout.pm_frame_timeout = -cpu_to_le16 (2 ); + cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (2 ); }else cmd->cmd.tx.timeout.pm_frame_timeout =0 ;
@@ -3148,24 +3145,21 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)int index = mac[5 ] & (IWL_IBSS_MAC_HASH_SIZE -1 );__list_for_each (p, &priv->ibss_mac_hash[index]) { - entry = - list_entry(p, struct iwl_ibss_seq, list); + entry = list_entry(p, struct iwl_ibss_seq, list);if (!compare_ether_addr (entry->mac, mac))break ; }if (p == &priv->ibss_mac_hash[index]) { entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (!entry) { -IWL_ERROR - ("Cannot malloc new mac entry\n" ); +IWL_ERROR ("Cannot malloc new mac entry\n" );return 0 ; }memcpy (entry->mac, mac,ETH_ALEN ); entry->seq_num = seq; entry->frag_num = frag; entry->packet_time = jiffies; -list_add (&entry->list, - &priv->ibss_mac_hash[index]); +list_add (&entry->list, &priv->ibss_mac_hash[index]);return 0 ; } last_seq = &entry->seq_num;
@@ -3312,9 +3306,8 @@ static int iwl_get_measurement(struct iwl_priv *priv,switch (spectrum_resp_status) {case 0 :/* Command will be handled */ if (res->u.spectrum.id !=0xff ) { -IWL_DEBUG_INFO - ("Replaced existing measurement: %d\n" , - res->u.spectrum.id); +IWL_DEBUG_INFO ("Replaced existing measurement: %d\n" , + res->u.spectrum.id); priv->measurement_status &= ~MEASUREMENT_READY ; } priv->measurement_status |=MEASUREMENT_ACTIVE ;
@@ -5512,8 +5505,7 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 * image, u32 len)iwl_release_restricted_access (priv);if (!errcnt) -IWL_DEBUG_INFO - ("ucode image in INSTRUCTION memory is good\n" ); +IWL_DEBUG_INFO ("ucode image in INSTRUCTION memory is good\n" );return rc; }
@@ -5812,16 +5804,11 @@ static int iwl_read_ucode(struct iwl_priv *priv) boot_size =le32_to_cpu (ucode->boot_size);IWL_DEBUG_INFO ("f/w package hdr ucode version = 0x%x\n" , ver); -IWL_DEBUG_INFO ("f/w package hdr runtime inst size = %u\n" , - inst_size); -IWL_DEBUG_INFO ("f/w package hdr runtime data size = %u\n" , - data_size); -IWL_DEBUG_INFO ("f/w package hdr init inst size = %u\n" , - init_size); -IWL_DEBUG_INFO ("f/w package hdr init data size = %u\n" , - init_data_size); -IWL_DEBUG_INFO ("f/w package hdr boot inst size = %u\n" , - boot_size); +IWL_DEBUG_INFO ("f/w package hdr runtime inst size = %u\n" , inst_size); +IWL_DEBUG_INFO ("f/w package hdr runtime data size = %u\n" , data_size); +IWL_DEBUG_INFO ("f/w package hdr init inst size = %u\n" , init_size); +IWL_DEBUG_INFO ("f/w package hdr init data size = %u\n" , init_data_size); +IWL_DEBUG_INFO ("f/w package hdr boot inst size = %u\n" , boot_size);/* Verify size of file vs. image size info in file's header */ if (ucode_raw->size < sizeof(*ucode) +
@@ -6796,7 +6783,7 @@ static void iwl_bg_post_associate(struct work_struct *data)default :IWL_ERROR ("%s Should not be called in %d mode\n" , - __FUNCTION__, priv->iw_mode); + __FUNCTION__, priv->iw_mode);break ; }
@@ -6810,8 +6797,7 @@ static void iwl_bg_post_associate(struct work_struct *data)static void iwl_bg_abort_scan (struct work_struct *work) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - abort_scan); + struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);if (!iwl_is_ready (priv))return ;
drivers/net/wireless/iwlwifi/iwl4965-base.c +6 -13
@@ -1382,7 +1382,6 @@ static int iwl_update_sta_key_info(struct iwl_priv *priv,break ;case ALG_TKIP :case ALG_WEP : -return -EINVAL ;default :return -EINVAL ; }
@@ -2732,11 +2731,9 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv,if ((fc &IEEE80211_FCTL_FTYPE ) ==IEEE80211_FTYPE_MGMT ) {if ((fc &IEEE80211_FCTL_STYPE ) ==IEEE80211_STYPE_ASSOC_REQ || (fc &IEEE80211_FCTL_STYPE ) ==IEEE80211_STYPE_REASSOC_REQ ) - cmd->cmd.tx.timeout.pm_frame_timeout = -cpu_to_le16 (3 ); + cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (3 );else - cmd->cmd.tx.timeout.pm_frame_timeout = -cpu_to_le16 (2 ); + cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (2 ); }else cmd->cmd.tx.timeout.pm_frame_timeout =0 ;
@@ -3240,24 +3237,21 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)int index = mac[5 ] & (IWL_IBSS_MAC_HASH_SIZE -1 );__list_for_each (p, &priv->ibss_mac_hash[index]) { - entry = - list_entry(p, struct iwl_ibss_seq, list); + entry = list_entry(p, struct iwl_ibss_seq, list);if (!compare_ether_addr (entry->mac, mac))break ; }if (p == &priv->ibss_mac_hash[index]) { entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (!entry) { -IWL_ERROR - ("Cannot malloc new mac entry\n" ); +IWL_ERROR ("Cannot malloc new mac entry\n" );return 0 ; }memcpy (entry->mac, mac,ETH_ALEN ); entry->seq_num = seq; entry->frag_num = frag; entry->packet_time = jiffies; -list_add (&entry->list, - &priv->ibss_mac_hash[index]); +list_add (&entry->list, &priv->ibss_mac_hash[index]);return 0 ; } last_seq = &entry->seq_num;
@@ -7203,8 +7197,7 @@ static void iwl_bg_post_associate(struct work_struct *data)static void iwl_bg_abort_scan (struct work_struct *work) { - struct iwl_priv *priv = container_of(work, struct iwl_priv, - abort_scan); + struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);if (!iwl_is_ready (priv))return ;
Signature · 1 line
1.5.2
PATCH 9/30 iwlwifi: remove late null-check and duplicate bug_on
From: Ian Schram <[email protected]>
These pieces of code appear to be useless. The BUG_ON is also performed in iwl_send_cmd_async.
Serious karma would be needed to enter iwl_ativate_qos with a null priv. I had a deja vu when patching this, but for the life of me I couldn't track down a similar patch.
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 7 ------- drivers/net/wireless/iwlwifi/iwl4965-base.c | 7 ------- 2 files changed, 0 insertions(+), 14 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +0 -7
@@ -807,10 +807,6 @@ out:int iwl_send_cmd (struct iwl_priv *priv,struct iwl_host_cmd *cmd) { -/* A command can not be asynchronous AND expect an SKB to be set. */ -BUG_ON ((cmd->meta.flags &CMD_ASYNC ) && - (cmd->meta.flags &CMD_WANT_SKB )); -if (cmd->meta.flags &CMD_ASYNC )return iwl_send_cmd_async (priv, cmd);
@@ -1966,9 +1962,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) {unsigned long flags; -if (priv ==NULL ) -return ; -if (test_bit (STATUS_EXIT_PENDING , &priv->status))return ;
drivers/net/wireless/iwlwifi/iwl4965-base.c +0 -7
@@ -805,10 +805,6 @@ out:int iwl_send_cmd (struct iwl_priv *priv,struct iwl_host_cmd *cmd) { -/* A command can not be asynchronous AND expect an SKB to be set. */ -BUG_ON ((cmd->meta.flags &CMD_ASYNC ) && - (cmd->meta.flags &CMD_WANT_SKB )); -if (cmd->meta.flags &CMD_ASYNC )return iwl_send_cmd_async (priv, cmd);
@@ -2038,9 +2034,6 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) {unsigned long flags; -if (priv ==NULL ) -return ; -if (test_bit (STATUS_EXIT_PENDING , &priv->status))return ;
Signature · 1 line
1.5.2
PATCH 10/30 iwlwifi: remove cck_power_index_compensation
From: Tomas Winkler <[email protected]>
cck_power_index_compensation variable was never used
--- drivers/net/wireless/iwlwifi/iwl-priv.h | 1 - drivers/net/wireless/iwlwifi/iwl4965-base.c | 2 -- 2 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-priv.h +0 -1
@@ -278,7 +278,6 @@ struct iwl_priv {#define IWL_DEFAULT_TX_POWER 0x0Fs8 user_txpower_limit;s8 max_channel_txpower_limit; -u32 cck_power_index_compensation;#ifdef CONFIG_PM u32 pm_state[16 ];
drivers/net/wireless/iwlwifi/iwl4965-base.c +0 -2
@@ -8995,8 +8995,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) priv->channel_width =IWL_CHANNEL_WIDTH_40MHZ ; priv->valid_antenna =0x7 ;/* assume all 3 connected */ priv->ps_mode =IWL_MIMO_PS_NONE ; - priv->cck_power_index_compensation =iwl_read32 ( - priv,CSR_HW_REV_WA_REG );iwl4965_set_rxon_chain (priv);
Signature · 1 line
1.5.2
PATCH 11/30 iwlwifi: using PCI_DEVICE macro
From: Tomas Winkler <[email protected]>
PCI_DEVICE macro is more concise when using defualt values in device definitions
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 4 ++-- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +2 -2
@@ -2278,8 +2278,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) }struct pci_device_id iwl_hw_card_ids[] = { - {0x8086 ,0x4222 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0x8086 ,0x4227 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_DEVICE (0x8086 ,0x4222 )}, + {PCI_DEVICE (0x8086 ,0x4227 )}, {0 } };
drivers/net/wireless/iwlwifi/iwl-4965.c +2 -2
@@ -4680,8 +4680,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) }struct pci_device_id iwl_hw_card_ids[] = { - {0x8086 ,0x4229 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0x8086 ,0x4230 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_DEVICE (0x8086 ,0x4229 )}, + {PCI_DEVICE (0x8086 ,0x4230 )}, {0 } };
Signature · 1 line
1.5.2
PATCH 12/30 iwlwifi: fix sending probe request in iwl 4965
From: Tomas Winkler <[email protected]>
This patch removeis TSF flag from probe request. TSF should be added only to probe response.
--- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-4965.c +1 -3
@@ -3229,9 +3229,7 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd, tx->rate_n_flags =iwl_hw_set_rate_n_flags (iwl_rates[rate_index].plcp, rate_flags); -if (ieee80211_is_probe_request (fc)) - tx->tx_flags |=TX_CMD_FLG_TSF_MSK ; -else if (ieee80211_is_back_request (fc)) +if (ieee80211_is_back_request (fc)) tx->tx_flags |=TX_CMD_FLG_ACK_MSK |TX_CMD_FLG_IMM_BA_RSP_MASK ;#ifdef CONFIG_IWLWIFI_HT
Signature · 1 line
1.5.2
PATCH 13/30 iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame
From: mabbas <[email protected]>
The driver drops any Rx frame larger than 2332 bytes, but with A-MSDU frame, it could be up to 4K. This patch makes sure we can process larger A-MSDU frame.
--- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-4965.c +2 -2
@@ -3521,8 +3521,8 @@ static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data, rx_start->byte_count = amsdu->byte_count; rx_end = (__le32 *) (((u8 *) hdr) + len); } -if (len >2342 || len <16 ) { -IWL_DEBUG_DROP ("byte count out of range [16,2342]" +if (len >IWL_RX_BUF_SIZE || len <16 ) { +IWL_WARNING ("byte count out of range [16,4K]" " : %d\n" , len);return ; }
Signature · 1 line
1.5.2
PATCH 14/30 iwlwifi: replace restricted_reg with prph
From: Tomas Winkler <[email protected]>
This patch renames restricted_reg suffix with more proper name prhp for function accessing registers on the periphery bus.
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 36 +++++----- drivers/net/wireless/iwlwifi/iwl-4965.c | 64 +++++++++--------- drivers/net/wireless/iwlwifi/iwl-io.h | 98 +++++++++------------------ drivers/net/wireless/iwlwifi/iwl3945-base.c | 40 ++++++------ drivers/net/wireless/iwlwifi/iwl4965-base.c | 38 +++++----- 5 files changed, 119 insertions(+), 157 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +18 -18
@@ -722,7 +722,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) rc =pci_read_config_dword (priv->pci_dev,PCI_POWER_SOURCE , &val);if (val &PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT ) { -iwl_set_bits_mask_restricted_reg (priv,APMG_PS_CTRL_REG , +iwl_set_bits_mask_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_PWR_SRC_VAUX , ~APMG_PS_CTRL_MSK_PWR_SRC );iwl_release_restricted_access (priv);
@@ -733,7 +733,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) }else iwl_release_restricted_access (priv); }else { -iwl_set_bits_mask_restricted_reg (priv,APMG_PS_CTRL_REG , +iwl_set_bits_mask_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_PWR_SRC_VMAIN , ~APMG_PS_CTRL_MSK_PWR_SRC );
@@ -795,18 +795,18 @@ static int iwl3945_tx_reset(struct iwl_priv *priv) }/* bypass mode */ -iwl_write_restricted_reg (priv,SCD_MODE_REG ,0x2 ); +iwl_write_prph (priv,SCD_MODE_REG ,0x2 );/* RA 0 is active */ -iwl_write_restricted_reg (priv,SCD_ARASTAT_REG ,0x01 ); +iwl_write_prph (priv,SCD_ARASTAT_REG ,0x01 );/* all 6 fifo are active */ -iwl_write_restricted_reg (priv,SCD_TXFACT_REG ,0x3f ); +iwl_write_prph (priv,SCD_TXFACT_REG ,0x3f ); -iwl_write_restricted_reg (priv,SCD_SBYP_MODE_1_REG ,0x010000 ); -iwl_write_restricted_reg (priv,SCD_SBYP_MODE_2_REG ,0x030002 ); -iwl_write_restricted_reg (priv,SCD_TXF4MF_REG ,0x000004 ); -iwl_write_restricted_reg (priv,SCD_TXF5MF_REG ,0x000005 ); +iwl_write_prph (priv,SCD_SBYP_MODE_1_REG ,0x010000 ); +iwl_write_prph (priv,SCD_SBYP_MODE_2_REG ,0x030002 ); +iwl_write_prph (priv,SCD_TXF4MF_REG ,0x000004 ); +iwl_write_prph (priv,SCD_TXF5MF_REG ,0x000005 );iwl_write_restricted (priv,FH_TSSR_CBB_BASE , priv->hw_setting.shared_phys);
@@ -891,11 +891,11 @@ int iwl_hw_nic_init(struct iwl_priv *priv)spin_unlock_irqrestore (&priv->lock, flags);return rc; } -iwl_write_restricted_reg (priv,APMG_CLK_EN_REG , +iwl_write_prph (priv,APMG_CLK_EN_REG ,APMG_CLK_VAL_DMA_CLK_RQT |APMG_CLK_VAL_BSM_CLK_RQT );udelay (20 ); -iwl_set_bits_restricted_reg (priv,APMG_PCIDEV_STT_REG , +iwl_set_bits_prph (priv,APMG_PCIDEV_STT_REG ,APMG_PCIDEV_STT_VAL_L1_ACT_DIS );iwl_release_restricted_access (priv);spin_unlock_irqrestore (&priv->lock, flags);
@@ -1034,7 +1034,7 @@ void iwl_hw_txq_ctx_stop(struct iwl_priv *priv) }/* stop SCD */ -iwl_write_restricted_reg (priv,SCD_MODE_REG ,0 ); +iwl_write_prph (priv,SCD_MODE_REG ,0 );/* reset TFD queues */ for (queue =TFD_QUEUE_MIN ; queue <TFD_QUEUE_MAX ; queue++) {
@@ -1100,7 +1100,7 @@ int iwl_hw_nic_reset(struct iwl_priv *priv) rc =iwl_grab_restricted_access (priv);if (!rc) { -iwl_write_restricted_reg (priv,APMG_CLK_CTRL_REG , +iwl_write_prph (priv,APMG_CLK_CTRL_REG ,APMG_CLK_VAL_BSM_CLK_RQT );udelay (10 );
@@ -1108,20 +1108,20 @@ int iwl_hw_nic_reset(struct iwl_priv *priv)iwl_set_bit (priv,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_INIT_DONE ); -iwl_write_restricted_reg (priv,APMG_RTC_INT_MSK_REG ,0x0 ); -iwl_write_restricted_reg (priv,APMG_RTC_INT_STT_REG , +iwl_write_prph (priv,APMG_RTC_INT_MSK_REG ,0x0 ); +iwl_write_prph (priv,APMG_RTC_INT_STT_REG ,0xFFFFFFFF );/* enable DMA */ -iwl_write_restricted_reg (priv,APMG_CLK_EN_REG , +iwl_write_prph (priv,APMG_CLK_EN_REG ,APMG_CLK_VAL_DMA_CLK_RQT |APMG_CLK_VAL_BSM_CLK_RQT );udelay (10 ); -iwl_set_bits_restricted_reg (priv,APMG_PS_CTRL_REG , +iwl_set_bits_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_RESET_REQ );udelay (5 ); -iwl_clear_bits_restricted_reg (priv,APMG_PS_CTRL_REG , +iwl_clear_bits_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_RESET_REQ );iwl_release_restricted_access (priv); }
drivers/net/wireless/iwlwifi/iwl-4965.c +31 -33
195 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-io.h +31 -67
155 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl3945-base.c +20 -20
@@ -5608,11 +5608,11 @@ static int iwl_verify_bsm(struct iwl_priv *priv)IWL_DEBUG_INFO ("Begin verify bsm\n" );/* verify BSM SRAM contents */ - val =iwl_read_restricted_reg (priv,BSM_WR_DWCOUNT_REG ); + val =iwl_read_prph (priv,BSM_WR_DWCOUNT_REG );for (reg =BSM_SRAM_LOWER_BOUND ; reg <BSM_SRAM_LOWER_BOUND + len; reg +=sizeof (u32), image ++) { - val =iwl_read_restricted_reg (priv, reg); + val =iwl_read_prph (priv, reg);if (val !=le32_to_cpu (*image)) { IWL_ERROR("BSM uCode verification failed at " "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n",
@@ -5693,16 +5693,16 @@ static int iwl_load_bsm(struct iwl_priv *priv)if (rc)return rc; -iwl_write_restricted_reg (priv,BSM_DRAM_INST_PTR_REG , pinst); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_PTR_REG , pdata); -iwl_write_restricted_reg (priv,BSM_DRAM_INST_BYTECOUNT_REG , inst_len); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_BYTECOUNT_REG , data_len); +iwl_write_prph (priv,BSM_DRAM_INST_PTR_REG , pinst); +iwl_write_prph (priv,BSM_DRAM_DATA_PTR_REG , pdata); +iwl_write_prph (priv,BSM_DRAM_INST_BYTECOUNT_REG , inst_len); +iwl_write_prph (priv,BSM_DRAM_DATA_BYTECOUNT_REG , data_len);/* Fill BSM memory with bootstrap instructions */ for (reg_offset =BSM_SRAM_LOWER_BOUND ; reg_offset <BSM_SRAM_LOWER_BOUND + len; reg_offset +=sizeof (u32), image++) -_iwl_write_restricted_reg (priv, reg_offset, +_iwl_write_prph (priv, reg_offset,le32_to_cpu (*image)); rc =iwl_verify_bsm (priv);
@@ -5712,19 +5712,19 @@ static int iwl_load_bsm(struct iwl_priv *priv) }/* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ -iwl_write_restricted_reg (priv,BSM_WR_MEM_SRC_REG ,0x0 ); -iwl_write_restricted_reg (priv,BSM_WR_MEM_DST_REG , +iwl_write_prph (priv,BSM_WR_MEM_SRC_REG ,0x0 ); +iwl_write_prph (priv,BSM_WR_MEM_DST_REG ,RTC_INST_LOWER_BOUND ); -iwl_write_restricted_reg (priv,BSM_WR_DWCOUNT_REG , len /sizeof (u32)); +iwl_write_prph (priv,BSM_WR_DWCOUNT_REG , len /sizeof (u32));/* Load bootstrap code into instruction SRAM now, * to prepare to load "initialize" uCode */ -iwl_write_restricted_reg (priv,BSM_WR_CTRL_REG , +iwl_write_prph (priv,BSM_WR_CTRL_REG ,BSM_WR_CTRL_REG_BIT_START );/* Wait for load of bootstrap uCode to finish */ for (i =0 ; i <100 ; i++) { - done =iwl_read_restricted_reg (priv,BSM_WR_CTRL_REG ); + done =iwl_read_prph (priv,BSM_WR_CTRL_REG );if (!(done &BSM_WR_CTRL_REG_BIT_START ))break ;udelay (10 );
@@ -5738,7 +5738,7 @@ static int iwl_load_bsm(struct iwl_priv *priv)/* Enable future boot loads whenever power management unit triggers it * (e.g. when powering back up after power-save shutdown) */ -iwl_write_restricted_reg (priv,BSM_WR_CTRL_REG , +iwl_write_prph (priv,BSM_WR_CTRL_REG ,BSM_WR_CTRL_REG_BIT_START_EN );iwl_release_restricted_access (priv);
@@ -5989,14 +5989,14 @@ static int iwl_set_ucode_ptrs(struct iwl_priv *priv) }/* Tell bootstrap uCode where to find image to load */ -iwl_write_restricted_reg (priv,BSM_DRAM_INST_PTR_REG , pinst); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_PTR_REG , pdata); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_BYTECOUNT_REG , +iwl_write_prph (priv,BSM_DRAM_INST_PTR_REG , pinst); +iwl_write_prph (priv,BSM_DRAM_DATA_PTR_REG , pdata); +iwl_write_prph (priv,BSM_DRAM_DATA_BYTECOUNT_REG , priv->ucode_data.len);/* Inst bytecount must be last to set up, bit 31 signals uCode * that all new ptr/size info is in place */ -iwl_write_restricted_reg (priv,BSM_DRAM_INST_BYTECOUNT_REG , +iwl_write_prph (priv,BSM_DRAM_INST_BYTECOUNT_REG , priv->ucode_code.len |BSM_DRAM_INST_LOAD );iwl_release_restricted_access (priv);
@@ -6094,7 +6094,7 @@ static void iwl_alive_start(struct iwl_priv *priv)return ; } - rfkill =iwl_read_restricted_reg (priv,APMG_RFKILL_REG ); + rfkill =iwl_read_prph (priv,APMG_RFKILL_REG );IWL_DEBUG_INFO ("RFKILL status: 0x%x\n" , rfkill);iwl_release_restricted_access (priv);
@@ -6260,7 +6260,7 @@ static void __iwl_down(struct iwl_priv *priv)spin_lock_irqsave (&priv->lock, flags);if (!iwl_grab_restricted_access (priv)) { -iwl_write_restricted_reg (priv,APMG_CLK_DIS_REG , +iwl_write_prph (priv,APMG_CLK_DIS_REG ,APMG_CLK_VAL_DMA_CLK_RQT );iwl_release_restricted_access (priv); }
@@ -8605,7 +8605,7 @@ static void iwl_resume(struct iwl_priv *priv)iwl_clear_bit (priv,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ );if (!iwl_grab_restricted_access (priv)) { -iwl_write_restricted_reg (priv,APMG_CLK_DIS_REG , +iwl_write_prph (priv,APMG_CLK_DIS_REG ,APMG_CLK_VAL_DMA_CLK_RQT );iwl_release_restricted_access (priv); }
drivers/net/wireless/iwlwifi/iwl4965-base.c +19 -19
@@ -5987,11 +5987,11 @@ static int iwl_verify_bsm(struct iwl_priv *priv)IWL_DEBUG_INFO ("Begin verify bsm\n" );/* verify BSM SRAM contents */ - val =iwl_read_restricted_reg (priv,BSM_WR_DWCOUNT_REG ); + val =iwl_read_prph (priv,BSM_WR_DWCOUNT_REG );for (reg =BSM_SRAM_LOWER_BOUND ; reg <BSM_SRAM_LOWER_BOUND + len; reg +=sizeof (u32), image ++) { - val =iwl_read_restricted_reg (priv, reg); + val =iwl_read_prph (priv, reg);if (val !=le32_to_cpu (*image)) { IWL_ERROR("BSM uCode verification failed at " "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n",
@@ -6072,16 +6072,16 @@ static int iwl_load_bsm(struct iwl_priv *priv)if (rc)return rc; -iwl_write_restricted_reg (priv,BSM_DRAM_INST_PTR_REG , pinst); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_PTR_REG , pdata); -iwl_write_restricted_reg (priv,BSM_DRAM_INST_BYTECOUNT_REG , inst_len); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_BYTECOUNT_REG , data_len); +iwl_write_prph (priv,BSM_DRAM_INST_PTR_REG , pinst); +iwl_write_prph (priv,BSM_DRAM_DATA_PTR_REG , pdata); +iwl_write_prph (priv,BSM_DRAM_INST_BYTECOUNT_REG , inst_len); +iwl_write_prph (priv,BSM_DRAM_DATA_BYTECOUNT_REG , data_len);/* Fill BSM memory with bootstrap instructions */ for (reg_offset =BSM_SRAM_LOWER_BOUND ; reg_offset <BSM_SRAM_LOWER_BOUND + len; reg_offset +=sizeof (u32), image++) -_iwl_write_restricted_reg (priv, reg_offset, +_iwl_write_prph (priv, reg_offset,le32_to_cpu (*image)); rc =iwl_verify_bsm (priv);
@@ -6091,19 +6091,19 @@ static int iwl_load_bsm(struct iwl_priv *priv) }/* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ -iwl_write_restricted_reg (priv,BSM_WR_MEM_SRC_REG ,0x0 ); -iwl_write_restricted_reg (priv,BSM_WR_MEM_DST_REG , +iwl_write_prph (priv,BSM_WR_MEM_SRC_REG ,0x0 ); +iwl_write_prph (priv,BSM_WR_MEM_DST_REG ,RTC_INST_LOWER_BOUND ); -iwl_write_restricted_reg (priv,BSM_WR_DWCOUNT_REG , len /sizeof (u32)); +iwl_write_prph (priv,BSM_WR_DWCOUNT_REG , len /sizeof (u32));/* Load bootstrap code into instruction SRAM now, * to prepare to load "initialize" uCode */ -iwl_write_restricted_reg (priv,BSM_WR_CTRL_REG , +iwl_write_prph (priv,BSM_WR_CTRL_REG ,BSM_WR_CTRL_REG_BIT_START );/* Wait for load of bootstrap uCode to finish */ for (i =0 ; i <100 ; i++) { - done =iwl_read_restricted_reg (priv,BSM_WR_CTRL_REG ); + done =iwl_read_prph (priv,BSM_WR_CTRL_REG );if (!(done &BSM_WR_CTRL_REG_BIT_START ))break ;udelay (10 );
@@ -6117,7 +6117,7 @@ static int iwl_load_bsm(struct iwl_priv *priv)/* Enable future boot loads whenever power management unit triggers it * (e.g. when powering back up after power-save shutdown) */ -iwl_write_restricted_reg (priv,BSM_WR_CTRL_REG , +iwl_write_prph (priv,BSM_WR_CTRL_REG ,BSM_WR_CTRL_REG_BIT_START_EN );iwl_release_restricted_access (priv);
@@ -6372,14 +6372,14 @@ static int iwl_set_ucode_ptrs(struct iwl_priv *priv) }/* Tell bootstrap uCode where to find image to load */ -iwl_write_restricted_reg (priv,BSM_DRAM_INST_PTR_REG , pinst); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_PTR_REG , pdata); -iwl_write_restricted_reg (priv,BSM_DRAM_DATA_BYTECOUNT_REG , +iwl_write_prph (priv,BSM_DRAM_INST_PTR_REG , pinst); +iwl_write_prph (priv,BSM_DRAM_DATA_PTR_REG , pdata); +iwl_write_prph (priv,BSM_DRAM_DATA_BYTECOUNT_REG , priv->ucode_data.len);/* Inst bytecount must be last to set up, bit 31 signals uCode * that all new ptr/size info is in place */ -iwl_write_restricted_reg (priv,BSM_DRAM_INST_BYTECOUNT_REG , +iwl_write_prph (priv,BSM_DRAM_INST_BYTECOUNT_REG , priv->ucode_code.len |BSM_DRAM_INST_LOAD );iwl_release_restricted_access (priv);
@@ -6625,7 +6625,7 @@ static void __iwl_down(struct iwl_priv *priv)spin_lock_irqsave (&priv->lock, flags);if (!iwl_grab_restricted_access (priv)) { -iwl_write_restricted_reg (priv,APMG_CLK_DIS_REG , +iwl_write_prph (priv,APMG_CLK_DIS_REG ,APMG_CLK_VAL_DMA_CLK_RQT );iwl_release_restricted_access (priv); }
@@ -9209,7 +9209,7 @@ static void iwl_resume(struct iwl_priv *priv)iwl_clear_bit (priv,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ );if (!iwl_grab_restricted_access (priv)) { -iwl_write_restricted_reg (priv,APMG_CLK_DIS_REG , +iwl_write_prph (priv,APMG_CLK_DIS_REG ,APMG_CLK_VAL_DMA_CLK_RQT );iwl_release_restricted_access (priv); }
Signature · 1 line
1.5.2
PATCH 15/30 iwlwifi: rename restricted_mem to targ_mem
From: Tomas Winkler <[email protected]>
This patch renames restricted_mem suffix with more proper name targ_mem for function accessing memory on the nic in target mode
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 19 +++++++-------- drivers/net/wireless/iwlwifi/iwl-4965.c | 18 +++++++------- drivers/net/wireless/iwlwifi/iwl-io.h | 9 +++---- drivers/net/wireless/iwlwifi/iwl3945-base.c | 30 ++++++++++++------------ drivers/net/wireless/iwlwifi/iwl4965-base.c | 34 +++++++++++++------------- 5 files changed, 54 insertions(+), 56 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +9 -10
@@ -94,7 +94,7 @@ const struct iwl_rate_info iwl_rates[IWL_RATE_COUNT] = {* ... and set IWL_EVT_DISABLE to 1. */ void iwl_disable_events (struct iwl_priv *priv) { -int rc; +int ret;int i;u32 base;/* SRAM address of event log header */ u32 disable_ptr;/* SRAM address of event-disable bitmap array */
@@ -155,25 +155,24 @@ void iwl_disable_events(struct iwl_priv *priv)return ; } - rc =iwl_grab_restricted_access (priv); -if (rc) { + ret =iwl_grab_restricted_access (priv); +if (ret) {IWL_WARNING ("Can not read from adapter at this time.\n" );return ; } - disable_ptr =iwl_read_restricted_mem (priv, base + (4 *sizeof (u32))); - array_size =iwl_read_restricted_mem (priv, base + (5 *sizeof (u32))); + disable_ptr =iwl_read_targ_mem (priv, base + (4 *sizeof (u32))); + array_size =iwl_read_targ_mem (priv, base + (5 *sizeof (u32)));iwl_release_restricted_access (priv);if (IWL_EVT_DISABLE && (array_size ==IWL_EVT_DISABLE_SIZE )) {IWL_DEBUG_INFO ("Disabling selected uCode log events at 0x%x\n" , disable_ptr); - rc =iwl_grab_restricted_access (priv); + ret =iwl_grab_restricted_access (priv);for (i =0 ; i <IWL_EVT_DISABLE_SIZE ; i++) -iwl_write_restricted_mem (priv, - disable_ptr + - (i *sizeof (u32)), - evt_disable[i]); +iwl_write_targ_mem (priv, + disable_ptr + (i *sizeof (u32)), + evt_disable[i]);iwl_release_restricted_access (priv); }else {
drivers/net/wireless/iwlwifi/iwl-4965.c +9 -9
@@ -1656,11 +1656,11 @@ int iwl4965_alive_notify(struct iwl_priv *priv) priv->scd_base_addr =iwl_read_prph (priv,SCD_SRAM_BASE_ADDR ); a = priv->scd_base_addr +SCD_CONTEXT_DATA_OFFSET ;for (; a < priv->scd_base_addr +SCD_TX_STTS_BITMAP_OFFSET ; a +=4 ) -iwl_write_restricted_mem (priv, a,0 ); +iwl_write_targ_mem (priv, a,0 );for (; a < priv->scd_base_addr +SCD_TRANSLATE_TBL_OFFSET ; a +=4 ) -iwl_write_restricted_mem (priv, a,0 ); +iwl_write_targ_mem (priv, a,0 );for (; a <sizeof (u16) * priv->hw_setting.max_txq_num; a +=4 ) -iwl_write_restricted_mem (priv, a,0 ); +iwl_write_targ_mem (priv, a,0 ); iwl_write_prph(priv, SCD_DRAM_BASE_ADDR, (priv->hw_setting.shared_phys +
@@ -1671,12 +1671,12 @@ int iwl4965_alive_notify(struct iwl_priv *priv)for (i =0 ; i < priv->hw_setting.max_txq_num; i++) {iwl_write_prph (priv,SCD_QUEUE_RDPTR (i),0 );iwl_write_restricted (priv,HBUS_TARG_WRPTR ,0 | (i <<8 )); -iwl_write_restricted_mem (priv, priv->scd_base_addr + +iwl_write_targ_mem (priv, priv->scd_base_addr +SCD_CONTEXT_QUEUE_OFFSET (i), (SCD_WIN_SIZE <<SCD_QUEUE_CTX_REG1_WIN_SIZE_POS ) &SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK ); - iwl_write_restricted_mem(priv, priv->scd_base_addr + + iwl_write_targ_mem(priv, priv->scd_base_addr + SCD_CONTEXT_QUEUE_OFFSET(i) + sizeof(u32), (SCD_FRAME_LIMIT <<
@@ -4146,14 +4146,14 @@ static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid, tbl_dw_addr = priv->scd_base_addr +SCD_TRANSLATE_TBL_OFFSET_QUEUE (txq_id); - tbl_dw =iwl_read_restricted_mem (priv, tbl_dw_addr); + tbl_dw =iwl_read_targ_mem (priv, tbl_dw_addr);if (txq_id &0x1 ) tbl_dw = (scd_q2ratid <<16 ) | (tbl_dw &0x0000FFFF );else tbl_dw = scd_q2ratid | (tbl_dw &0xFFFF0000 ); -iwl_write_restricted_mem (priv, tbl_dw_addr, tbl_dw); +iwl_write_targ_mem (priv, tbl_dw_addr, tbl_dw);return 0 ; }
@@ -4197,12 +4197,12 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,/* supposes that ssn_idx is valid (!= 0xFFF) */ iwl4965_set_wr_ptrs (priv, txq_id, ssn_idx); -iwl_write_restricted_mem (priv, +iwl_write_targ_mem (priv, priv->scd_base_addr +SCD_CONTEXT_QUEUE_OFFSET (txq_id), (SCD_WIN_SIZE <<SCD_QUEUE_CTX_REG1_WIN_SIZE_POS ) &SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK ); -iwl_write_restricted_mem (priv, priv->scd_base_addr + +iwl_write_targ_mem (priv, priv->scd_base_addr +SCD_CONTEXT_QUEUE_OFFSET (txq_id) +sizeof (u32), (SCD_FRAME_LIMIT <<SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS ) &SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK );
drivers/net/wireless/iwlwifi/iwl-io.h +4 -5
@@ -411,21 +411,20 @@ static inline void iwl_clear_bits_prph(struct iwl_priv_iwl_write_prph (priv, reg, (val & ~mask)); } -static inline u32 iwl_read_restricted_mem (struct iwl_priv *priv,u32 addr) +static inline u32 iwl_read_targ_mem (struct iwl_priv *priv,u32 addr) {iwl_write_restricted (priv,HBUS_TARG_MEM_RADDR , addr);return iwl_read_restricted (priv,HBUS_TARG_MEM_RDAT ); } -static inline void iwl_write_restricted_mem (struct iwl_priv *priv,u32 addr, -u32 val) +static inline void iwl_write_targ_mem (struct iwl_priv *priv,u32 addr,u32 val) {iwl_write_restricted (priv,HBUS_TARG_MEM_WADDR , addr);iwl_write_restricted (priv,HBUS_TARG_MEM_WDAT , val); } -static inline void iwl_write_restricted_mems (struct iwl_priv *priv,u32 addr, -u32 len,u32 *values) +static inline void iwl_write_targ_mem_buf (struct iwl_priv *priv,u32 addr, +u32 len,u32 *values) {iwl_write_restricted (priv,HBUS_TARG_MEM_WADDR , addr);for (;0 < len; len -=sizeof (u32), values++)
drivers/net/wireless/iwlwifi/iwl3945-base.c +15 -15
@@ -4445,7 +4445,7 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)return ; } - count =iwl_read_restricted_mem (priv, base); + count =iwl_read_targ_mem (priv, base);if (ERROR_START_OFFSET <= count *ERROR_ELEM_SIZE ) {IWL_ERROR ("Start IWL Error Log Dump:\n" );
@@ -4458,19 +4458,19 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)for (i =ERROR_START_OFFSET ; i < (count *ERROR_ELEM_SIZE ) +ERROR_START_OFFSET ; i +=ERROR_ELEM_SIZE ) { - desc =iwl_read_restricted_mem (priv, base + i); + desc =iwl_read_targ_mem (priv, base + i); time = -iwl_read_restricted_mem (priv, base + i +1 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +1 *sizeof (u32)); blink1 = -iwl_read_restricted_mem (priv, base + i +2 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +2 *sizeof (u32)); blink2 = -iwl_read_restricted_mem (priv, base + i +3 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +3 *sizeof (u32)); ilink1 = -iwl_read_restricted_mem (priv, base + i +4 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +4 *sizeof (u32)); ilink2 = -iwl_read_restricted_mem (priv, base + i +5 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +5 *sizeof (u32)); data1 = -iwl_read_restricted_mem (priv, base + i +6 *sizeof (u32)); +iwl_read_targ_mem (priv, base + i +6 *sizeof (u32));IWL_ERROR ("%-13s (#%d) %010u 0x%05X 0x%05X 0x%05X 0x%05X %u\n\n",
@@ -4513,14 +4513,14 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,/* "time" is actually "data" for mode 0 (no timestamp). * place event id # at far right for easier visual parsing. */ for (i =0 ; i < num_events; i++) { - ev =iwl_read_restricted_mem (priv, ptr); + ev =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32); - time =iwl_read_restricted_mem (priv, ptr); + time =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32);if (mode ==0 )IWL_ERROR ("0x%08x\t%04u\n" , time, ev);/* data, ev */ else { - data =iwl_read_restricted_mem (priv, ptr); + data =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32);IWL_ERROR ("%010u\t0x%08x\t%04u\n" , time, data, ev); }
@@ -4550,10 +4550,10 @@ static void iwl_dump_nic_event_log(struct iwl_priv *priv) }/* event log header */ - capacity =iwl_read_restricted_mem (priv, base); - mode =iwl_read_restricted_mem (priv, base + (1 *sizeof (u32))); - num_wraps =iwl_read_restricted_mem (priv, base + (2 *sizeof (u32))); - next_entry =iwl_read_restricted_mem (priv, base + (3 *sizeof (u32))); + capacity =iwl_read_targ_mem (priv, base); + mode =iwl_read_targ_mem (priv, base + (1 *sizeof (u32))); + num_wraps =iwl_read_targ_mem (priv, base + (2 *sizeof (u32))); + next_entry =iwl_read_targ_mem (priv, base + (3 *sizeof (u32))); size = num_wraps ? capacity : next_entry;
drivers/net/wireless/iwlwifi/iwl4965-base.c +17 -17
@@ -4774,7 +4774,7 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)return ; } - count =iwl_read_restricted_mem (priv, base); + count =iwl_read_targ_mem (priv, base);if (ERROR_START_OFFSET <= count *ERROR_ELEM_SIZE ) {IWL_ERROR ("Start IWL Error Log Dump:\n" );
@@ -4782,15 +4782,15 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv) priv->status, priv->config, count); } - desc =iwl_read_restricted_mem (priv, base +1 *sizeof (u32)); - blink1 =iwl_read_restricted_mem (priv, base +3 *sizeof (u32)); - blink2 =iwl_read_restricted_mem (priv, base +4 *sizeof (u32)); - ilink1 =iwl_read_restricted_mem (priv, base +5 *sizeof (u32)); - ilink2 =iwl_read_restricted_mem (priv, base +6 *sizeof (u32)); - data1 =iwl_read_restricted_mem (priv, base +7 *sizeof (u32)); - data2 =iwl_read_restricted_mem (priv, base +8 *sizeof (u32)); - line =iwl_read_restricted_mem (priv, base +9 *sizeof (u32)); - time =iwl_read_restricted_mem (priv, base +11 *sizeof (u32)); + desc =iwl_read_targ_mem (priv, base +1 *sizeof (u32)); + blink1 =iwl_read_targ_mem (priv, base +3 *sizeof (u32)); + blink2 =iwl_read_targ_mem (priv, base +4 *sizeof (u32)); + ilink1 =iwl_read_targ_mem (priv, base +5 *sizeof (u32)); + ilink2 =iwl_read_targ_mem (priv, base +6 *sizeof (u32)); + data1 =iwl_read_targ_mem (priv, base +7 *sizeof (u32)); + data2 =iwl_read_targ_mem (priv, base +8 *sizeof (u32)); + line =iwl_read_targ_mem (priv, base +9 *sizeof (u32)); + time =iwl_read_targ_mem (priv, base +11 *sizeof (u32));IWL_ERROR ("Desc Time " "data1 data2 line\n" );
@@ -4834,14 +4834,14 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,/* "time" is actually "data" for mode 0 (no timestamp). * place event id # at far right for easier visual parsing. */ for (i =0 ; i < num_events; i++) { - ev =iwl_read_restricted_mem (priv, ptr); + ev =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32); - time =iwl_read_restricted_mem (priv, ptr); + time =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32);if (mode ==0 )IWL_ERROR ("0x%08x\t%04u\n" , time, ev);/* data, ev */ else { - data =iwl_read_restricted_mem (priv, ptr); + data =iwl_read_targ_mem (priv, ptr); ptr +=sizeof (u32);IWL_ERROR ("%010u\t0x%08x\t%04u\n" , time, data, ev); }
@@ -4871,10 +4871,10 @@ static void iwl_dump_nic_event_log(struct iwl_priv *priv) }/* event log header */ - capacity =iwl_read_restricted_mem (priv, base); - mode =iwl_read_restricted_mem (priv, base + (1 *sizeof (u32))); - num_wraps =iwl_read_restricted_mem (priv, base + (2 *sizeof (u32))); - next_entry =iwl_read_restricted_mem (priv, base + (3 *sizeof (u32))); + capacity =iwl_read_targ_mem (priv, base); + mode =iwl_read_targ_mem (priv, base + (1 *sizeof (u32))); + num_wraps =iwl_read_targ_mem (priv, base + (2 *sizeof (u32))); + next_entry =iwl_read_targ_mem (priv, base + (3 *sizeof (u32))); size = num_wraps ? capacity : next_entry;
Signature · 1 line
1.5.2
PATCH 16/30 iwlwifi: replacing wording restricted to nic access in iwl-io
From: Tomas Winkler <[email protected]>
This patch replaces wording 'restricted' with more appropriate 'nic access' NIC access is grabbed to prevent NIC entering power save mode General cleanup of iwl-io.h
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 78 +++++++------- drivers/net/wireless/iwlwifi/iwl-4965.c | 80 +++++++------- drivers/net/wireless/iwlwifi/iwl-io.h | 146 +++++++++++++-------------- drivers/net/wireless/iwlwifi/iwl3945-base.c | 74 +++++++------- drivers/net/wireless/iwlwifi/iwl4965-base.c | 82 ++++++++-------- 5 files changed, 229 insertions(+), 231 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +39 -39
@@ -155,7 +155,7 @@ void iwl_disable_events(struct iwl_priv *priv)return ; } - ret =iwl_grab_restricted_access (priv); + ret =iwl_grab_nic_access (priv);if (ret) {IWL_WARNING ("Can not read from adapter at this time.\n" );return ;
@@ -163,18 +163,18 @@ void iwl_disable_events(struct iwl_priv *priv) disable_ptr =iwl_read_targ_mem (priv, base + (4 *sizeof (u32))); array_size =iwl_read_targ_mem (priv, base + (5 *sizeof (u32))); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);if (IWL_EVT_DISABLE && (array_size ==IWL_EVT_DISABLE_SIZE )) {IWL_DEBUG_INFO ("Disabling selected uCode log events at 0x%x\n" , disable_ptr); - ret =iwl_grab_restricted_access (priv); + ret =iwl_grab_nic_access (priv);for (i =0 ; i <IWL_EVT_DISABLE_SIZE ; i++)iwl_write_targ_mem (priv, disable_ptr + (i *sizeof (u32)), evt_disable[i]); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv); }else {IWL_DEBUG_INFO ("Selected uCode log events may be disabled\n" );IWL_DEBUG_INFO (" by writing \"1\"s into disable bitmap\n" );
@@ -709,7 +709,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc;
@@ -724,19 +724,19 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)iwl_set_bits_mask_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_PWR_SRC_VAUX , ~APMG_PS_CTRL_MSK_PWR_SRC ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);iwl_poll_bit (priv,CSR_GPIO_IN ,CSR_GPIO_IN_VAL_VAUX_PWR_SRC ,CSR_GPIO_IN_BIT_AUX_POWER ,5000 ); }else -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv); }else {iwl_set_bits_mask_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_PWR_SRC_VMAIN , ~APMG_PS_CTRL_MSK_PWR_SRC ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);iwl_poll_bit (priv,CSR_GPIO_IN ,CSR_GPIO_IN_VAL_VMAIN_PWR_SRC ,CSR_GPIO_IN_BIT_AUX_POWER ,5000 );/* uS */ }
@@ -751,18 +751,18 @@ static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc; } -iwl_write_restricted (priv,FH_RCSR_RBD_BASE (0 ), rxq->dma_addr); -iwl_write_restricted (priv,FH_RCSR_RPTR_ADDR (0 ), +iwl_write_direct32 (priv,FH_RCSR_RBD_BASE (0 ), rxq->dma_addr); +iwl_write_direct32 (priv,FH_RCSR_RPTR_ADDR (0 ), priv->hw_setting.shared_phys + offsetof(struct iwl_shared, rx_read_ptr[0])); -iwl_write_restricted (priv,FH_RCSR_WPTR (0 ),0 ); - iwl_write_restricted(priv, FH_RCSR_CONFIG(0), +iwl_write_direct32 (priv,FH_RCSR_WPTR (0 ),0 ); + iwl_write_direct32(priv, FH_RCSR_CONFIG(0), ALM_FH_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE | ALM_FH_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE | ALM_FH_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN |
@@ -773,9 +773,9 @@ static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) ALM_FH_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH);/* fake read to flush all prev I/O */ -iwl_read_restricted (priv,FH_RSSR_CTRL ); +iwl_read_direct32 (priv,FH_RSSR_CTRL ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);return 0 ;
@@ -787,7 +787,7 @@ static int iwl3945_tx_reset(struct iwl_priv *priv)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc;
@@ -807,10 +807,10 @@ static int iwl3945_tx_reset(struct iwl_priv *priv)iwl_write_prph (priv,SCD_TXF4MF_REG ,0x000004 );iwl_write_prph (priv,SCD_TXF5MF_REG ,0x000005 ); -iwl_write_restricted (priv,FH_TSSR_CBB_BASE , +iwl_write_direct32 (priv,FH_TSSR_CBB_BASE , priv->hw_setting.shared_phys); - iwl_write_restricted(priv, FH_TSSR_MSG_CONFIG, + iwl_write_direct32(priv, FH_TSSR_MSG_CONFIG, ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON | ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON | ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B |
@@ -819,7 +819,7 @@ static int iwl3945_tx_reset(struct iwl_priv *priv)ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH | ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);return 0 ;
@@ -885,7 +885,7 @@ int iwl_hw_nic_init(struct iwl_priv *priv)return rc; } - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc;
@@ -896,7 +896,7 @@ int iwl_hw_nic_init(struct iwl_priv *priv)udelay (20 );iwl_set_bits_prph (priv,APMG_PCIDEV_STT_REG ,APMG_PCIDEV_STT_VAL_L1_ACT_DIS ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);/* Determine HW type */
@@ -987,13 +987,13 @@ int iwl_hw_nic_init(struct iwl_priv *priv)iwl_rx_queue_update_write_ptr(priv, rxq); */ - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc; } -iwl_write_restricted (priv,FH_RCSR_WPTR (0 ), rxq->write & ~7 ); -iwl_release_restricted_access (priv); +iwl_write_direct32 (priv,FH_RCSR_WPTR (0 ), rxq->write & ~7 ); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);
@@ -1026,7 +1026,7 @@ void iwl_hw_txq_ctx_stop(struct iwl_priv *priv)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); -if (iwl_grab_restricted_access (priv)) { +if (iwl_grab_nic_access (priv)) {spin_unlock_irqrestore (&priv->lock, flags);iwl_hw_txq_ctx_free (priv);return ;
@@ -1037,13 +1037,13 @@ void iwl_hw_txq_ctx_stop(struct iwl_priv *priv)/* reset TFD queues */ for (queue =TFD_QUEUE_MIN ; queue <TFD_QUEUE_MAX ; queue++) { -iwl_write_restricted (priv,FH_TCSR_CONFIG (queue),0x0 ); -iwl_poll_restricted_bit (priv,FH_TSSR_TX_STATUS , +iwl_write_direct32 (priv,FH_TCSR_CONFIG (queue),0x0 ); +iwl_poll_direct_bit (priv,FH_TSSR_TX_STATUS ,ALM_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE (queue),1000 ); } -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);iwl_hw_txq_ctx_free (priv);
@@ -1097,7 +1097,7 @@ int iwl_hw_nic_reset(struct iwl_priv *priv)CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY , CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (!rc) {iwl_write_prph (priv,APMG_CLK_CTRL_REG ,APMG_CLK_VAL_BSM_CLK_RQT );
@@ -1122,7 +1122,7 @@ int iwl_hw_nic_reset(struct iwl_priv *priv)udelay (5 );iwl_clear_bits_prph (priv,APMG_PS_CTRL_REG ,APMG_PS_CTRL_VAL_RESET_REQ ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv); }/* Clear the 'host command active' bit... */
@@ -2069,18 +2069,18 @@ int iwl_hw_rxq_stop(struct iwl_priv *priv)unsigned long flags;spin_lock_irqsave (&priv->lock, flags); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc; } -iwl_write_restricted (priv,FH_RCSR_CONFIG (0 ),0 ); - rc =iwl_poll_restricted_bit (priv,FH_RSSR_STATUS , (1 <<24 ),1000 ); +iwl_write_direct32 (priv,FH_RCSR_CONFIG (0 ),0 ); + rc =iwl_poll_direct_bit (priv,FH_RSSR_STATUS , (1 <<24 ),1000 );if (rc <0 )IWL_ERROR ("Can't stop Rx DMA.\n" ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);return 0 ;
@@ -2097,21 +2097,21 @@ int iwl_hw_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq) shared_data->tx_base_ptr[txq_id] =cpu_to_le32 ((u32 )txq->q.dma_addr);spin_lock_irqsave (&priv->lock, flags); - rc =iwl_grab_restricted_access (priv); + rc =iwl_grab_nic_access (priv);if (rc) {spin_unlock_irqrestore (&priv->lock, flags);return rc; } -iwl_write_restricted (priv,FH_CBCC_CTRL (txq_id),0 ); -iwl_write_restricted (priv,FH_CBCC_BASE (txq_id),0 ); +iwl_write_direct32 (priv,FH_CBCC_CTRL (txq_id),0 ); +iwl_write_direct32 (priv,FH_CBCC_BASE (txq_id),0 ); -iwl_write_restricted (priv,FH_TCSR_CONFIG (txq_id), +iwl_write_direct32 (priv,FH_TCSR_CONFIG (txq_id),ALM_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT |ALM_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF |ALM_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD |ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL |ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE ); -iwl_release_restricted_access (priv); +iwl_release_nic_access (priv);/* fake read to flush all prev. writes */ iwl_read32 (priv,FH_TSSR_CBB_BASE );
drivers/net/wireless/iwlwifi/iwl-4965.c +40 -40
267 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-io.h +72 -74
323 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl3945-base.c +37 -37
247 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl4965-base.c +41 -41
257 lines not on this page · raw message
Signature · 1 line
1.5.2
PATCH 17/30 iwlwifi-ht: move 4965 SCD registers to iwl-prph.h
From: Emmanuel Grumbach <[email protected]>
This patch moves 4965 SCD registers to iwl-prph.h. These registers are assigned from the periphery bus
--- drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 32 +--------------------------- drivers/net/wireless/iwlwifi/iwl-4965.c | 28 ++++++++++++------------ drivers/net/wireless/iwlwifi/iwl-prph.h | 29 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 45 deletions(-)
drivers/net/wireless/iwlwifi/iwl-4965-hw.h +1 -31
@@ -398,36 +398,6 @@ union iwl_tx_power_dual_stream {#define SCD_WIN_SIZE 64#define SCD_FRAME_LIMIT 64 -/* memory mapped registers */ -#define SCD_START_OFFSET 0xa02c00 - -#define SCD_SRAM_BASE_ADDR (SCD_START_OFFSET + 0x0) -#define SCD_EMPTY_BITS (SCD_START_OFFSET + 0x4) -#define SCD_DRAM_BASE_ADDR (SCD_START_OFFSET + 0x10) -#define SCD_AIT (SCD_START_OFFSET + 0x18) -#define SCD_TXFACT (SCD_START_OFFSET + 0x1c) -#define SCD_QUEUE_WRPTR (x) (SCD_START_OFFSET + 0x24 + (x) * 4) -#define SCD_QUEUE_RDPTR (x) (SCD_START_OFFSET + 0x64 + (x) * 4) -#define SCD_SETQUEUENUM (SCD_START_OFFSET + 0xa4) -#define SCD_SET_TXSTAT_TXED (SCD_START_OFFSET + 0xa8) -#define SCD_SET_TXSTAT_DONE (SCD_START_OFFSET + 0xac) -#define SCD_SET_TXSTAT_NOT_SCHD (SCD_START_OFFSET + 0xb0) -#define SCD_DECREASE_CREDIT (SCD_START_OFFSET + 0xb4) -#define SCD_DECREASE_SCREDIT (SCD_START_OFFSET + 0xb8) -#define SCD_LOAD_CREDIT (SCD_START_OFFSET + 0xbc) -#define SCD_LOAD_SCREDIT (SCD_START_OFFSET + 0xc0) -#define SCD_BAR (SCD_START_OFFSET + 0xc4) -#define SCD_BAR_DW0 (SCD_START_OFFSET + 0xc8) -#define SCD_BAR_DW1 (SCD_START_OFFSET + 0xcc) -#define SCD_QUEUECHAIN_SEL (SCD_START_OFFSET + 0xd0) -#define SCD_QUERY_REQ (SCD_START_OFFSET + 0xd8) -#define SCD_QUERY_RES (SCD_START_OFFSET + 0xdc) -#define SCD_PENDING_FRAMES (SCD_START_OFFSET + 0xe0) -#define SCD_INTERRUPT_MASK (SCD_START_OFFSET + 0xe4) -#define SCD_INTERRUPT_THRESHOLD (SCD_START_OFFSET + 0xe8) -#define SCD_QUERY_MIN_FRAME_SIZE (SCD_START_OFFSET + 0x100) -#define SCD_QUEUE_STATUS_BITS (x) (SCD_START_OFFSET + 0x104 + (x) * 4) -/* SRAM structures */ #define SCD_CONTEXT_DATA_OFFSET 0x380#define SCD_TX_STTS_BITMAP_OFFSET 0x400
@@ -544,7 +514,7 @@ struct iwl4965_sched_queue_byte_cnt_tbl { sizeof(__le16)]; } __attribute__ ((packed)); -/* Base physical address of iwl_shared is provided to SCD_DRAM_BASE_ADDR +/* Base physical address of iwl_shared is provided to KDR_SCD_DRAM_BASE_ADDR * and &iwl_shared.val0 is provided to FH_RSCSR_CHNL0_STTS_WPTR_REG */ struct iwl_shared {struct iwl4965_sched_queue_byte_cnt_tbl
drivers/net/wireless/iwlwifi/iwl-4965.c +14 -14
@@ -381,7 +381,7 @@ static int iwl4965_txq_ctx_reset(struct iwl_priv *priv) goto error_reset; } -iwl_write_prph (priv,SCD_TXFACT ,0 ); +iwl_write_prph (priv,KDR_SCD_TXFACT ,0 );iwl_release_nic_access (priv);spin_unlock_irqrestore (&priv->lock, flags);
@@ -1582,7 +1582,7 @@ static void iwl4965_set_wr_ptrs(struct iwl_priv *priv, int txq_id, u32 index) {iwl_write_direct32 (priv,HBUS_TARG_WRPTR , (index &0xff ) | (txq_id <<8 )); -iwl_write_prph (priv,SCD_QUEUE_RDPTR (txq_id), index); +iwl_write_prph (priv,KDR_SCD_QUEUE_RDPTR (txq_id), index); }/*
@@ -1595,7 +1595,7 @@ static void iwl4965_tx_queue_set_status(struct iwl_priv *priv,int txq_id = txq->q.id;int active =test_bit (txq_id, &priv->txq_ctx_active_msk)?1 :0 ; - iwl_write_prph(priv, SCD_QUEUE_STATUS_BITS(txq_id), + iwl_write_prph(priv, KDR_SCD_QUEUE_STATUS_BITS(txq_id), (active << SCD_QUEUE_STTS_REG_POS_ACTIVE) | (tx_fifo_id << SCD_QUEUE_STTS_REG_POS_TXF) | (scd_retry << SCD_QUEUE_STTS_REG_POS_WSL) |
@@ -1653,7 +1653,7 @@ int iwl4965_alive_notify(struct iwl_priv *priv)return rc; } - priv->scd_base_addr =iwl_read_prph (priv,SCD_SRAM_BASE_ADDR ); + priv->scd_base_addr =iwl_read_prph (priv,KDR_SCD_SRAM_BASE_ADDR ); a = priv->scd_base_addr +SCD_CONTEXT_DATA_OFFSET ;for (; a < priv->scd_base_addr +SCD_TX_STTS_BITMAP_OFFSET ; a +=4 )iwl_write_targ_mem (priv, a,0 );
@@ -1662,14 +1662,14 @@ int iwl4965_alive_notify(struct iwl_priv *priv)for (; a <sizeof (u16) * priv->hw_setting.max_txq_num; a +=4 )iwl_write_targ_mem (priv, a,0 ); -iwl_write_prph (priv,SCD_DRAM_BASE_ADDR , +iwl_write_prph (priv,KDR_SCD_DRAM_BASE_ADDR , (priv->hw_setting.shared_phys + offsetof(struct iwl_shared , queues_byte_cnt_tbls)) >>10 ); -iwl_write_prph (priv,SCD_QUEUECHAIN_SEL ,0 ); +iwl_write_prph (priv,KDR_SCD_QUEUECHAIN_SEL ,0 );/* initiate the queues */ for (i =0 ; i < priv->hw_setting.max_txq_num; i++) { -iwl_write_prph (priv,SCD_QUEUE_RDPTR (i),0 ); +iwl_write_prph (priv,KDR_SCD_QUEUE_RDPTR (i),0 );iwl_write_direct32 (priv,HBUS_TARG_WRPTR ,0 | (i <<8 )); iwl_write_targ_mem(priv, priv->scd_base_addr + SCD_CONTEXT_QUEUE_OFFSET(i),
@@ -1684,10 +1684,10 @@ int iwl4965_alive_notify(struct iwl_priv *priv) SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK); } -iwl_write_prph (priv,SCD_INTERRUPT_MASK , +iwl_write_prph (priv,KDR_SCD_INTERRUPT_MASK , (1 << priv->hw_setting.max_txq_num) -1 ); -iwl_write_prph (priv,SCD_TXFACT , +iwl_write_prph (priv,KDR_SCD_TXFACT ,SCD_TXFACT_REG_TXFIFO_MASK (0 ,7 ));iwl4965_set_wr_ptrs (priv,IWL_CMD_QUEUE_NUM ,0 );
@@ -4129,7 +4129,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,static void iwl4965_tx_queue_stop_scheduler (struct iwl_priv *priv,u16 txq_id) {iwl_write_prph (priv, -SCD_QUEUE_STATUS_BITS (txq_id), +KDR_SCD_QUEUE_STATUS_BITS (txq_id), (0 <<SCD_QUEUE_STTS_REG_POS_ACTIVE )| (1 <<SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN )); }
@@ -4189,7 +4189,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,iwl4965_tx_queue_set_q2ratid (priv, ra_tid, txq_id); -iwl_set_bits_prph (priv,SCD_QUEUECHAIN_SEL , (1 <<txq_id)); +iwl_set_bits_prph (priv,KDR_SCD_QUEUECHAIN_SEL , (1 <<txq_id)); priv->txq[txq_id].q.read_ptr = (ssn_idx &0xff ); priv->txq[txq_id].q.write_ptr = (ssn_idx &0xff );
@@ -4207,7 +4207,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id, (SCD_FRAME_LIMIT <<SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS ) & SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK); -iwl_set_bits_prph (priv,SCD_INTERRUPT_MASK , (1 << txq_id)); +iwl_set_bits_prph (priv,KDR_SCD_INTERRUPT_MASK , (1 << txq_id));iwl4965_tx_queue_set_status (priv, &priv->txq[txq_id], tx_fifo,1 );
@@ -4241,14 +4241,14 @@ static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,iwl4965_tx_queue_stop_scheduler (priv, txq_id); -iwl_clear_bits_prph (priv,SCD_QUEUECHAIN_SEL , (1 << txq_id)); +iwl_clear_bits_prph (priv,KDR_SCD_QUEUECHAIN_SEL , (1 << txq_id)); priv->txq[txq_id].q.read_ptr = (ssn_idx &0xff ); priv->txq[txq_id].q.write_ptr = (ssn_idx &0xff );/* supposes that ssn_idx is valid (!= 0xFFF) */ iwl4965_set_wr_ptrs (priv, txq_id, ssn_idx); -iwl_clear_bits_prph (priv,SCD_INTERRUPT_MASK , (1 << txq_id)); +iwl_clear_bits_prph (priv,KDR_SCD_INTERRUPT_MASK , (1 << txq_id));iwl4965_txq_ctx_deactivate (priv, txq_id);iwl4965_tx_queue_set_status (priv, &priv->txq[txq_id], tx_fifo,0 );
drivers/net/wireless/iwlwifi/iwl-prph.h +29 -0
@@ -225,5 +225,34 @@#define BSM_SRAM_LOWER_BOUND (PRPH_BASE + 0x3800)#define BSM_SRAM_SIZE (1024)/* bytes */ +/* 4965 SCD memory mapped registers */ +#define KDR_SCD_BASE (PRPH_BASE + 0xa02c00) + +#define KDR_SCD_SRAM_BASE_ADDR (KDR_SCD_BASE + 0x0) +#define KDR_SCD_EMPTY_BITS (KDR_SCD_BASE + 0x4) +#define KDR_SCD_DRAM_BASE_ADDR (KDR_SCD_BASE + 0x10) +#define KDR_SCD_AIT (KDR_SCD_BASE + 0x18) +#define KDR_SCD_TXFACT (KDR_SCD_BASE + 0x1c) +#define KDR_SCD_QUEUE_WRPTR (x) (KDR_SCD_BASE + 0x24 + (x) * 4) +#define KDR_SCD_QUEUE_RDPTR (x) (KDR_SCD_BASE + 0x64 + (x) * 4) +#define KDR_SCD_SETQUEUENUM (KDR_SCD_BASE + 0xa4) +#define KDR_SCD_SET_TXSTAT_TXED (KDR_SCD_BASE + 0xa8) +#define KDR_SCD_SET_TXSTAT_DONE (KDR_SCD_BASE + 0xac) +#define KDR_SCD_SET_TXSTAT_NOT_SCHD (KDR_SCD_BASE + 0xb0) +#define KDR_SCD_DECREASE_CREDIT (KDR_SCD_BASE + 0xb4) +#define KDR_SCD_DECREASE_SCREDIT (KDR_SCD_BASE + 0xb8) +#define KDR_SCD_LOAD_CREDIT (KDR_SCD_BASE + 0xbc) +#define KDR_SCD_LOAD_SCREDIT (KDR_SCD_BASE + 0xc0) +#define KDR_SCD_BAR (KDR_SCD_BASE + 0xc4) +#define KDR_SCD_BAR_DW0 (KDR_SCD_BASE + 0xc8) +#define KDR_SCD_BAR_DW1 (KDR_SCD_BASE + 0xcc) +#define KDR_SCD_QUEUECHAIN_SEL (KDR_SCD_BASE + 0xd0) +#define KDR_SCD_QUERY_REQ (KDR_SCD_BASE + 0xd8) +#define KDR_SCD_QUERY_RES (KDR_SCD_BASE + 0xdc) +#define KDR_SCD_PENDING_FRAMES (KDR_SCD_BASE + 0xe0) +#define KDR_SCD_INTERRUPT_MASK (KDR_SCD_BASE + 0xe4) +#define KDR_SCD_INTERRUPT_THRESHOLD (KDR_SCD_BASE + 0xe8) +#define KDR_SCD_QUERY_MIN_FRAME_SIZE (KDR_SCD_BASE + 0x100) +#define KDR_SCD_QUEUE_STATUS_BITS (x) (KDR_SCD_BASE + 0x104 + (x) * 4)#endif /* __iwl_prph_h__ */
Signature · 1 line
1.5.2
PATCH 18/30 iwlwifi: move 3945 SCD registers to iwl-prph.h
From: Emmanuel Grumbach <[email protected]>
This patch moves 3945 SCD registers to iwl-prph.h. These registers are assigned from the periphery bus
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 16 ++++++++-------- drivers/net/wireless/iwlwifi/iwl-prph.h | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +8 -8
@@ -794,18 +794,18 @@ static int iwl3945_tx_reset(struct iwl_priv *priv) }/* bypass mode */ -iwl_write_prph (priv,SCD_MODE_REG ,0x2 ); +iwl_write_prph (priv,ALM_SCD_MODE_REG ,0x2 );/* RA 0 is active */ -iwl_write_prph (priv,SCD_ARASTAT_REG ,0x01 ); +iwl_write_prph (priv,ALM_SCD_ARASTAT_REG ,0x01 );/* all 6 fifo are active */ -iwl_write_prph (priv,SCD_TXFACT_REG ,0x3f ); +iwl_write_prph (priv,ALM_SCD_TXFACT_REG ,0x3f ); -iwl_write_prph (priv,SCD_SBYP_MODE_1_REG ,0x010000 ); -iwl_write_prph (priv,SCD_SBYP_MODE_2_REG ,0x030002 ); -iwl_write_prph (priv,SCD_TXF4MF_REG ,0x000004 ); -iwl_write_prph (priv,SCD_TXF5MF_REG ,0x000005 ); +iwl_write_prph (priv,ALM_SCD_SBYP_MODE_1_REG ,0x010000 ); +iwl_write_prph (priv,ALM_SCD_SBYP_MODE_2_REG ,0x030002 ); +iwl_write_prph (priv,ALM_SCD_TXF4MF_REG ,0x000004 ); +iwl_write_prph (priv,ALM_SCD_TXF5MF_REG ,0x000005 );iwl_write_direct32 (priv,FH_TSSR_CBB_BASE , priv->hw_setting.shared_phys);
@@ -1033,7 +1033,7 @@ void iwl_hw_txq_ctx_stop(struct iwl_priv *priv) }/* stop SCD */ -iwl_write_prph (priv,SCD_MODE_REG ,0 ); +iwl_write_prph (priv,ALM_SCD_MODE_REG ,0 );/* reset TFD queues */ for (queue =TFD_QUEUE_MIN ; queue <TFD_QUEUE_MAX ; queue++) {
drivers/net/wireless/iwlwifi/iwl-prph.h +12 -0
@@ -225,6 +225,18 @@#define BSM_SRAM_LOWER_BOUND (PRPH_BASE + 0x3800)#define BSM_SRAM_SIZE (1024)/* bytes */ +/* ALM SCD */ +/* SCD (Scheduler) */ +#define ALM_SCD_BASE (PRPH_BASE + 0x2E00) +#define ALM_SCD_MODE_REG (ALM_SCD_BASE + 0x000) +#define ALM_SCD_ARASTAT_REG (ALM_SCD_BASE + 0x004) +#define ALM_SCD_TXFACT_REG (ALM_SCD_BASE + 0x010) +#define ALM_SCD_TXF4MF_REG (ALM_SCD_BASE + 0x014) +#define ALM_SCD_TXF5MF_REG (ALM_SCD_BASE + 0x020) +#define ALM_SCD_SBYP_MODE_1_REG (ALM_SCD_BASE + 0x02C) +#define ALM_SCD_SBYP_MODE_2_REG (ALM_SCD_BASE + 0x030) + +/* 4965 SCD memory mapped registers */ #define KDR_SCD_BASE (PRPH_BASE + 0xa02c00)
Signature · 1 line
1.5.2
PATCH 19/30 iwlwifi: add 5965 SCD registers to iwl-prph.h
From: Emmanuel Grumbach <[email protected]>
This patch adds SCD registers for 5965
--- drivers/net/wireless/iwlwifi/iwl-prph.h | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-prph.h +11 -1
@@ -236,7 +236,6 @@#define ALM_SCD_SBYP_MODE_1_REG (ALM_SCD_BASE + 0x02C)#define ALM_SCD_SBYP_MODE_2_REG (ALM_SCD_BASE + 0x030) -/* 4965 SCD memory mapped registers */ #define KDR_SCD_BASE (PRPH_BASE + 0xa02c00)
@@ -267,4 +266,15 @@#define KDR_SCD_QUERY_MIN_FRAME_SIZE (KDR_SCD_BASE + 0x100)#define KDR_SCD_QUEUE_STATUS_BITS (x) (KDR_SCD_BASE + 0x104 + (x) * 4) +/* SP SCD */ +#define SHL_SCD_BASE (PRPH_BASE + 0xa02c00) + +#define SHL_SCD_AIT (SHL_SCD_BASE + 0x0c) +#define SHL_SCD_TXFACT (SHL_SCD_BASE + 0x10) +#define SHL_SCD_QUEUE_WRPTR (x) (SHL_SCD_BASE + 0x18 + (x) * 4) +#define SHL_SCD_QUEUE_RDPTR (x) (SHL_SCD_BASE + 0x68 + (x) * 4) +#define SHL_SCD_QUEUECHAIN_SEL (SHL_SCD_BASE + 0xe8) +#define SHL_SCD_AGGR_SEL (SHL_SCD_BASE + 0x248) +#define SHL_SCD_INTERRUPT_MASK (SHL_SCD_BASE + 0x108) +#endif /* __iwl_prph_h__ */
Signature · 1 line
1.5.2
PATCH 20/30 iwlwifi: Renames struct fw_image_desc to struct fw_desc
From: Tomas Winkler <[email protected]>
This patche shortens the name of struct fw_image_desc to be struct fw_desc.
--- drivers/net/wireless/iwlwifi/iwl-priv.h | 12 ++++++------ drivers/net/wireless/iwlwifi/iwlwifi.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/iwlwifi/iwl-priv.h +6 -6
@@ -102,12 +102,12 @@ struct iwl_priv {void __iomem *hw_base;/* uCode images, save to reload in case of failure */ -struct fw_image_desc ucode_code;/* runtime inst */ -struct fw_image_desc ucode_data;/* runtime data original */ -struct fw_image_desc ucode_data_backup;/* runtime data save/restore */ -struct fw_image_desc ucode_init;/* initialization inst */ -struct fw_image_desc ucode_init_data;/* initialization data */ -struct fw_image_desc ucode_boot;/* bootstrap inst */ +struct fw_desc ucode_code;/* runtime inst */ +struct fw_desc ucode_data;/* runtime data original */ +struct fw_desc ucode_data_backup;/* runtime data save/restore */ +struct fw_desc ucode_init;/* initialization inst */ +struct fw_desc ucode_init_data;/* initialization data */ +struct fw_desc ucode_boot;/* bootstrap inst */ struct iwl_rxon_time_cmd rxon_timing;
drivers/net/wireless/iwlwifi/iwlwifi.h +1 -1
@@ -497,7 +497,7 @@ struct iwl_station_entry { };/* one for each uCode image (inst/data, boot/init/runtime) */ -struct fw_image_desc { +struct fw_desc {void *v_addr;/* access by driver */ dma_addr_t p_addr;/* access by card's busmaster DMA */ u32 len;/* bytes */
Signature · 1 line
1.5.2
PATCH 21/30 iwl4965: exclude 60M rate from probe request
From: mabbas <[email protected]>
This patch do the following 2 things:
1. Make sure we don't add rate 60M part of supported rate in proble request, some AP does not like that.
2. It is wrong to set priv->active_rate in this function, this will set it to all avialable rates which might overwrite the mode supported rate. priv->active_rate should be set by only from iwl_set_rate.
--- drivers/net/wireless/iwlwifi/iwl4965-base.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/net/wireless/iwlwifi/iwl4965-base.c +9 -7
@@ -1831,7 +1831,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, {int len =0 ;u8 *pos =NULL ; -u16 active_rates, ret_rates, cck_rates; +u16 active_rates, ret_rates, cck_rates, active_rate_basic;/* Make sure there is enough space for the probe request, * two mandatory IEs and the data */
@@ -1881,17 +1881,19 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, *pos++ =WLAN_EID_SUPP_RATES ; *pos =0 ; - priv->active_rate = priv->rates_mask; - active_rates = priv->active_rate; - priv->active_rate_basic = priv->rates_mask &IWL_BASIC_RATES_MASK ; +/* exclude 60M rate */ + active_rates = priv->rates_mask; + active_rates &= ~IWL_RATE_60M_MASK ; + + active_rate_basic = active_rates &IWL_BASIC_RATES_MASK ; cck_rates =IWL_CCK_RATES_MASK & active_rates; ret_rates =iwl_supported_rate_to_ie (pos, cck_rates, - priv->active_rate_basic, &left); + active_rate_basic, &left); active_rates &= ~ret_rates; ret_rates =iwl_supported_rate_to_ie (pos, active_rates, - priv->active_rate_basic, &left); + active_rate_basic, &left); active_rates &= ~ret_rates; len +=2 + *pos;
@@ -1908,7 +1910,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, *pos++ =WLAN_EID_EXT_SUPP_RATES ; *pos =0 ;iwl_supported_rate_to_ie (pos, active_rates, - priv->active_rate_basic, &left); + active_rate_basic, &left);if (*pos >0 ) len +=2 + *pos;
Signature · 1 line
1.5.2
PATCH 22/30 iwl4965: fix driver hang related to hardware scan
From: mabbas <[email protected]>
This patch fix the following:
1. make sure we are not scanning before we call REPLY_RXON
2. set RXON_FILTER_ASSOC_MSK only after we receive association response
3. call scan abort on scan watchdog instead of restart
--- drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +- drivers/net/wireless/iwlwifi/iwl4965-base.c | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-)
drivers/net/wireless/iwlwifi/iwl-4965.c +1 -1
@@ -3865,7 +3865,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,*/ case IEEE80211_STYPE_ASSOC_RESP :case IEEE80211_STYPE_REASSOC_RESP : -if (network_packet &&iwl_is_associated (priv)) { +if (network_packet) {#ifdef CONFIG_IWLWIFI_HT u8 *pos =NULL ;struct ieee802_11_elems elems;
drivers/net/wireless/iwlwifi/iwl4965-base.c +20 -4
@@ -6831,8 +6831,9 @@ static void iwl_bg_scan_check(struct work_struct *data)IWL_DEBUG (IWL_DL_INFO |IWL_DL_SCAN ,"Scan completion watchdog resetting adapter (%dms)\n" ,jiffies_to_msecs (IWL_SCAN_CHECK_WATCHDOG )); +if (!test_bit (STATUS_EXIT_PENDING , &priv->status)) -queue_work (priv->workqueue, &priv->restart); +iwl_send_scan_abort (priv); }mutex_unlock (&priv->mutex); }
@@ -6928,7 +6929,7 @@ static void iwl_bg_request_scan(struct work_struct *data)spin_unlock_irqrestore (&priv->lock, flags); scan->suspend_time =0 ; - scan->max_out_time =cpu_to_le32 (600 *1024 ); + scan->max_out_time =cpu_to_le32 (200 *1024 );if (!interval) interval = suspend_time;
@@ -7102,6 +7103,8 @@ static void iwl_bg_post_associate(struct work_struct *data)mutex_lock (&priv->mutex); +iwl_scan_cancel_timeout (priv,200 ); + conf =ieee80211_get_hw_conf (priv->hw); priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ;
@@ -7554,8 +7557,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,if (priv->iw_mode ==IEEE80211_IF_TYPE_AP )iwl_config_ap (priv);else { - priv->staging_rxon.filter_flags |= -RXON_FILTER_ASSOC_MSK ; rc =iwl_commit_rxon (priv);if ((priv->iw_mode ==IEEE80211_IF_TYPE_STA ) && rc) iwl_rxon_add_station(
@@ -7563,6 +7564,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, } }else { +iwl_scan_cancel_timeout (priv,100 ); priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ;iwl_commit_rxon (priv); }
@@ -7623,6 +7625,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)IWL_DEBUG_MAC80211 ("enter\n" ); +mutex_lock (&priv->mutex);spin_lock_irqsave (&priv->lock, flags);if (!iwl_is_ready_rf (priv)) {
@@ -7661,6 +7664,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) out_unlock:spin_unlock_irqrestore (&priv->lock, flags); +mutex_unlock (&priv->mutex);return rc; }
@@ -7693,6 +7697,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,mutex_lock (&priv->mutex); +iwl_scan_cancel_timeout (priv,100 ); +switch (cmd) {case SET_KEY : rc =iwl_update_sta_key_info (priv, key, sta_id);
@@ -7883,8 +7889,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)spin_unlock_irqrestore (&priv->lock, flags); +/* we are restarting association process +* clear RXON_FILTER_ASSOC_MSK bit +*/ +if (priv->iw_mode !=IEEE80211_IF_TYPE_AP ) { +iwl_scan_cancel_timeout (priv,100 ); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); + } +/* Per mac80211.h: This is only used in IBSS mode... */ if (priv->iw_mode !=IEEE80211_IF_TYPE_IBSS ) { +IWL_DEBUG_MAC80211 ("leave - not in IBSS\n" );mutex_unlock (&priv->mutex);return ;
Signature · 1 line
1.5.2
PATCH 23/30 iwlwifi: Update iwlwifi version stamp to 1.1.18
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +- drivers/net/wireless/iwlwifi/iwl4965-base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
@@ -101,7 +101,7 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;#define VS #endif -#define IWLWIFI_VERSION "1.1.17k" VD VS +#define IWLWIFI_VERSION "1.1.18k" VD VS#define DRV_COPYRIGHT "Copyright(c) 2003-2007 Intel Corporation"#define DRV_VERSION IWLWIFI_VERSION
drivers/net/wireless/iwlwifi/iwl4965-base.c +1 -1
@@ -100,7 +100,7 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;#define VS #endif -#define IWLWIFI_VERSION "1.1.17k" VD VS +#define IWLWIFI_VERSION "1.1.18k" VD VS#define DRV_COPYRIGHT "Copyright(c) 2003-2007 Intel Corporation"#define DRV_VERSION IWLWIFI_VERSION
Signature · 1 line
1.5.2
PATCH 24/30 iwl4965: fix scan problem
From: Mohamed Abbas <[email protected]>
This patch fixes the following problems for 4965:
1. Fix direct scan by make sure we set one_direct_scan only when the mac80211 ask for direct scan.
2. Fix mac_stop and mac_remove_interface calles, we make sure we cancel any scan and disassoc on these call.
--- drivers/net/wireless/iwlwifi/iwl4965-base.c | 32 +++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl4965-base.c +28 -4
@@ -6952,7 +6952,7 @@ static void iwl_bg_request_scan(struct work_struct *data)memcpy (scan->direct_scan[0 ].ssid, priv->direct_ssid, priv->direct_ssid_len); direct_mask =1 ; - }else if (!iwl_is_associated (priv)) { + }else if (!iwl_is_associated (priv) && priv->essid_len) { scan->direct_scan[0 ].id =WLAN_EID_SSID ; scan->direct_scan[0 ].len = priv->essid_len;memcpy (scan->direct_scan[0 ].ssid, priv->essid, priv->essid_len);
@@ -7103,6 +7103,10 @@ static void iwl_bg_post_associate(struct work_struct *data)mutex_lock (&priv->mutex); +if (!priv->interface_id || !priv->is_open) { +mutex_unlock (&priv->mutex); +return ; + }iwl_scan_cancel_timeout (priv,200 ); conf =ieee80211_get_hw_conf (priv->hw);
@@ -7257,9 +7261,19 @@ static void iwl_mac_stop(struct ieee80211_hw *hw)struct iwl_priv *priv = hw->priv;IWL_DEBUG_MAC80211 ("enter\n" ); + + +mutex_lock (&priv->mutex); +/* stop mac, cancel any scan request and clear +* RXON_FILTER_ASSOC_MSK BIT +*/ priv->is_open =0 ; -/*netif_stop_queue(dev); */ -flush_workqueue (priv->workqueue); +iwl_scan_cancel_timeout (priv,100 ); +cancel_delayed_work (&priv->post_associate); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); +mutex_unlock (&priv->mutex); +IWL_DEBUG_MAC80211 ("leave\n" ); }
@@ -7604,6 +7618,12 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw,IWL_DEBUG_MAC80211 ("enter\n" );mutex_lock (&priv->mutex); + +iwl_scan_cancel_timeout (priv,100 ); +cancel_delayed_work (&priv->post_associate); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); +if (priv->interface_id == conf->if_id) { priv->interface_id =0 ;memset (priv->bssid,0 ,ETH_ALEN );
@@ -7656,7 +7676,8 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) priv->direct_ssid_len = (u8 )min ((u8 ) len, (u8 )IW_ESSID_MAX_SIZE );memcpy (priv->direct_ssid, ssid, priv->direct_ssid_len); - } + }else + priv->one_direct_scan =0 ; rc =iwl_scan_initiate (priv);
@@ -9146,6 +9167,9 @@ static void iwl_pci_remove(struct pci_dev *pdev)iwl_rate_control_unregister (priv->hw); } +/*netif_stop_queue(dev); */ +flush_workqueue (priv->workqueue); +/* ieee80211_unregister_hw calls iwl_mac_stop, which flushes * priv->workqueue... so we can't take down the workqueue * until now... */
Signature · 1 line
1.5.2
PATCH 25/30 iwl3945: cancel scan on rxon command
From: Mohamed Abbas <[email protected]>
This patch fixes the following for 3945:
1. Make sure we cancel scan if RXON command is called.
2. Call scan abort on scan watchdog.
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +20 -4
@@ -6451,8 +6451,9 @@ static void iwl_bg_scan_check(struct work_struct *data)IWL_DEBUG (IWL_DL_INFO |IWL_DL_SCAN ,"Scan completion watchdog resetting adapter (%dms)\n" ,jiffies_to_msecs (IWL_SCAN_CHECK_WATCHDOG )); +if (!test_bit (STATUS_EXIT_PENDING , &priv->status)) -queue_work (priv->workqueue, &priv->restart); +iwl_send_scan_abort (priv); }mutex_unlock (&priv->mutex); }
@@ -6548,7 +6549,7 @@ static void iwl_bg_request_scan(struct work_struct *data)spin_unlock_irqrestore (&priv->lock, flags); scan->suspend_time =0 ; - scan->max_out_time =cpu_to_le32 (600 *1024 ); + scan->max_out_time =cpu_to_le32 (200 *1024 );if (!interval) interval = suspend_time;/*
@@ -6715,6 +6716,8 @@ static void iwl_bg_post_associate(struct work_struct *data)mutex_lock (&priv->mutex); +iwl_scan_cancel_timeout (priv,200 ); + conf =ieee80211_get_hw_conf (priv->hw); priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ;
@@ -7137,8 +7140,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,if (priv->iw_mode ==IEEE80211_IF_TYPE_AP )iwl_config_ap (priv);else { - priv->staging_rxon.filter_flags |= -RXON_FILTER_ASSOC_MSK ; rc =iwl_commit_rxon (priv);if ((priv->iw_mode ==IEEE80211_IF_TYPE_STA ) && rc) iwl_add_station(priv,
@@ -7146,6 +7147,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, } }else { +iwl_scan_cancel_timeout (priv,100 ); priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ;iwl_commit_rxon (priv); }
@@ -7206,6 +7208,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)IWL_DEBUG_MAC80211 ("enter\n" ); +mutex_lock (&priv->mutex);spin_lock_irqsave (&priv->lock, flags);if (!iwl_is_ready_rf (priv)) {
@@ -7244,6 +7247,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) out_unlock:spin_unlock_irqrestore (&priv->lock, flags); +mutex_unlock (&priv->mutex);return rc; }
@@ -7276,6 +7280,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,mutex_lock (&priv->mutex); +iwl_scan_cancel_timeout (priv,100 ); +switch (cmd) {case SET_KEY : rc =iwl_update_sta_key_info (priv, key, sta_id);
@@ -7445,8 +7451,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)spin_unlock_irqrestore (&priv->lock, flags); +/* we are restarting association process +* clear RXON_FILTER_ASSOC_MSK bit +*/ +if (priv->iw_mode !=IEEE80211_IF_TYPE_AP ) { +iwl_scan_cancel_timeout (priv,100 ); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); + } +/* Per mac80211.h: This is only used in IBSS mode... */ if (priv->iw_mode !=IEEE80211_IF_TYPE_IBSS ) { +IWL_DEBUG_MAC80211 ("leave - not in IBSS\n" );mutex_unlock (&priv->mutex);return ;
Signature · 1 line
1.5.2
PATCH 26/30 iwl3945: fix direct scan problem
From: Mohamed Abbas <[email protected]>
This patch fix the follwing for 3945:
1. Fix direct scan by make sure we set one_direct_scan only when the mac80211 ask for direct scan.
2. Fix mac_stop and mac_remove_interface calles, we make sure we cancel any scan and disassoc on these call
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 32 +++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +28 -4
@@ -6579,7 +6579,7 @@ static void iwl_bg_request_scan(struct work_struct *data)memcpy (scan->direct_scan[0 ].ssid, priv->direct_ssid, priv->direct_ssid_len); direct_mask =1 ; - }else if (!iwl_is_associated (priv)) { + }else if (!iwl_is_associated (priv) && priv->essid_len) { scan->direct_scan[0 ].id =WLAN_EID_SSID ; scan->direct_scan[0 ].len = priv->essid_len;memcpy (scan->direct_scan[0 ].ssid, priv->essid, priv->essid_len);
@@ -6716,6 +6716,10 @@ static void iwl_bg_post_associate(struct work_struct *data)mutex_lock (&priv->mutex); +if (!priv->interface_id || !priv->is_open) { +mutex_unlock (&priv->mutex); +return ; + }iwl_scan_cancel_timeout (priv,200 ); conf =ieee80211_get_hw_conf (priv->hw);
@@ -6855,9 +6859,19 @@ static void iwl_mac_stop(struct ieee80211_hw *hw)struct iwl_priv *priv = hw->priv;IWL_DEBUG_MAC80211 ("enter\n" ); + + +mutex_lock (&priv->mutex); +/* stop mac, cancel any scan request and clear +* RXON_FILTER_ASSOC_MSK BIT +*/ priv->is_open =0 ; -/*netif_stop_queue(dev); */ -flush_workqueue (priv->workqueue); +iwl_scan_cancel_timeout (priv,100 ); +cancel_delayed_work (&priv->post_associate); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); +mutex_unlock (&priv->mutex); +IWL_DEBUG_MAC80211 ("leave\n" ); }
@@ -7187,6 +7201,12 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw,IWL_DEBUG_MAC80211 ("enter\n" );mutex_lock (&priv->mutex); + +iwl_scan_cancel_timeout (priv,100 ); +cancel_delayed_work (&priv->post_associate); + priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK ; +iwl_commit_rxon (priv); +if (priv->interface_id == conf->if_id) { priv->interface_id =0 ;memset (priv->bssid,0 ,ETH_ALEN );
@@ -7239,7 +7259,8 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) priv->direct_ssid_len = (u8 )min ((u8 ) len, (u8 )IW_ESSID_MAX_SIZE );memcpy (priv->direct_ssid, ssid, priv->direct_ssid_len); - } + }else + priv->one_direct_scan =0 ; rc =iwl_scan_initiate (priv);
@@ -8540,6 +8561,9 @@ static void iwl_pci_remove(struct pci_dev *pdev)iwl_rate_control_unregister (priv->hw); } +/*netif_stop_queue(dev); */ +flush_workqueue (priv->workqueue); +/* ieee80211_unregister_hw calls iwl_mac_stop, which flushes * priv->workqueue... so we can't take down the workqueue * until now... */
Signature · 1 line
1.5.2
PATCH 27/30 iwlwifi: Update iwlwifi version stamp to 1.1.19
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +- drivers/net/wireless/iwlwifi/iwl4965-base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
@@ -101,7 +101,7 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;#define VS #endif -#define IWLWIFI_VERSION "1.1.18k" VD VS +#define IWLWIFI_VERSION "1.1.19k" VD VS#define DRV_COPYRIGHT "Copyright(c) 2003-2007 Intel Corporation"#define DRV_VERSION IWLWIFI_VERSION
drivers/net/wireless/iwlwifi/iwl4965-base.c +1 -1
@@ -100,7 +100,7 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;#define VS #endif -#define IWLWIFI_VERSION "1.1.18k" VD VS +#define IWLWIFI_VERSION "1.1.19k" VD VS#define DRV_COPYRIGHT "Copyright(c) 2003-2007 Intel Corporation"#define DRV_VERSION IWLWIFI_VERSION
Signature · 1 line
1.5.2
PATCH 28/30 iwlwifi: mark more functions/variables static
From: Christoph Hellwig <[email protected]>
mark more functions/variables static
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 17 +-------------- drivers/net/wireless/iwlwifi/iwl-3945.h | 1 - drivers/net/wireless/iwlwifi/iwl-4965.c | 4 ++- drivers/net/wireless/iwlwifi/iwl3945-base.c | 29 ++++++++++++++------------ drivers/net/wireless/iwlwifi/iwl4965-base.c | 25 +++++++++++++---------- drivers/net/wireless/iwlwifi/iwlwifi.h | 20 +++-------------- 6 files changed, 38 insertions(+), 58 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -16
@@ -688,21 +688,6 @@ u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags)return sta_id; } -void iwl_hw_card_show_info (struct iwl_priv *priv) -{ -IWL_DEBUG_INFO ("3945ABG HW Version %u.%u.%u\n" , - ((priv->eeprom.board_revision >>8 ) &0x0F ), - ((priv->eeprom.board_revision >>8 ) >>4 ), - (priv->eeprom.board_revision &0x00FF )); - -IWL_DEBUG_INFO ("3945ABG PBA Number %.*s\n" , - (int )sizeof (priv->eeprom.board_pba_number), - priv->eeprom.board_pba_number); - -IWL_DEBUG_INFO ("EEPROM_ANTENNA_SWITCH_TYPE is 0x%02X\n" , - priv->eeprom.antenna_switch_type); -} -static int iwl3945_nic_set_pwr_src (struct iwl_priv *priv,int pwr_max) {int rc;
@@ -1753,7 +1738,7 @@ void iwl3945_reg_txpower_periodic(struct iwl_priv *priv) &priv->thermal_periodic, REG_RECALIB_PERIOD * HZ); } -void iwl3945_bg_reg_txpower_periodic (struct work_struct *work) +static void iwl3945_bg_reg_txpower_periodic (struct work_struct *work) { struct iwl_priv *priv = container_of(work, struct iwl_priv, thermal_periodic.work);
drivers/net/wireless/iwlwifi/iwl-3945.h +0 -1
@@ -34,7 +34,6 @@ extern int iwl_eeprom_acquire_semaphore(struct iwl_priv *priv);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 void iwl3945_bg_reg_txpower_periodic (struct work_struct *work);extern int iwl3945_txpower_set_from_eeprom (struct iwl_priv *priv);extern u8 iwl3945_sync_sta (struct iwl_priv *priv,int sta_id,u16 tx_rate,u8 flags);
drivers/net/wireless/iwlwifi/iwl-4965.c +3 -1
@@ -43,6 +43,8 @@#include "iwl-4965.h" #include "iwl-helpers.h" +static void iwl_hw_card_show_info (struct iwl_priv *priv); +#define IWL_DECLARE_RATE_INFO (r, s, ip, in, rp, rn, pp, np) \ [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ IWL_RATE_SISO_##s##M_PLCP, \
@@ -2743,7 +2745,7 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,return 0 ; } -void iwl_hw_card_show_info (struct iwl_priv *priv) +static void iwl_hw_card_show_info (struct iwl_priv *priv) {u16 hw_version = priv->eeprom.board_revision_4965;
drivers/net/wireless/iwlwifi/iwl3945-base.c +16 -13
@@ -66,6 +66,9 @@u32 iwl_debug_level;#endif +static int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv, +struct iwl_tx_queue *txq); +/****************************************************************************** * * module boiler plate
@@ -73,12 +76,12 @@ u32 iwl_debug_level;******************************************************************************/ /* module parameters */ -int iwl_param_disable_hw_scan; -int iwl_param_debug; -int iwl_param_disable;/* def: enable radio */ -int iwl_param_antenna;/* def: 0 = both antennas (use diversity) */ +static int iwl_param_disable_hw_scan; +static int iwl_param_debug; +static int iwl_param_disable;/* def: enable radio */ +static int iwl_param_antenna;/* def: 0 = both antennas (use diversity) */ int iwl_param_hwcrypto;/* def: using software encryption */ -int iwl_param_qos_enable =1 ; +static int iwl_param_qos_enable =1 ;int iwl_param_queues_num =IWL_MAX_NUM_QUEUES ;/*
@@ -116,7 +119,7 @@ MODULE_VERSION(DRV_VERSION);MODULE_AUTHOR (DRV_COPYRIGHT );MODULE_LICENSE ("GPL" ); -__le16 *ieee80211_get_qos_ctrl (struct ieee80211_hdr *hdr) +static __le16 *ieee80211_get_qos_ctrl (struct ieee80211_hdr *hdr) {u16 fc =le16_to_cpu (hdr->frame_control);int hdr_len =ieee80211_get_hdrlen (fc);
@@ -693,7 +696,7 @@ static int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)return ret ? ret : idx; } -int iwl_send_cmd_async (struct iwl_priv *priv,struct iwl_host_cmd *cmd) +static int iwl_send_cmd_async (struct iwl_priv *priv,struct iwl_host_cmd *cmd) {int ret;
@@ -717,7 +720,7 @@ int iwl_send_cmd_async(struct iwl_priv *priv, struct iwl_host_cmd *cmd)return 0 ; } -int iwl_send_cmd_sync (struct iwl_priv *priv,struct iwl_host_cmd *cmd) +static int iwl_send_cmd_sync (struct iwl_priv *priv,struct iwl_host_cmd *cmd) {int cmd_idx;int ret;
@@ -2198,7 +2201,7 @@ int iwl_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)#define TX_STATUS_ENTRY (x) case TX_STATUS_FAIL_ ## x: return #x -const char *iwl_get_tx_fail_reason (u32 status) +static const char *iwl_get_tx_fail_reason (u32 status) {switch (status &TX_STATUS_MSK ) {case TX_STATUS_SUCCESS :
@@ -3344,7 +3347,7 @@ static void iwl_txstatus_to_ieee(struct iwl_priv *priv,* new 'R' index need to be reclaimed. As result, some free space * forms. If there is enough free space (> low mark), wake Tx queue. */ -int iwl_tx_queue_reclaim (struct iwl_priv *priv,int txq_id,int index) +static int iwl_tx_queue_reclaim (struct iwl_priv *priv,int txq_id,int index) {struct iwl_tx_queue *txq = &priv->txq[txq_id];struct iwl_queue *q = &txq->q;
@@ -3984,7 +3987,7 @@ static inline __le32 iwl_dma_addr2rbd_ptr(struct iwl_priv *priv,* also updates the memory address in the firmware to reference the new * target buffer. */ -int iwl_rx_queue_restock (struct iwl_priv *priv) +static int iwl_rx_queue_restock (struct iwl_priv *priv) {struct iwl_rx_queue *rxq = &priv->rxq;struct list_head *element;
@@ -4074,7 +4077,7 @@ void iwl_rx_replenish(void *data)* This free routine walks the list of POOL entries and if SKB is set to * non NULL it is unmapped and freed */ -void iwl_rx_queue_free (struct iwl_priv *priv,struct iwl_rx_queue *rxq) +static void iwl_rx_queue_free (struct iwl_priv *priv,struct iwl_rx_queue *rxq) {int i;for (i =0 ; i <RX_QUEUE_SIZE +RX_FREE_BUFFERS ; i++) {
@@ -4317,7 +4320,7 @@ static void iwl_rx_handle(struct iwl_priv *priv)iwl_rx_queue_restock (priv); } -int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv, +static int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv,struct iwl_tx_queue *txq) {u32 reg =0 ;
drivers/net/wireless/iwlwifi/iwl4965-base.c +14 -11
@@ -66,6 +66,9 @@u32 iwl_debug_level;#endif +static int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv, +struct iwl_tx_queue *txq); +/****************************************************************************** * * module boiler plate
@@ -73,12 +76,12 @@ u32 iwl_debug_level;******************************************************************************/ /* module parameters */ -int iwl_param_disable_hw_scan; -int iwl_param_debug; -int iwl_param_disable;/* def: enable radio */ -int iwl_param_antenna;/* def: 0 = both antennas (use diversity) */ +static int iwl_param_disable_hw_scan; +static int iwl_param_debug; +static int iwl_param_disable;/* def: enable radio */ +static int iwl_param_antenna;/* def: 0 = both antennas (use diversity) */ int iwl_param_hwcrypto;/* def: using software encryption */ -int iwl_param_qos_enable =1 ; +static int iwl_param_qos_enable =1 ;int iwl_param_queues_num =IWL_MAX_NUM_QUEUES ;/*
@@ -691,7 +694,7 @@ static int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)return ret ? ret : idx; } -int iwl_send_cmd_async (struct iwl_priv *priv,struct iwl_host_cmd *cmd) +static int iwl_send_cmd_async (struct iwl_priv *priv,struct iwl_host_cmd *cmd) {int ret;
@@ -715,7 +718,7 @@ int iwl_send_cmd_async(struct iwl_priv *priv, struct iwl_host_cmd *cmd)return 0 ; } -int iwl_send_cmd_sync (struct iwl_priv *priv,struct iwl_host_cmd *cmd) +static int iwl_send_cmd_sync (struct iwl_priv *priv,struct iwl_host_cmd *cmd) {int cmd_idx;int ret;
@@ -2279,7 +2282,7 @@ int iwl_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)#define TX_STATUS_ENTRY (x) case TX_STATUS_FAIL_ ## x: return #x -const char *iwl_get_tx_fail_reason (u32 status) +static const char *iwl_get_tx_fail_reason (u32 status) {switch (status &TX_STATUS_MSK ) {case TX_STATUS_SUCCESS :
@@ -4312,7 +4315,7 @@ static inline __le32 iwl_dma_addr2rbd_ptr(struct iwl_priv *priv,* also updates the memory address in the firmware to reference the new * target buffer. */ -int iwl_rx_queue_restock (struct iwl_priv *priv) +static int iwl_rx_queue_restock (struct iwl_priv *priv) {struct iwl_rx_queue *rxq = &priv->rxq;struct list_head *element;
@@ -4402,7 +4405,7 @@ void iwl_rx_replenish(void *data)* This free routine walks the list of POOL entries and if SKB is set to * non NULL it is unmapped and freed */ -void iwl_rx_queue_free (struct iwl_priv *priv,struct iwl_rx_queue *rxq) +static void iwl_rx_queue_free (struct iwl_priv *priv,struct iwl_rx_queue *rxq) {int i;for (i =0 ; i <RX_QUEUE_SIZE +RX_FREE_BUFFERS ; i++) {
@@ -4648,7 +4651,7 @@ static void iwl_rx_handle(struct iwl_priv *priv)iwl_rx_queue_restock (priv); } -int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv, +static int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv,struct iwl_tx_queue *txq) {u32 reg =0 ;
drivers/net/wireless/iwlwifi/iwlwifi.h +4 -16
@@ -76,13 +76,7 @@ extern struct pci_device_id iwl_hw_card_ids[];#define IWL_NOISE_MEAS_NOT_AVAILABLE (-127)/* Module parameters accessible from iwl-*.c */ -extern int iwl_param_disable_hw_scan; -extern int iwl_param_debug; -extern int iwl_param_mode; -extern int iwl_param_disable; -extern int iwl_param_antenna;extern int iwl_param_hwcrypto; -extern int iwl_param_qos_enable;extern int iwl_param_queues_num;enum iwl_antenna {
@@ -574,7 +568,6 @@ struct iwl_driver_hw_info {struct iwl_addsta_cmd ;extern int iwl_send_add_station (struct iwl_priv *priv,struct iwl_addsta_cmd *sta,u8 flags); -extern const char *iwl_get_tx_fail_reason (u32 status);extern u8 iwl_add_station (struct iwl_priv *priv,const u8 *bssid,int is_ap,u8 flags); extern int iwl_is_network_packet(struct iwl_priv *priv,
@@ -591,8 +584,6 @@ static inline void iwl_report_frame(struct iwl_priv *priv, struct ieee80211_hdr *header, int group100) {}#endif -extern int iwl_tx_queue_update_write_ptr (struct iwl_priv *priv, -struct iwl_tx_queue *txq); extern void iwl_handle_data_packet_monitor(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb, void *data, short len,
@@ -600,7 +591,6 @@ extern void iwl_handle_data_packet_monitor(struct iwl_priv *priv, u16 phy_flags);extern int is_duplicate_packet (struct iwl_priv *priv,struct ieee80211_hdr *header); -extern void iwl_rx_queue_free (struct iwl_priv *priv,struct iwl_rx_queue *rxq);extern int iwl_rx_queue_alloc (struct iwl_priv *priv);extern void iwl_rx_queue_reset (struct iwl_priv *priv,struct iwl_rx_queue *rxq);
@@ -608,15 +598,10 @@ extern int iwl_calc_db_from_ratio(int sig_ratio);extern int iwl_calc_sig_qual (int rssi_dbm,int noise_dbm);extern int iwl_tx_queue_init (struct iwl_priv *priv,struct iwl_tx_queue *txq,int count,u32 id); -extern int iwl_rx_queue_restock (struct iwl_priv *priv);extern void iwl_rx_replenish (void *data);extern void iwl_tx_queue_free (struct iwl_priv *priv,struct iwl_tx_queue *txq);extern int iwl_send_cmd_pdu (struct iwl_priv *priv,u8 id,u16 len,const void *data); -extern int __must_check iwl_send_cmd_async (struct iwl_priv *priv, -struct iwl_host_cmd *cmd); -extern int __must_check iwl_send_cmd_sync (struct iwl_priv *priv, -struct iwl_host_cmd *cmd);extern int __must_check iwl_send_cmd (struct iwl_priv *priv,struct iwl_host_cmd *cmd); extern unsigned int iwl_fill_beacon_frame(struct iwl_priv *priv,
@@ -628,7 +613,9 @@ extern int iwl_send_statistics_request(struct iwl_priv *priv);extern void iwl_set_decrypted_flag (struct iwl_priv *priv,struct sk_buff *skb,u32 decrypt_res,struct ieee80211_rx_status *stats); +#if IWL ==4965 extern __le16 *ieee80211_get_qos_ctrl (struct ieee80211_hdr *hdr); +#endif extern const u8 BROADCAST_ADDR [ETH_ALEN ];
@@ -666,7 +653,6 @@ extern void iwl_hw_cancel_deferred_work(struct iwl_priv *priv);extern int iwl_hw_rxq_stop (struct iwl_priv *priv);extern int iwl_hw_set_hw_setting (struct iwl_priv *priv);extern int iwl_hw_nic_init (struct iwl_priv *priv); -extern void iwl_hw_card_show_info (struct iwl_priv *priv);extern int iwl_hw_nic_stop_master (struct iwl_priv *priv);extern void iwl_hw_txq_ctx_free (struct iwl_priv *priv);extern void iwl_hw_txq_ctx_stop (struct iwl_priv *priv);
@@ -703,5 +689,7 @@ extern int iwl4965_get_temperature(const struct iwl_priv *priv);extern u8 iwl_hw_find_station (struct iwl_priv *priv,const u8 *bssid);extern int iwl_hw_channel_switch (struct iwl_priv *priv,u16 channel); +#if IWL ==4965 extern int iwl_tx_queue_reclaim (struct iwl_priv *priv,int txq_id,int index);#endif +#endif
Signature · 1 line
1.5.2
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 30/30 iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
From: Christoph Hellwig <[email protected]>
Currently the iwl3945 & iwl4965 drivers share some common Kconfig symbols. This split it up into options for the individual drivers and gets rid of all the CONFIG_IWLWIFI cruft.
--- drivers/net/wireless/Makefile | 3 +- drivers/net/wireless/iwlwifi/Kconfig | 169 +++++++++++++++---------- drivers/net/wireless/iwlwifi/iwl-3945-debug.h | 6 +- drivers/net/wireless/iwlwifi/iwl-3945-io.h | 34 +++--- drivers/net/wireless/iwlwifi/iwl-3945.c | 2 +- drivers/net/wireless/iwlwifi/iwl-3945.h | 20 ++-- drivers/net/wireless/iwlwifi/iwl-4965-debug.h | 6 +- drivers/net/wireless/iwlwifi/iwl-4965-io.h | 34 +++--- drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 38 +++--- drivers/net/wireless/iwlwifi/iwl-4965.c | 90 +++++++------- drivers/net/wireless/iwlwifi/iwl-4965.h | 60 +++++----- drivers/net/wireless/iwlwifi/iwl3945-base.c | 72 ++++++------ drivers/net/wireless/iwlwifi/iwl4965-base.c | 168 ++++++++++++------------ 13 files changed, 367 insertions(+), 335 deletions(-)
drivers/net/wireless/Makefile +2 -1
@@ -55,7 +55,8 @@ obj-$(CONFIG_RTL8187) += rtl8187.o obj-$(CONFIG_ADM8211) += adm8211.o -obj-$(CONFIG_IWLWIFI) += iwlwifi/ +obj-$(CONFIG_IWL3945) += iwlwifi/ +obj-$(CONFIG_IWL4965) += iwlwifi/ obj-$(CONFIG_RT2X00) += rt2x00/
drivers/net/wireless/iwlwifi/Kconfig +100 -69
210 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-3945-debug.h +3 -3
@@ -29,7 +29,7 @@#ifndef __iwl_debug_h__#define __iwl_debug_h__ -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG extern u32 iwl_debug_level; #define IWL_DEBUG(level, fmt, args...) \ do { if (iwl_debug_level & (level)) \
@@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)static inline void IWL_DEBUG_LIMIT (int level,const char *fmt, ...) { } -#endif /* CONFIG_IWLWIFI_DEBUG */ +#endif /* CONFIG_IWL3945_DEBUG */ /* * To use the debug system;
@@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)* you simply need to add your entry to the iwl_debug_levels array. * * If you do not see debug_level in /proc/net/iwl then you do not have -* CONFIG_IWLWIFI_DEBUG defined in your kernel configuration +* CONFIG_IWL3945_DEBUG defined in your kernel configuration * */
drivers/net/wireless/iwlwifi/iwl-3945-io.h +17 -17
@@ -60,7 +60,7 @@*/ #define _iwl_write32 (iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_write32 (const char *f,u32 l,struct iwl_priv *iwl,u32 ofs,u32 val) {
@@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,#endif #define _iwl_read32 (iwl, ofs) readl((iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read32 (char *f,u32 l,struct iwl_priv *iwl,u32 ofs) {IWL_DEBUG_IO ("read_direct32(0x%08X) - %s %d\n" , ofs, f, l);
@@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,return -ETIMEDOUT ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_poll_bit (const char *f,u32 l,struct iwl_priv *priv,u32 addr,u32 bits,u32 mask,int timeout)
@@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask) {_iwl_write32 (priv, reg,_iwl_read32 (priv, reg) | mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bit (const char *f,u32 l,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask) {_iwl_write32 (priv, reg,_iwl_read32 (priv, reg) & ~mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_clear_bit (const char *f,u32 l,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)int ret;u32 gp_ctl; -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (atomic_read (&priv->restrict_refcnt))return 0 ;#endif
@@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)return -EIO ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG atomic_inc (&priv->restrict_refcnt);#endif return 0 ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_grab_nic_access (const char *f,u32 l,struct iwl_priv *priv) {
@@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,static inline void _iwl_release_nic_access (struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (atomic_dec_and_test(&priv->restrict_refcnt))#endif _iwl_clear_bit (priv,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_release_nic_access (const char *f,u32 l,struct iwl_priv *priv) {
@@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg) {return _iwl_read32 (priv, reg); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read_direct32 (const char *f,u32 l,struct iwl_priv *priv,u32 reg) {
@@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv, {_iwl_write32 (priv, reg, value); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static void __iwl_write_direct32 (u32 line,struct iwl_priv *priv,u32 reg,u32 value) {
@@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,return -ETIMEDOUT ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline int __iwl_poll_direct_bit (const char *f,u32 l,struct iwl_priv *priv,u32 addr,u32 mask,int timeout)
@@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)_iwl_write_direct32 (priv,HBUS_TARG_PRPH_RADDR , reg | (3 <<24 ));return _iwl_read_direct32 (priv,HBUS_TARG_PRPH_RDAT ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline u32 __iwl_read_prph (u32 line,struct iwl_priv *priv,u32 reg) {if (!atomic_read (&priv->restrict_refcnt))
@@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv, ((addr & 0x0000FFFF) | (3 << 24)));_iwl_write_direct32 (priv,HBUS_TARG_PRPH_WDAT , val); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_write_prph (u32 line,struct iwl_priv *priv,u32 addr,u32 val) {
@@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,#define _iwl_set_bits_prph (priv, reg, mask) \ _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bits_prph (u32 line,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,#define _iwl_set_bits_mask_prph (priv, reg, bits, mask) \ _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG static inline void __iwl_set_bits_mask_prph (u32 line,struct iwl_priv *priv,u32 reg,u32 bits,u32 mask) {
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
@@ -369,7 +369,7 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, network_packet =iwl_is_network_packet (priv, header); -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG if (iwl_debug_level &IWL_DL_STATS &&net_ratelimit ())IWL_DEBUG_STATS ("[%c] %d RSSI: %d Signal: %u, Noise: %u, Rate: %u\n",
drivers/net/wireless/iwlwifi/iwl-3945.h +10 -10
@@ -445,7 +445,7 @@ union iwl_ht_rate_supp { }; }; -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL3945_HT #define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3)#define HT_IE_MAX_AMSDU_SIZE_4K (0)#define CFG_HT_MPDU_DENSITY_2USEC (0x5)
@@ -468,9 +468,9 @@ struct sta_ht_info {u8 tx_chan_width;u8 chan_width_cap; }; -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL3945_HT */ -#ifdef CONFIG_IWLWIFI_QOS +#ifdef CONFIG_IWL3945_QOS union iwl_qos_capabity { struct {
@@ -499,7 +499,7 @@ struct iwl_qos_info {union iwl_qos_capabity qos_cap; struct iwl_qosparam_cmd def_qos_parm; }; -#endif /*CONFIG_IWLWIFI_QOS */ +#endif /*CONFIG_IWL3945_QOS */ #define STA_PS_STATUS_WAKE 0#define STA_PS_STATUS_SLEEP 1
@@ -598,7 +598,7 @@ extern int iwl_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header);extern int iwl_power_init_handle (struct iwl_priv *priv);extern int iwl_eeprom_init (struct iwl_priv *priv); -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG extern void iwl_report_frame (struct iwl_priv *priv,struct iwl_rx_packet *pkt,struct ieee80211_hdr *header,int group100);
@@ -717,7 +717,7 @@ extern u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags); -#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT +#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT enum { MEASUREMENT_READY = (1 << 0),
@@ -745,7 +745,7 @@ struct iwl_priv {const struct ieee80211_hw_mode *modes; -#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT +#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT /* spectrum measurement report caching */ struct iwl_spectrum_notification measure_report;u8 measurement_status;
@@ -904,9 +904,9 @@ struct iwl_priv {u16 assoc_capability;u8 ps_mode; -#ifdef CONFIG_IWLWIFI_QOS +#ifdef CONFIG_IWL3945_QOS struct iwl_qos_info qos_data; -#endif /*CONFIG_IWLWIFI_QOS */ +#endif /*CONFIG_IWL3945_QOS */ struct workqueue_struct *workqueue;
@@ -941,7 +941,7 @@ struct iwl_priv {u32 pm_state[16 ];#endif -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL3945_DEBUG /* debugging info */ u32 framecnt_to_us;atomic_t restrict_refcnt;
drivers/net/wireless/iwlwifi/iwl-4965-debug.h +3 -3
@@ -29,7 +29,7 @@#ifndef __iwl_debug_h__#define __iwl_debug_h__ -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG extern u32 iwl_debug_level; #define IWL_DEBUG(level, fmt, args...) \ do { if (iwl_debug_level & (level)) \
@@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)static inline void IWL_DEBUG_LIMIT (int level,const char *fmt, ...) { } -#endif /* CONFIG_IWLWIFI_DEBUG */ +#endif /* CONFIG_IWL4965_DEBUG */ /* * To use the debug system;
@@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)* you simply need to add your entry to the iwl_debug_levels array. * * If you do not see debug_level in /proc/net/iwl then you do not have -* CONFIG_IWLWIFI_DEBUG defined in your kernel configuration +* CONFIG_IWL4965_DEBUG defined in your kernel configuration * */
drivers/net/wireless/iwlwifi/iwl-4965-io.h +17 -17
@@ -60,7 +60,7 @@*/ #define _iwl_write32 (iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_write32 (const char *f,u32 l,struct iwl_priv *iwl,u32 ofs,u32 val) {
@@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,#endif #define _iwl_read32 (iwl, ofs) readl((iwl)->hw_base + (ofs)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read32 (char *f,u32 l,struct iwl_priv *iwl,u32 ofs) {IWL_DEBUG_IO ("read_direct32(0x%08X) - %s %d\n" , ofs, f, l);
@@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,return -ETIMEDOUT ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_poll_bit (const char *f,u32 l,struct iwl_priv *priv,u32 addr,u32 bits,u32 mask,int timeout)
@@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask) {_iwl_write32 (priv, reg,_iwl_read32 (priv, reg) | mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bit (const char *f,u32 l,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask) {_iwl_write32 (priv, reg,_iwl_read32 (priv, reg) & ~mask); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_clear_bit (const char *f,u32 l,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)int ret;u32 gp_ctl; -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG if (atomic_read (&priv->restrict_refcnt))return 0 ;#endif
@@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)return -EIO ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG atomic_inc (&priv->restrict_refcnt);#endif return 0 ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_grab_nic_access (const char *f,u32 l,struct iwl_priv *priv) {
@@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,static inline void _iwl_release_nic_access (struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG if (atomic_dec_and_test(&priv->restrict_refcnt))#endif _iwl_clear_bit (priv,CSR_GP_CNTRL ,CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_release_nic_access (const char *f,u32 l,struct iwl_priv *priv) {
@@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg) {return _iwl_read32 (priv, reg); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read_direct32 (const char *f,u32 l,struct iwl_priv *priv,u32 reg) {
@@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv, {_iwl_write32 (priv, reg, value); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static void __iwl_write_direct32 (u32 line,struct iwl_priv *priv,u32 reg,u32 value) {
@@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,return -ETIMEDOUT ; } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline int __iwl_poll_direct_bit (const char *f,u32 l,struct iwl_priv *priv,u32 addr,u32 mask,int timeout)
@@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)_iwl_write_direct32 (priv,HBUS_TARG_PRPH_RADDR , reg | (3 <<24 ));return _iwl_read_direct32 (priv,HBUS_TARG_PRPH_RDAT ); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline u32 __iwl_read_prph (u32 line,struct iwl_priv *priv,u32 reg) {if (!atomic_read (&priv->restrict_refcnt))
@@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv, ((addr & 0x0000FFFF) | (3 << 24)));_iwl_write_direct32 (priv,HBUS_TARG_PRPH_WDAT , val); } -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_write_prph (u32 line,struct iwl_priv *priv,u32 addr,u32 val) {
@@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,#define _iwl_set_bits_prph (priv, reg, mask) \ _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bits_prph (u32 line,struct iwl_priv *priv,u32 reg,u32 mask) {
@@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,#define _iwl_set_bits_mask_prph (priv, reg, bits, mask) \ _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG static inline void __iwl_set_bits_mask_prph (u32 line,struct iwl_priv *priv,u32 reg,u32 bits,u32 mask) {
drivers/net/wireless/iwlwifi/iwl-4965-rs.c +19 -19
@@ -197,7 +197,7 @@ static inline u8 iwl_rate_get_rate(u32 rate_n_flags)static int rs_send_lq_cmd (struct iwl_priv *priv,struct iwl_link_quality_cmd *lq,u8 flags) { -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG int i;#endif struct iwl_host_cmd cmd = {
@@ -218,7 +218,7 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,IWL_DEBUG_RATE ("lq dta 0x%X 0x%X\n" , lq->general_params.single_stream_ant_msk, lq->general_params.dual_stream_ant_msk); -#ifdef CONFIG_IWLWIFI_DEBUG +#ifdef CONFIG_IWL4965_DEBUG for (i =0 ; i <LINK_QUAL_MAX_RETRY_NUM ; i++)IWL_DEBUG_RATE ("lq index %d 0x%X\n" , i, lq->rs_table[i].rate_n_flags);
@@ -442,13 +442,13 @@ static inline void rs_toggle_antenna(struct iwl_rate *new_rate,static inline u8 rs_use_green (struct iwl_priv *priv) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht)return 0 ;return ((priv->current_assoc_ht.is_green_field) && !(priv->current_assoc_ht.operating_mode &0x4 )); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0 ; }
@@ -826,7 +826,7 @@ static void rs_get_expected_tpt_table(struct iwl_rate_scale_priv *lq_data, tbl->expected_tpt = expected_tpt_G; } -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT static s32 rs_get_best_rate(struct iwl_priv *priv, struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl,
@@ -879,7 +879,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv, return new_rate; } -#endif /* CONFIG_IWLWIFI_HT */ +#endif /* CONFIG_IWL4965_HT */ static inline u8 rs_is_both_ant_supp (u8 valid_antenna) {
@@ -890,7 +890,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, int index) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT u16 rate_mask;s32 rate;s8 is_green = lq_data->is_green;
@@ -938,7 +938,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,IWL_DEBUG_HT ("LQ: Switch to new mcs %X index is green %X\n" , tbl->current_rate.rate_n_flags, is_green); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0 ; }
@@ -946,7 +946,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,struct iwl_rate_scale_priv *lq_data, struct iwl_scale_tbl_info *tbl, int index) { -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT u16 rate_mask;u8 is_green = lq_data->is_green;s32 rate;
@@ -992,7 +992,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,IWL_DEBUG_HT ("LQ: Switch to new mcs %X index is green %X\n" , tbl->current_rate.rate_n_flags, is_green); -#endif /*CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT */ return 0 ; }
@@ -1568,7 +1568,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, tbl1 = &(lq_data->lq_info[lq_data->active_tbl]); if (is_legacy(tbl1->lq_type) && -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT !priv->current_assoc_ht.is_ht && #endif (lq_data->action_counter >= 1)) {
@@ -1579,14 +1579,14 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,if (lq_data->enable_counter && (lq_data->action_counter >=IWL_ACTION_LIMIT )) { -#ifdef CONFIG_IWLWIFI_HT_AGG +#ifdef CONFIG_IWL4965_HT_AGG if ((lq_data->last_tpt >TID_AGG_TPT_THREHOLD ) && (priv->lq_mngr.agg_ctrl.auto_agg)) { priv->lq_mngr.agg_ctrl.tid_retry =TID_ALL_SPECIFIED ;schedule_work (&priv->agg_work); } -#endif /*CONFIG_IWLWIFI_HT_AGG */ +#endif /*CONFIG_IWL4965_HT_AGG */ lq_data->action_counter =0 ;rs_set_stay_in_table (0 , lq_data); }
@@ -1829,7 +1829,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, crl->active_rate &= ~(0x1000 ); crl->active_rate_basic = priv->active_rate_basic; crl->phymode = priv->phymode; -#ifdef CONFIG_IWLWIFI_HT +#ifdef CONFIG_IWL4965_HT crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0 ] <<1 ); crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0 ] &0x1 ); crl->active_siso_rate &= ~((u16 )0x2 );
@@ -1841,7 +1841,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, crl->active_mimo_rate = crl->active_mimo_rate <<IWL_FIRST_OFDM_RATE ;IWL_DEBUG_HT ("MIMO RATE 0x%X SISO MASK 0x%X\n" , crl->active_siso_rate, crl->active_mimo_rate); -#endif /*CONFIG_IWLWIFI_HT*/ +#endif /*CONFIG_IWL4965_HT*/ #ifdef CONFIG_MAC80211_DEBUGFS crl->drv = priv;#endif
@@ -1960,12 +1960,12 @@ static void rs_clear(void *priv_rate)IWL_DEBUG_RATE ("enter\n" ); priv->lq_mngr.lq_ready =0 ; -#ifdef CONFIG_IWLWIFI_HT -#ifdef CONFIG_IWLWIFI_HT_AGG +#ifdef CONFIG_IWL4965_HT +#ifdef CONFIG_IWL4965_HT_AGG if (priv->lq_mngr.agg_ctrl.granted_ba)iwl4965_turn_off_agg (priv,TID_ALL_SPECIFIED ); -#endif /*CONFIG_IWLWIFI_HT_AGG */ -#endif /* CONFIG_IWLWIFI_HT */ +#endif /*CONFIG_IWL4965_HT_AGG */ +#endif /* CONFIG_IWL4965_HT */ IWL_DEBUG_RATE ("leave\n" ); }
drivers/net/wireless/iwlwifi/iwl-4965.c +45 -45
262 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-4965.h +30 -30
174 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl3945-base.c +36 -36
282 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl4965-base.c +84 -84
554 lines not on this page · raw message
Signature · 1 line
1.5.2
Re: [PATCH 11/30] iwlwifi: using PCI_DEVICE macro
In reply to Zhu YiQuoted 32 lines · Zhu Yi
From: Tomas Winkler <[email protected]>
PCI_DEVICEmacro is more concise when using defualt values in device definitionsSigned-off-by Tomas Winkler <[email protected]>Signed-off-by Zhu Yi <[email protected]>--- drivers/net/wireless/iwlwifi/iwl-3945.c | 4 ++-- drivers/net/wireless/iwlwifi/iwl-4965.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/net/wireless/iwlwifi/iwl-3945.c +2
-2@@ -2278,8 +2278,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) }struct pci_device_id iwl_hw_card_ids[] = { - {0x8086 ,0x4222 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0x8086 ,0x4227 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_DEVICE (0x8086 ,0x4222 )}, + {PCI_DEVICE (0x8086 ,0x4227 )}, {0 } };drivers/net/wireless/iwlwifi/iwl-4965.c +0
-0
drivers/net/wireless/iwlwifi/iwl-4965.c void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) · line 4684
Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-4965.c +2
-2@@ -4680,8 +4680,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) }struct pci_device_id iwl_hw_card_ids[] = { - {0x8086 ,0x4229 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, - {0x8086 ,0x4230 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_DEVICE (0x8086 ,0x4229 )}, + {PCI_DEVICE (0x8086 ,0x4230 )},
FWIW I would recommend
PCI_VDEVICE(INTEL, 0x4229)
Regards,
Jeff
Re: [PATCH 11/30] iwlwifi: using PCI_DEVICE macro
Quoted 9 lines
drivers/net/wireless/iwlwifi/iwl-3945.c void iwl_hw_cancel_deferred_work(struct iwl_priv *priv) · line 2282
Quoted 5 lines
struct
pci_device_idiwl_hw_card_ids[] = {drivers/net/wireless/iwlwifi/iwl-3945.c +2
-2- {0x8086, 0x4222, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - {0x8086, 0x4227, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_DEVICE(0x8086, 0x4222)}, + {PCI_DEVICE(0x8086, 0x4227)},FWIW I would recommend
PCI_VDEVICE(INTEL, 0x4229)
I wonder why.
When I do "lspci -n" to find out the id of an unknown card, then I cannot just do
$ cd linux/drivers $ grep -rl 0x8086 .
to find (from the source), which driver claims to be for the device. Because there is this unneeded indirection via a header file ...