Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194246
b: refs/heads/master
c: 678b385
h: refs/heads/master
v: v3
  • Loading branch information
Wey-Yi Guy authored and Reinette Chatre committed Apr 9, 2010
1 parent e96767b commit 9c55cca
Show file tree
Hide file tree
Showing 22 changed files with 151 additions and 303 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68dd5b7a45d1935fcd32b786e8d3d3f7bb4bbfe7
refs/heads/master: 678b385d07835c6c21371c12eaaa3fba4de05168
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128,
};

struct iwl_cfg iwl1000_bg_cfg = {
Expand Down Expand Up @@ -282,6 +283,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128,
};

MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

static struct iwl_cfg iwl3945_abg_cfg = {
Expand All @@ -2789,6 +2790,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,9 +2014,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
"%d index %d\n", scd_ssn , index);
freed = iwlagn_tx_queue_reclaim(priv, txq_id, index);
if (qc)
iwl_free_tfds_in_queue(priv, sta_id,
tid, freed);
iwl_free_tfds_in_queue(priv, sta_id, tid, freed);

if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark) &&
Expand All @@ -2042,17 +2040,14 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
tx_resp->failure_frame);

freed = iwlagn_tx_queue_reclaim(priv, txq_id, index);
if (qc && likely(sta_id != IWL_INVALID_STATION))
iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
else if (sta_id == IWL_INVALID_STATION)
IWL_DEBUG_TX_REPLY(priv, "Station not known\n");
iwl_free_tfds_in_queue(priv, sta_id, tid, freed);

if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark))
iwl_wake_queue(priv, txq_id);
}
if (qc && likely(sta_id != IWL_INVALID_STATION))
iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);

iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);

if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
Expand Down Expand Up @@ -2255,6 +2250,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.monitor_recover_period = IWL_MONITORING_PERIOD,
.temperature_kelvin = true,
.off_channel_workaround = true,
.max_event_log_size = 512,
};

/* Module firmware */
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5100_bgn_cfg = {
Expand Down Expand Up @@ -450,6 +451,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5100_abg_cfg = {
Expand All @@ -475,6 +477,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5100_agn_cfg = {
Expand Down Expand Up @@ -502,6 +505,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5350_agn_cfg = {
Expand Down Expand Up @@ -529,6 +533,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5150_agn_cfg = {
Expand Down Expand Up @@ -556,6 +561,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

struct iwl_cfg iwl5150_abg_cfg = {
Expand All @@ -581,6 +587,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};

MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ struct iwl_cfg iwl6000i_g2_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6000i_2agn_cfg = {
Expand Down Expand Up @@ -427,6 +428,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6000i_2abg_cfg = {
Expand Down Expand Up @@ -459,6 +461,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6000i_2bg_cfg = {
Expand Down Expand Up @@ -491,6 +494,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6050_2agn_cfg = {
Expand Down Expand Up @@ -524,6 +528,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6050_2abg_cfg = {
Expand Down Expand Up @@ -556,6 +561,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

struct iwl_cfg iwl6000_3agn_cfg = {
Expand Down Expand Up @@ -589,6 +595,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};

MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1990,9 +1990,6 @@ static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
return pos;
}

/* For sanity check only. Actual size is determined by uCode, typ. 512 */
#define MAX_EVENT_LOG_SIZE (512)

#define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20)

int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
Expand Down Expand Up @@ -2025,16 +2022,16 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));

if (capacity > MAX_EVENT_LOG_SIZE) {
if (capacity > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n",
capacity, MAX_EVENT_LOG_SIZE);
capacity = MAX_EVENT_LOG_SIZE;
capacity, priv->cfg->max_event_log_size);
capacity = priv->cfg->max_event_log_size;
}

if (next_entry > MAX_EVENT_LOG_SIZE) {
if (next_entry > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n",
next_entry, MAX_EVENT_LOG_SIZE);
next_entry = MAX_EVENT_LOG_SIZE;
next_entry, priv->cfg->max_event_log_size);
next_entry = priv->cfg->max_event_log_size;
}

size = num_wraps ? capacity : next_entry;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ struct iwl_cfg {
u32 monitor_recover_period;
bool temperature_kelvin;
bool off_channel_workaround;
u32 max_event_log_size;
};

/***************************
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,9 +1603,6 @@ static int iwl3945_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
return pos;
}

/* For sanity check only. Actual size is determined by uCode, typ. 512 */
#define IWL3945_MAX_EVENT_LOG_SIZE (512)

#define DEFAULT_IWL3945_DUMP_EVENT_LOG_ENTRIES (20)

int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
Expand All @@ -1632,16 +1629,16 @@ int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));

if (capacity > IWL3945_MAX_EVENT_LOG_SIZE) {
if (capacity > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n",
capacity, IWL3945_MAX_EVENT_LOG_SIZE);
capacity = IWL3945_MAX_EVENT_LOG_SIZE;
capacity, priv->cfg->max_event_log_size);
capacity = priv->cfg->max_event_log_size;
}

if (next_entry > IWL3945_MAX_EVENT_LOG_SIZE) {
if (next_entry > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n",
next_entry, IWL3945_MAX_EVENT_LOG_SIZE);
next_entry = IWL3945_MAX_EVENT_LOG_SIZE;
next_entry, priv->cfg->max_event_log_size);
next_entry = priv->cfg->max_event_log_size;
}

size = num_wraps ? capacity : next_entry;
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1271.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ struct wl1271 {
#define WL1271_FLAG_PSM_REQUESTED (8)
#define WL1271_FLAG_IRQ_PENDING (9)
#define WL1271_FLAG_IRQ_RUNNING (10)
#define WL1271_FLAG_IDLE (11)
unsigned long flags;

struct wl1271_partition_set part;
Expand Down Expand Up @@ -473,9 +472,6 @@ struct wl1271 {
/* in dBm */
int power_level;

int rssi_thold;
int last_rssi_event;

struct wl1271_stats stats;
struct wl1271_debugfs debugfs;

Expand Down
71 changes: 0 additions & 71 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,6 @@ int wl1271_acx_keep_alive_mode(struct wl1271 *wl, bool enable)
kfree(acx);
return ret;
}

int wl1271_acx_keep_alive_config(struct wl1271 *wl, u8 index, u8 tpl_valid)
{
struct wl1271_acx_keep_alive_config *acx = NULL;
Expand Down Expand Up @@ -1195,73 +1194,3 @@ int wl1271_acx_keep_alive_config(struct wl1271 *wl, u8 index, u8 tpl_valid)
kfree(acx);
return ret;
}

int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, bool enable,
s16 thold, u8 hyst)
{
struct wl1271_acx_rssi_snr_trigger *acx = NULL;
int ret = 0;

wl1271_debug(DEBUG_ACX, "acx rssi snr trigger");

acx = kzalloc(sizeof(*acx), GFP_KERNEL);
if (!acx) {
ret = -ENOMEM;
goto out;
}

wl->last_rssi_event = -1;

acx->pacing = cpu_to_le16(wl->conf.roam_trigger.trigger_pacing);
acx->metric = WL1271_ACX_TRIG_METRIC_RSSI_BEACON;
acx->type = WL1271_ACX_TRIG_TYPE_EDGE;
if (enable)
acx->enable = WL1271_ACX_TRIG_ENABLE;
else
acx->enable = WL1271_ACX_TRIG_DISABLE;

acx->index = WL1271_ACX_TRIG_IDX_RSSI;
acx->dir = WL1271_ACX_TRIG_DIR_BIDIR;
acx->threshold = cpu_to_le16(thold);
acx->hysteresis = hyst;

ret = wl1271_cmd_configure(wl, ACX_RSSI_SNR_TRIGGER, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("acx rssi snr trigger setting failed: %d", ret);
goto out;
}

out:
kfree(acx);
return ret;
}

int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl)
{
struct wl1271_acx_rssi_snr_avg_weights *acx = NULL;
struct conf_roam_trigger_settings *c = &wl->conf.roam_trigger;
int ret = 0;

wl1271_debug(DEBUG_ACX, "acx rssi snr avg weights");

acx = kzalloc(sizeof(*acx), GFP_KERNEL);
if (!acx) {
ret = -ENOMEM;
goto out;
}

acx->rssi_beacon = c->avg_weight_rssi_beacon;
acx->rssi_data = c->avg_weight_rssi_data;
acx->snr_beacon = c->avg_weight_snr_beacon;
acx->snr_data = c->avg_weight_snr_data;

ret = wl1271_cmd_configure(wl, ACX_RSSI_SNR_WEIGHTS, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("acx rssi snr trigger weights failed: %d", ret);
goto out;
}

out:
kfree(acx);
return ret;
}
Loading

0 comments on commit 9c55cca

Please sign in to comment.