Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279400
b: refs/heads/master
c: dc0d633
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Jan 2, 2012
1 parent 0145788 commit 13a452f
Show file tree
Hide file tree
Showing 34 changed files with 323 additions and 317 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ae1652ef1bf38e07caa5d1d86ffd3b31103b55a
refs/heads/master: dc0d633e35643662f27a0b1c531da3cd6b204b9c
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ ath-objs := main.o \
key.o

ath-$(CONFIG_ATH_DEBUG) += debug.o
ccflags-y += -D__CHECK_ENDIAN__
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ath9k_postprocess_radar_event(struct ath_softc *sc,
u8 rssi;
u16 dur;

ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_DFS,
ath_dbg(ath9k_hw_common(sc->sc_ah), DFS,
"pulse_bw_info=0x%x, pri,ext len/rssi=(%u/%u, %u/%u)\n",
are->pulse_bw_info,
are->pulse_length_pri, are->rssi,
Expand Down Expand Up @@ -161,7 +161,7 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,

if ((!(rs->rs_phyerr != ATH9K_PHYERR_RADAR)) &&
(!(rs->rs_phyerr != ATH9K_PHYERR_FALSE_RADAR_EXT))) {
ath_dbg(common, ATH_DBG_DFS,
ath_dbg(common, DFS,
"Error: rs_phyer=0x%x not a radar error\n",
rs->rs_phyerr);
return;
Expand Down Expand Up @@ -190,7 +190,7 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
ard.pulse_length_ext = vdata_end[-2];
ard.pulse_length_pri = vdata_end[-3];

ath_dbg(common, ATH_DBG_DFS,
ath_dbg(common, DFS,
"bw_info=%d, length_pri=%d, length_ext=%d, "
"rssi_pri=%d, rssi_ext=%d\n",
ard.pulse_bw_info, ard.pulse_length_pri, ard.pulse_length_ext,
Expand All @@ -200,7 +200,7 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
drp.ts = mactime;
if (ath9k_postprocess_radar_event(sc, &ard, &drp)) {
static u64 last_ts;
ath_dbg(common, ATH_DBG_DFS,
ath_dbg(common, DFS,
"ath9k_dfs_process_phyerr: channel=%d, ts=%llu, "
"width=%d, rssi=%d, delta_ts=%llu\n",
drp.freq, drp.ts, drp.width, drp.rssi, drp.ts-last_ts);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/ath/ath9k/dfs_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/


#ifndef DFS_DEBUG_H
#define DFS_DEBUG_H
#ifndef ATH9K_DFS_DEBUG_H
#define ATH9K_DFS_DEBUG_H

#include "hw.h"

Expand Down Expand Up @@ -54,4 +54,4 @@ static inline void ath9k_dfs_init_debug(struct ath_softc *sc) { }

#endif /* CONFIG_ATH9K_DFS_DEBUGFS */

#endif /* DFS_DEBUG_H */
#endif /* ATH9K_DFS_DEBUG_H */
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,9 +1253,10 @@ int iwl_alive_start(struct iwl_priv *priv)
iwl_send_bt_config(priv);
}

if (hw_params(priv).calib_rt_cfg)
iwlagn_send_calib_cfg_rt(priv,
hw_params(priv).calib_rt_cfg);
/*
* Perform runtime calibrations, including DC calibration.
*/
iwlagn_send_calib_cfg_rt(priv, IWL_CALIB_CFG_DC_IDX);

ieee80211_wake_queues(priv->hw);

Expand Down Expand Up @@ -1668,7 +1669,7 @@ static int iwl_set_hw_params(struct iwl_priv *priv)
hw_params(priv).rx_page_order =
get_order(IWL_RX_BUF_SIZE_4K);

if (iwlagn_mod_params.disable_11n)
if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_ALL)
cfg(priv)->sku &= ~EEPROM_SKU_CAP_11N_ENABLE;

hw_params(priv).num_ampdu_queues =
Expand Down Expand Up @@ -1995,8 +1996,9 @@ module_param_named(swcrypto, iwlagn_mod_params.sw_crypto, int, S_IRUGO);
MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO);
MODULE_PARM_DESC(queues_num, "number of hw queues.");
module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO);
MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
module_param_named(11n_disable, iwlagn_mod_params.disable_11n, uint, S_IRUGO);
MODULE_PARM_DESC(11n_disable,
"disable 11n functionality, bitmap: 1: full, 2: agg TX, 4: agg RX");
module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K,
int, S_IRUGO);
MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size");
Expand Down
16 changes: 12 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,17 @@ struct iwl_bus;
* struct iwl_bus_ops - bus specific operations
* @get_pm_support: must returns true if the bus can go to sleep
* @apm_config: will be called during the config of the APM
* @get_hw_id: prints the hw_id in the provided buffer
* @get_hw_id_string: prints the hw_id in the provided buffer
* @get_hw_id: get hw_id in u32
* @write8: write a byte to register at offset ofs
* @write32: write a dword to register at offset ofs
* @wread32: read a dword at register at offset ofs
*/
struct iwl_bus_ops {
bool (*get_pm_support)(struct iwl_bus *bus);
void (*apm_config)(struct iwl_bus *bus);
void (*get_hw_id)(struct iwl_bus *bus, char buf[], int buf_len);
void (*get_hw_id_string)(struct iwl_bus *bus, char buf[], int buf_len);
u32 (*get_hw_id)(struct iwl_bus *bus);
void (*write8)(struct iwl_bus *bus, u32 ofs, u8 val);
void (*write32)(struct iwl_bus *bus, u32 ofs, u32 val);
u32 (*read32)(struct iwl_bus *bus, u32 ofs);
Expand Down Expand Up @@ -172,9 +174,15 @@ static inline void bus_apm_config(struct iwl_bus *bus)
bus->ops->apm_config(bus);
}

static inline void bus_get_hw_id(struct iwl_bus *bus, char buf[], int buf_len)
static inline void bus_get_hw_id_string(struct iwl_bus *bus, char buf[],
int buf_len)
{
bus->ops->get_hw_id(bus, buf, buf_len);
bus->ops->get_hw_id_string(bus, buf, buf_len);
}

static inline u32 bus_get_hw_id(struct iwl_bus *bus)
{
return bus->ops->get_hw_id(bus);
}

static inline void bus_write8(struct iwl_bus *bus, u32 ofs, u8 val)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int iwl_init_geos(struct iwl_priv *priv)
if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
cfg(priv)->sku & EEPROM_SKU_CAP_BAND_52GHZ) {
char buf[32];
bus_get_hw_id(bus(priv), buf, sizeof(buf));
bus_get_hw_id_string(bus(priv), buf, sizeof(buf));
IWL_INFO(priv, "Incorrectly detected BG card as ABG. "
"Please send your %s to maintainer.\n", buf);
cfg(priv)->sku &= ~EEPROM_SKU_CAP_BAND_52GHZ;
Expand Down
29 changes: 29 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,35 @@ TRACE_EVENT(iwlwifi_dev_iowrite32,
TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val)
);

TRACE_EVENT(iwlwifi_dev_irq,
TP_PROTO(void *priv),
TP_ARGS(priv),
TP_STRUCT__entry(
PRIV_ENTRY
),
TP_fast_assign(
PRIV_ASSIGN;
),
/* TP_printk("") doesn't compile */
TP_printk("%d", 0)
);

TRACE_EVENT(iwlwifi_dev_ict_read,
TP_PROTO(void *priv, u32 index, u32 value),
TP_ARGS(priv, index, value),
TP_STRUCT__entry(
PRIV_ENTRY
__field(u32, index)
__field(u32, value)
),
TP_fast_assign(
PRIV_ASSIGN;
__entry->index = index;
__entry->value = value;
),
TP_printk("read ict[%d] = %#.8x", __entry->index, __entry->value)
);

#undef TRACE_SYSTEM
#define TRACE_SYSTEM iwlwifi_ucode

Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
&priv->bands[IEEE80211_BAND_5GHZ];

hw->wiphy->hw_version = bus_get_hw_id(bus(priv));

iwl_leds_init(priv);

ret = ieee80211_register_hw(priv->hw);
Expand Down Expand Up @@ -633,6 +635,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,

switch (action) {
case IEEE80211_AMPDU_RX_START:
if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_RXAGG)
break;
IWL_DEBUG_HT(priv, "start Rx\n");
ret = iwl_sta_rx_agg_start(priv, sta, tid, *ssn);
break;
Expand All @@ -643,6 +647,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
ret = 0;
break;
case IEEE80211_AMPDU_TX_START:
if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_TXAGG)
break;
IWL_DEBUG_HT(priv, "start Tx\n");
ret = iwlagn_tx_agg_start(priv, vif, sta, tid, ssn);
break;
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static void iwl_pci_apm_config(struct iwl_bus *bus)
}
}

static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[],
static void iwl_pci_get_hw_id_string(struct iwl_bus *bus, char buf[],
int buf_len)
{
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
Expand All @@ -144,6 +144,13 @@ static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[],
pci_dev->subsystem_device);
}

static u32 iwl_pci_get_hw_id(struct iwl_bus *bus)
{
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);

return (pci_dev->device << 16) + pci_dev->subsystem_device;
}

static void iwl_pci_write8(struct iwl_bus *bus, u32 ofs, u8 val)
{
iowrite8(val, IWL_BUS_GET_PCI_BUS(bus)->hw_base + ofs);
Expand All @@ -163,6 +170,7 @@ static u32 iwl_pci_read32(struct iwl_bus *bus, u32 ofs)
static const struct iwl_bus_ops bus_ops_pci = {
.get_pm_support = iwl_pci_is_pm_supported,
.apm_config = iwl_pci_apm_config,
.get_hw_id_string = iwl_pci_get_hw_id_string,
.get_hw_id = iwl_pci_get_hw_id,
.write8 = iwl_pci_write8,
.write32 = iwl_pci_write32,
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,19 @@ struct iwl_trans_ops;

extern struct iwl_mod_params iwlagn_mod_params;

#define IWL_DISABLE_HT_ALL BIT(0)
#define IWL_DISABLE_HT_TXAGG BIT(1)
#define IWL_DISABLE_HT_RXAGG BIT(2)

/**
* struct iwl_mod_params
*
* Holds the module parameters
*
* @sw_crypto: using hardware encryption, default = 0
* @num_of_queues: number of tx queue, HW dependent
* @disable_11n: 11n capabilities enabled, default = 0
* @disable_11n: disable 11n capabilities, default = 0,
* use IWL_DISABLE_HT_* constants
* @amsdu_size_8K: enable 8K amsdu size, default = 1
* @antenna: both antennas (use diversity), default = 0
* @restart_fw: restart firmware, default = 1
Expand All @@ -135,7 +140,7 @@ extern struct iwl_mod_params iwlagn_mod_params;
struct iwl_mod_params {
int sw_crypto;
int num_of_queues;
int disable_11n;
unsigned int disable_11n;
int amsdu_size_8K;
int antenna;
int restart_fw;
Expand Down Expand Up @@ -174,7 +179,6 @@ struct iwl_mod_params {
* @ct_kill_exit_threshold: when to reeable the device - in hw dependent unit
* relevant for 1000, 6000 and up
* @wd_timeout: TX queues watchdog timeout
* @calib_rt_cfg: setup runtime calibrations for the hw
* @struct iwl_sensitivity_ranges: range of sensitivity values
*/
struct iwl_hw_params {
Expand All @@ -194,7 +198,6 @@ struct iwl_hw_params {
u32 ct_kill_exit_threshold;
unsigned int wd_timeout;

u32 calib_rt_cfg;
const struct iwl_sensitivity_ranges *sens;
};

Expand Down
13 changes: 3 additions & 10 deletions trunk/drivers/net/wireless/iwlwifi/iwl-testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
struct sk_buff *skb;
unsigned char *rsp_data_ptr = NULL;
int status = 0, rsp_data_len = 0;
char buf[32], *ptr = NULL;
unsigned int num, devid;
u32 devid;

switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
case IWL_TM_CMD_APP2DEV_GET_DEVICENAME:
Expand Down Expand Up @@ -534,14 +533,8 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
break;

case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID:
bus_get_hw_id(bus(priv), buf, sizeof(buf));
ptr = buf;
strsep(&ptr, ":");
sscanf(strsep(&ptr, ":"), "%x", &num);
sscanf(strsep(&ptr, ":"), "%x", &devid);
IWL_INFO(priv, "Device ID = 0x%04x, SubDevice ID= 0x%04x\n",
num, devid);
devid |= (num << 16);
devid = bus_get_hw_id(bus(priv));
IWL_INFO(priv, "hw version: 0x%x\n", devid);

skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
if (!skb) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ struct iwl_trans_pcie {

/* INT ICT Table */
__le32 *ict_tbl;
void *ict_tbl_vir;
dma_addr_t ict_tbl_dma;
dma_addr_t aligned_ict_tbl_dma;
int ict_index;
u32 inta;
bool use_ict;
Expand Down
Loading

0 comments on commit 13a452f

Please sign in to comment.