Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236775
b: refs/heads/master
c: 5ed540a
h: refs/heads/master
i:
  236773: d98c740
  236771: ea90b96
  236767: d89b233
v: v3
  • Loading branch information
Wey-Yi Guy committed Jan 21, 2011
1 parent 09532c0 commit d877050
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 255 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: 97d9c3a354f9eb6b8bfe4bf672bdbe9ff76956e6
refs/heads/master: 5ed540aecc2aae92d5c97b9a9306a5bf88ad5574
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,21 @@ static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
}

static unsigned int
ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
unsigned int mode, unsigned int max)
ath5k_setup_channels(struct ath5k_hw *ah,
struct ieee80211_channel *channels,
unsigned int mode,
unsigned int max)
{
unsigned int count, size, chfreq, freq, ch;
enum ieee80211_band band;

if (!test_bit(mode, ah->ah_modes))
return 0;

switch (mode) {
case AR5K_MODE_11A:
/* 1..220, but 2GHz frequencies are filtered by check_channel */
size = 220;
size = 220 ;
chfreq = CHANNEL_5GHZ;
band = IEEE80211_BAND_5GHZ;
break;
Expand Down
21 changes: 10 additions & 11 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,17 +492,6 @@ static int __ath9k_hw_init(struct ath_hw *ah)
if (ah->hw_version.devid == AR5416_AR9100_DEVID)
ah->hw_version.macVersion = AR_SREV_VERSION_9100;

ath9k_hw_read_revisions(ah);

/*
* Read back AR_WA into a permanent copy and set bits 14 and 17.
* We need to do this to avoid RMW of this register. We cannot
* read the reg when chip is asleep.
*/
ah->WARegVal = REG_READ(ah, AR_WA);
ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
AR_WA_ASPM_TIMER_BASED_DISABLE);

if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
ath_err(common, "Couldn't reset chip\n");
return -EIO;
Expand Down Expand Up @@ -571,6 +560,14 @@ static int __ath9k_hw_init(struct ath_hw *ah)

ath9k_hw_init_mode_regs(ah);

/*
* Read back AR_WA into a permanent copy and set bits 14 and 17.
* We need to do this to avoid RMW of this register. We cannot
* read the reg when chip is asleep.
*/
ah->WARegVal = REG_READ(ah, AR_WA);
ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
AR_WA_ASPM_TIMER_BASED_DISABLE);

if (ah->is_pciexpress)
ath9k_hw_configpcipowersave(ah, 0, 0);
Expand Down Expand Up @@ -1082,6 +1079,8 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
return false;
}

ath9k_hw_read_revisions(ah);

return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ config IWLWIFI
tristate "Intel Wireless Wifi"
depends on PCI && MAC80211
select FW_LOADER
select NEW_LEDS
select LEDS_CLASS
select LEDS_TRIGGERS
select MAC80211_LEDS

menu "Debugging Options"
depends on IWLWIFI
Expand Down
27 changes: 0 additions & 27 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,6 @@ static int iwl3945_send_led_cmd(struct iwl_priv *priv,
return iwl_send_cmd(priv, &cmd);
}

/* Set led on command */
static int iwl3945_led_on(struct iwl_priv *priv)
{
struct iwl_led_cmd led_cmd = {
.id = IWL_LED_LINK,
.on = IWL_LED_SOLID,
.off = 0,
.interval = IWL_DEF_LED_INTRVL
};
return iwl3945_send_led_cmd(priv, &led_cmd);
}

/* Set led off command */
static int iwl3945_led_off(struct iwl_priv *priv)
{
struct iwl_led_cmd led_cmd = {
.id = IWL_LED_LINK,
.on = 0,
.off = 0,
.interval = IWL_DEF_LED_INTRVL
};
IWL_DEBUG_LED(priv, "led off\n");
return iwl3945_send_led_cmd(priv, &led_cmd);
}

const struct iwl_led_ops iwl3945_led_ops = {
.cmd = iwl3945_send_led_cmd,
.on = iwl3945_led_on,
.off = iwl3945_led_off,
};
14 changes: 1 addition & 13 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,11 @@ static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd)
}

/* Set led register off */
static int iwl_led_on_reg(struct iwl_priv *priv)
void iwlagn_led_enable(struct iwl_priv *priv)
{
IWL_DEBUG_LED(priv, "led on\n");
iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON);
return 0;
}

/* Set led register off */
static int iwl_led_off_reg(struct iwl_priv *priv)
{
IWL_DEBUG_LED(priv, "LED Reg off\n");
iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_OFF);
return 0;
}

const struct iwl_led_ops iwlagn_led_ops = {
.cmd = iwl_send_led_cmd,
.on = iwl_led_on_reg,
.off = iwl_led_off_reg,
};
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-led.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
#define __iwl_agn_led_h__

extern const struct iwl_led_ops iwlagn_led_ops;
void iwlagn_led_enable(struct iwl_priv *priv);

#endif /* __iwl_agn_led_h__ */
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,10 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,

if (changes & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) {
iwl_led_associate(priv);
priv->timestamp = bss_conf->timestamp;
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
} else {
ctx->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
iwl_led_disassociate(priv);
}
}

Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include "iwl-sta.h"
#include "iwl-agn-calib.h"
#include "iwl-agn.h"
#include "iwl-agn-led.h"


/******************************************************************************
Expand Down Expand Up @@ -2741,8 +2742,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
/* At this point, the NIC is initialized and operational */
iwl_rf_kill_ct_config(priv);

iwl_leds_init(priv);

IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
wake_up_interruptible(&priv->wait_command_queue);

Expand Down Expand Up @@ -3234,6 +3233,8 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
&priv->bands[IEEE80211_BAND_5GHZ];

iwl_leds_init(priv);

ret = ieee80211_register_hw(priv->hw);
if (ret) {
IWL_ERR(priv, "Failed to register hw (error %d)\n", ret);
Expand Down Expand Up @@ -3278,7 +3279,7 @@ int iwlagn_mac_start(struct ieee80211_hw *hw)
}
}

iwl_led_start(priv);
iwlagn_led_enable(priv);

out:
priv->is_open = 1;
Expand Down Expand Up @@ -4288,6 +4289,9 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
* we need to set STATUS_EXIT_PENDING bit.
*/
set_bit(STATUS_EXIT_PENDING, &priv->status);

iwl_leds_exit(priv);

if (priv->mac80211_registered) {
ieee80211_unregister_hw(priv->hw);
priv->mac80211_registered = 0;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,6 @@ void iwl_clear_traffic_stats(struct iwl_priv *priv)
{
memset(&priv->tx_stats, 0, sizeof(struct traffic_stats));
memset(&priv->rx_stats, 0, sizeof(struct traffic_stats));
priv->led_tpt = 0;
}

/*
Expand Down Expand Up @@ -1769,7 +1768,6 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
stats->data_cnt++;
stats->data_bytes += len;
}
iwl_leds_background(priv);
}
EXPORT_SYMBOL(iwl_update_stats);
#endif
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ struct iwl_lib_ops {

struct iwl_led_ops {
int (*cmd)(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd);
int (*on)(struct iwl_priv *priv);
int (*off)(struct iwl_priv *priv);
};

/* NIC specific ops */
Expand Down Expand Up @@ -494,18 +492,6 @@ static inline void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv,
static inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx,
__le16 fc, u16 len)
{
struct traffic_stats *stats;

if (is_tx)
stats = &priv->tx_stats;
else
stats = &priv->rx_stats;

if (ieee80211_is_data(fc)) {
/* data */
stats->data_bytes += len;
}
iwl_leds_background(priv);
}
#endif
/*****************************************************
Expand Down
25 changes: 0 additions & 25 deletions trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,29 +668,6 @@ static ssize_t iwl_dbgfs_qos_read(struct file *file, char __user *user_buf,
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}

static ssize_t iwl_dbgfs_led_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_priv *priv = file->private_data;
int pos = 0;
char buf[256];
const size_t bufsz = sizeof(buf);

pos += scnprintf(buf + pos, bufsz - pos,
"allow blinking: %s\n",
(priv->allow_blinking) ? "True" : "False");
if (priv->allow_blinking) {
pos += scnprintf(buf + pos, bufsz - pos,
"Led blinking rate: %u\n",
priv->last_blink_rate);
pos += scnprintf(buf + pos, bufsz - pos,
"Last blink time: %lu\n",
priv->last_blink_time);
}

return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}

static ssize_t iwl_dbgfs_thermal_throttling_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
Expand Down Expand Up @@ -856,7 +833,6 @@ DEBUGFS_READ_FILE_OPS(channels);
DEBUGFS_READ_FILE_OPS(status);
DEBUGFS_READ_WRITE_FILE_OPS(interrupt);
DEBUGFS_READ_FILE_OPS(qos);
DEBUGFS_READ_FILE_OPS(led);
DEBUGFS_READ_FILE_OPS(thermal_throttling);
DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40);
DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override);
Expand Down Expand Up @@ -1725,7 +1701,6 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
DEBUGFS_ADD_FILE(status, dir_data, S_IRUSR);
DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR);
DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR);
DEBUGFS_ADD_FILE(led, dir_data, S_IRUSR);
if (!priv->cfg->base_params->broken_powersave) {
DEBUGFS_ADD_FILE(sleep_level_override, dir_data,
S_IWUSR | S_IRUSR);
Expand Down
18 changes: 7 additions & 11 deletions trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <linux/pci.h> /* for struct pci_device_id */
#include <linux/kernel.h>
#include <linux/wait.h>
#include <linux/leds.h>
#include <net/ieee80211_radiotap.h>

#include "iwl-eeprom.h"
Expand Down Expand Up @@ -996,7 +997,6 @@ struct reply_agg_tx_error_statistics {
u32 unknown;
};

#ifdef CONFIG_IWLWIFI_DEBUGFS
/* management statistics */
enum iwl_mgmt_stats {
MANAGEMENT_ASSOC_REQ = 0,
Expand Down Expand Up @@ -1027,16 +1027,13 @@ enum iwl_ctrl_stats {
};

struct traffic_stats {
#ifdef CONFIG_IWLWIFI_DEBUGFS
u32 mgmt[MANAGEMENT_MAX];
u32 ctrl[CONTROL_MAX];
u32 data_cnt;
u64 data_bytes;
};
#else
struct traffic_stats {
u64 data_bytes;
};
#endif
};

/*
* iwl_switch_rxon: "channel switch" structure
Expand Down Expand Up @@ -1338,11 +1335,6 @@ struct iwl_priv {
struct iwl_init_alive_resp card_alive_init;
struct iwl_alive_resp card_alive;

unsigned long last_blink_time;
u8 last_blink_rate;
u8 allow_blinking;
u64 led_tpt;

u16 active_rate;

u8 start_calib;
Expand Down Expand Up @@ -1580,6 +1572,10 @@ struct iwl_priv {
bool hw_ready;

struct iwl_event_log event_log;

struct led_classdev led;
unsigned long blink_on, blink_off;
bool led_registered;
}; /*iwl_priv */

static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id)
Expand Down
Loading

0 comments on commit d877050

Please sign in to comment.