Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279353
b: refs/heads/master
c: c0fad1b
h: refs/heads/master
i:
  279351: 5d67936
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Dec 20, 2011
1 parent e95880b commit 33ddcce
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 97 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: 885765f148b69b0269a50d0d89d2f20fe018fb8d
refs/heads/master: c0fad1b76e5bf631ae27d34e94b8f44a0f731036
14 changes: 6 additions & 8 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,10 +1253,9 @@ int iwl_alive_start(struct iwl_priv *priv)
iwl_send_bt_config(priv);
}

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

ieee80211_wake_queues(priv->hw);

Expand Down Expand Up @@ -1669,7 +1668,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 & IWL_DISABLE_HT_ALL)
if (iwlagn_mod_params.disable_11n)
cfg(priv)->sku &= ~EEPROM_SKU_CAP_11N_ENABLE;

hw_params(priv).num_ampdu_queues =
Expand Down Expand Up @@ -1996,9 +1995,8 @@ 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, uint, S_IRUGO);
MODULE_PARM_DESC(11n_disable,
"disable 11n functionality, bitmap: 1: full, 2: agg TX, 4: agg RX");
module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO);
MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
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: 4 additions & 12 deletions trunk/drivers/net/wireless/iwlwifi/iwl-bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,15 @@ 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_string: prints the hw_id in the provided buffer
* @get_hw_id: get hw_id in u32
* @get_hw_id: prints the hw_id in the provided buffer
* @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_string)(struct iwl_bus *bus, char buf[], int buf_len);
u32 (*get_hw_id)(struct iwl_bus *bus);
void (*get_hw_id)(struct iwl_bus *bus, char buf[], int buf_len);
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 @@ -174,15 +172,9 @@ static inline void bus_apm_config(struct iwl_bus *bus)
bus->ops->apm_config(bus);
}

static inline void bus_get_hw_id_string(struct iwl_bus *bus, char buf[],
int buf_len)
static inline void bus_get_hw_id(struct iwl_bus *bus, char buf[], int 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);
bus->ops->get_hw_id(bus, buf, buf_len);
}

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_string(bus(priv), buf, sizeof(buf));
bus_get_hw_id(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: 0 additions & 29 deletions trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,35 +90,6 @@ 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: 0 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ 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 @@ -635,8 +633,6 @@ 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 @@ -647,8 +643,6 @@ 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: 1 addition & 9 deletions 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_string(struct iwl_bus *bus, char buf[],
static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[],
int buf_len)
{
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
Expand All @@ -144,13 +144,6 @@ static void iwl_pci_get_hw_id_string(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 @@ -170,7 +163,6 @@ 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: 4 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,14 @@ 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: disable 11n capabilities, default = 0,
* use IWL_DISABLE_HT_* constants
* @disable_11n: 11n capabilities enabled, default = 0
* @amsdu_size_8K: enable 8K amsdu size, default = 1
* @antenna: both antennas (use diversity), default = 0
* @restart_fw: restart firmware, default = 1
Expand All @@ -140,7 +135,7 @@ extern struct iwl_mod_params iwlagn_mod_params;
struct iwl_mod_params {
int sw_crypto;
int num_of_queues;
unsigned int disable_11n;
int disable_11n;
int amsdu_size_8K;
int antenna;
int restart_fw;
Expand Down Expand Up @@ -179,6 +174,7 @@ 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 @@ -198,6 +194,7 @@ 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: 10 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ 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;
u32 devid;
char buf[32], *ptr = NULL;
unsigned int num, devid;

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

case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID:
devid = bus_get_hw_id(bus(priv));
IWL_INFO(priv, "hw version: 0x%x\n", devid);
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);

skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
if (!skb) {
Expand Down
32 changes: 11 additions & 21 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,8 +1281,6 @@ static irqreturn_t iwl_isr(int irq, void *data)
if (!trans)
return IRQ_NONE;

trace_iwlwifi_dev_irq(priv(trans));

trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);

spin_lock_irqsave(&trans->shrd->lock, flags);
Expand Down Expand Up @@ -1357,7 +1355,6 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
struct iwl_trans_pcie *trans_pcie;
u32 inta, inta_mask;
u32 val = 0;
u32 read;
unsigned long flags;

if (!trans)
Expand All @@ -1371,8 +1368,6 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
if (!trans_pcie->use_ict)
return iwl_isr(irq, data);

trace_iwlwifi_dev_irq(priv(trans));

spin_lock_irqsave(&trans->shrd->lock, flags);

/* Disable (but don't clear!) interrupts here to avoid
Expand All @@ -1387,29 +1382,24 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
/* Ignore interrupt if there's nothing in NIC to service.
* This may be due to IRQ shared with another device,
* or due to sporadic interrupts thrown from our NIC. */
read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]);
trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index, read);
if (!read) {
if (!trans_pcie->ict_tbl[trans_pcie->ict_index]) {
IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n");
goto none;
}

/*
* Collect all entries up to the first 0, starting from ict_index;
* note we already read at ict_index.
*/
do {
val |= read;
/* read all entries that not 0 start with ict_index */
while (trans_pcie->ict_tbl[trans_pcie->ict_index]) {

val |= le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]);
IWL_DEBUG_ISR(trans, "ICT index %d value 0x%08X\n",
trans_pcie->ict_index, read);
trans_pcie->ict_index,
le32_to_cpu(
trans_pcie->ict_tbl[trans_pcie->ict_index]));
trans_pcie->ict_tbl[trans_pcie->ict_index] = 0;
trans_pcie->ict_index =
iwl_queue_inc_wrap(trans_pcie->ict_index, ICT_COUNT);

read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]);
trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index,
read);
} while (read);
}

/* We should not get this value, just ignore it. */
if (val == 0xffffffff)
Expand All @@ -1436,7 +1426,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
if (likely(inta))
tasklet_schedule(&trans_pcie->irq_tasklet);
else if (test_bit(STATUS_INT_ENABLED, &trans->shrd->status) &&
!trans_pcie->inta) {
!trans_pcie->inta) {
/* Allow interrupt if was disabled by this handler and
* no tasklet was schedules, We should not enable interrupt,
* tasklet will enable it.
Expand All @@ -1452,7 +1442,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
* only Re-enable if disabled by irq.
*/
if (test_bit(STATUS_INT_ENABLED, &trans->shrd->status) &&
!trans_pcie->inta)
!trans_pcie->inta)
iwl_enable_interrupts(trans);

spin_unlock_irqrestore(&trans->shrd->lock, flags);
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,17 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
cancel_work_sync(&wl->recovery_work);
}

static int wl12xx_op_change_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum nl80211_iftype new_type, bool p2p)
{
wl1271_op_remove_interface(hw, vif);

vif->type = ieee80211_iftype_p2p(new_type, p2p);
vif->p2p = p2p;
return wl1271_op_add_interface(hw, vif);
}

static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
bool set_assoc)
{
Expand Down Expand Up @@ -4629,6 +4640,7 @@ static const struct ieee80211_ops wl1271_ops = {
.stop = wl1271_op_stop,
.add_interface = wl1271_op_add_interface,
.remove_interface = wl1271_op_remove_interface,
.change_interface = wl12xx_op_change_interface,
#ifdef CONFIG_PM
.suspend = wl1271_op_suspend,
.resume = wl1271_op_resume,
Expand Down

0 comments on commit 33ddcce

Please sign in to comment.