iwlegacy: remove for_each_context
We do not support many contexts. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
This commit is contained in:
@@ -615,16 +615,7 @@ static int il4965_update_bcast_station(struct il_priv *il,
|
|||||||
|
|
||||||
int il4965_update_bcast_stations(struct il_priv *il)
|
int il4965_update_bcast_stations(struct il_priv *il)
|
||||||
{
|
{
|
||||||
struct il_rxon_context *ctx;
|
return il4965_update_bcast_station(il, &il->ctx);
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
|
||||||
ret = il4965_update_bcast_station(il, ctx);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -646,10 +646,7 @@ static void _il_set_rxon_ht(struct il_priv *il,
|
|||||||
|
|
||||||
void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
|
void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
|
||||||
{
|
{
|
||||||
struct il_rxon_context *ctx;
|
_il_set_rxon_ht(il, ht_conf, &il->ctx);
|
||||||
|
|
||||||
for_each_context(il, ctx)
|
|
||||||
_il_set_rxon_ht(il, ht_conf, ctx);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(il_set_rxon_ht);
|
EXPORT_SYMBOL(il_set_rxon_ht);
|
||||||
|
|
||||||
@@ -661,7 +658,6 @@ u8 il_get_single_channel_number(struct il_priv *il,
|
|||||||
int i;
|
int i;
|
||||||
u8 channel = 0;
|
u8 channel = 0;
|
||||||
u8 min, max;
|
u8 min, max;
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
|
|
||||||
if (band == IEEE80211_BAND_5GHZ) {
|
if (band == IEEE80211_BAND_5GHZ) {
|
||||||
min = 14;
|
min = 14;
|
||||||
@@ -672,19 +668,10 @@ u8 il_get_single_channel_number(struct il_priv *il,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = min; i < max; i++) {
|
for (i = min; i < max; i++) {
|
||||||
bool busy = false;
|
channel = il->channel_info[i].channel;
|
||||||
|
if (channel == le16_to_cpu(il->ctx.staging.channel))
|
||||||
for_each_context(il, ctx) {
|
|
||||||
busy = il->channel_info[i].channel ==
|
|
||||||
le16_to_cpu(ctx->staging.channel);
|
|
||||||
if (busy)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (busy)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
channel = il->channel_info[i].channel;
|
|
||||||
ch_info = il_get_channel_info(il, band, channel);
|
ch_info = il_get_channel_info(il, band, channel);
|
||||||
if (il_is_channel_valid(ch_info))
|
if (il_is_channel_valid(ch_info))
|
||||||
break;
|
break;
|
||||||
@@ -822,7 +809,6 @@ void il_set_rate(struct il_priv *il)
|
|||||||
{
|
{
|
||||||
const struct ieee80211_supported_band *hw = NULL;
|
const struct ieee80211_supported_band *hw = NULL;
|
||||||
struct ieee80211_rate *rate;
|
struct ieee80211_rate *rate;
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
hw = il_get_hw_mode(il, il->band);
|
hw = il_get_hw_mode(il, il->band);
|
||||||
@@ -841,13 +827,11 @@ void il_set_rate(struct il_priv *il)
|
|||||||
|
|
||||||
D_RATE("Set active_rate = %0x\n", il->active_rate);
|
D_RATE("Set active_rate = %0x\n", il->active_rate);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
il->ctx.staging.cck_basic_rates =
|
||||||
ctx->staging.cck_basic_rates =
|
|
||||||
(IL_CCK_BASIC_RATES_MASK >> IL_FIRST_CCK_RATE) & 0xF;
|
(IL_CCK_BASIC_RATES_MASK >> IL_FIRST_CCK_RATE) & 0xF;
|
||||||
|
|
||||||
ctx->staging.ofdm_basic_rates =
|
il->ctx.staging.ofdm_basic_rates =
|
||||||
(IL_OFDM_BASIC_RATES_MASK >> IL_FIRST_OFDM_RATE) & 0xFF;
|
(IL_OFDM_BASIC_RATES_MASK >> IL_FIRST_OFDM_RATE) & 0xFF;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(il_set_rate);
|
EXPORT_SYMBOL(il_set_rate);
|
||||||
|
|
||||||
@@ -1254,7 +1238,6 @@ int il_mac_conf_tx(struct ieee80211_hw *hw,
|
|||||||
const struct ieee80211_tx_queue_params *params)
|
const struct ieee80211_tx_queue_params *params)
|
||||||
{
|
{
|
||||||
struct il_priv *il = hw->priv;
|
struct il_priv *il = hw->priv;
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int q;
|
int q;
|
||||||
|
|
||||||
@@ -1274,17 +1257,15 @@ int il_mac_conf_tx(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
spin_lock_irqsave(&il->lock, flags);
|
spin_lock_irqsave(&il->lock, flags);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
il->ctx.qos_data.def_qos_parm.ac[q].cw_min =
|
||||||
ctx->qos_data.def_qos_parm.ac[q].cw_min =
|
|
||||||
cpu_to_le16(params->cw_min);
|
cpu_to_le16(params->cw_min);
|
||||||
ctx->qos_data.def_qos_parm.ac[q].cw_max =
|
il->ctx.qos_data.def_qos_parm.ac[q].cw_max =
|
||||||
cpu_to_le16(params->cw_max);
|
cpu_to_le16(params->cw_max);
|
||||||
ctx->qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
|
il->ctx.qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
|
||||||
ctx->qos_data.def_qos_parm.ac[q].edca_txop =
|
il->ctx.qos_data.def_qos_parm.ac[q].edca_txop =
|
||||||
cpu_to_le16((params->txop * 32));
|
cpu_to_le16((params->txop * 32));
|
||||||
|
|
||||||
ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0;
|
il->ctx.qos_data.def_qos_parm.ac[q].reserved1 = 0;
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&il->lock, flags);
|
spin_unlock_irqrestore(&il->lock, flags);
|
||||||
|
|
||||||
@@ -1344,8 +1325,8 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
|||||||
{
|
{
|
||||||
struct il_priv *il = hw->priv;
|
struct il_priv *il = hw->priv;
|
||||||
struct il_vif_priv *vif_priv = (void *)vif->drv_priv;
|
struct il_vif_priv *vif_priv = (void *)vif->drv_priv;
|
||||||
struct il_rxon_context *tmp, *ctx = NULL;
|
|
||||||
int err;
|
int err;
|
||||||
|
u32 modes;
|
||||||
|
|
||||||
D_MAC80211("enter: type %d, addr %pM\n",
|
D_MAC80211("enter: type %d, addr %pM\n",
|
||||||
vif->type, vif->addr);
|
vif->type, vif->addr);
|
||||||
@@ -1358,42 +1339,29 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
for_each_context(il, tmp) {
|
|
||||||
u32 possible_modes =
|
|
||||||
tmp->interface_modes | tmp->exclusive_interface_modes;
|
|
||||||
|
|
||||||
if (tmp->vif) {
|
/* check if busy context is exclusive */
|
||||||
/* check if this busy context is exclusive */
|
if (il->ctx.vif &&
|
||||||
if (tmp->exclusive_interface_modes &
|
(il->ctx.exclusive_interface_modes & BIT(il->ctx.vif->type))) {
|
||||||
BIT(tmp->vif->type)) {
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(possible_modes & BIT(vif->type)))
|
modes = il->ctx.interface_modes | il->ctx.exclusive_interface_modes;
|
||||||
continue;
|
if (!(modes & BIT(vif->type))) {
|
||||||
|
|
||||||
/* have maybe usable context w/o interface */
|
|
||||||
ctx = tmp;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ctx) {
|
|
||||||
err = -EOPNOTSUPP;
|
err = -EOPNOTSUPP;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
vif_priv->ctx = ctx;
|
vif_priv->ctx = &il->ctx;
|
||||||
ctx->vif = vif;
|
il->ctx.vif = vif;
|
||||||
|
|
||||||
err = il_setup_interface(il, ctx);
|
err = il_setup_interface(il, &il->ctx);
|
||||||
if (!err)
|
if (err) {
|
||||||
goto out;
|
il->ctx.vif = NULL;
|
||||||
|
|
||||||
ctx->vif = NULL;
|
|
||||||
il->iw_mode = NL80211_IFTYPE_STATION;
|
il->iw_mode = NL80211_IFTYPE_STATION;
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&il->mutex);
|
mutex_unlock(&il->mutex);
|
||||||
|
|
||||||
@@ -1764,8 +1732,7 @@ il_mac_change_interface(struct ieee80211_hw *hw,
|
|||||||
{
|
{
|
||||||
struct il_priv *il = hw->priv;
|
struct il_priv *il = hw->priv;
|
||||||
struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif);
|
struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif);
|
||||||
struct il_rxon_context *tmp;
|
u32 modes;
|
||||||
u32 interface_modes;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
newtype = ieee80211_iftype_p2p(newtype, newp2p);
|
newtype = ieee80211_iftype_p2p(newtype, newp2p);
|
||||||
@@ -1781,29 +1748,17 @@ il_mac_change_interface(struct ieee80211_hw *hw,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
|
modes = ctx->interface_modes | ctx->exclusive_interface_modes;
|
||||||
|
if (!(modes & BIT(newtype))) {
|
||||||
if (!(interface_modes & BIT(newtype))) {
|
err = -EOPNOTSUPP;
|
||||||
err = -EBUSY;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->exclusive_interface_modes & BIT(newtype)) {
|
if ((il->ctx.exclusive_interface_modes & BIT(il->ctx.vif->type)) ||
|
||||||
for_each_context(il, tmp) {
|
(il->ctx.exclusive_interface_modes & BIT(newtype))) {
|
||||||
if (ctx == tmp)
|
err = -EINVAL;
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!tmp->vif)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The current mode switch would be exclusive, but
|
|
||||||
* another context is active ... refuse the switch.
|
|
||||||
*/
|
|
||||||
err = -EBUSY;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* success */
|
/* success */
|
||||||
il_teardown_interface(il, vif, true);
|
il_teardown_interface(il, vif, true);
|
||||||
@@ -2064,7 +2019,7 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|||||||
struct ieee80211_conf *conf = &hw->conf;
|
struct ieee80211_conf *conf = &hw->conf;
|
||||||
struct ieee80211_channel *channel = conf->channel;
|
struct ieee80211_channel *channel = conf->channel;
|
||||||
struct il_ht_config *ht_conf = &il->current_ht_config;
|
struct il_ht_config *ht_conf = &il->current_ht_config;
|
||||||
struct il_rxon_context *ctx;
|
struct il_rxon_context *ctx = &il->ctx;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u16 ch;
|
u16 ch;
|
||||||
@@ -2097,14 +2052,14 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|||||||
* configured.
|
* configured.
|
||||||
*/
|
*/
|
||||||
if (il->cfg->ops->hcmd->set_rxon_chain)
|
if (il->cfg->ops->hcmd->set_rxon_chain)
|
||||||
for_each_context(il, ctx)
|
il->cfg->ops->hcmd->set_rxon_chain(il, &il->ctx);
|
||||||
il->cfg->ops->hcmd->set_rxon_chain(il, ctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* during scanning mac80211 will delay channel setting until
|
/* during scanning mac80211 will delay channel setting until
|
||||||
* scan finish with changed = 0
|
* scan finish with changed = 0
|
||||||
*/
|
*/
|
||||||
if (!changed || (changed & IEEE80211_CONF_CHANGE_CHANNEL)) {
|
if (!changed || (changed & IEEE80211_CONF_CHANGE_CHANNEL)) {
|
||||||
|
|
||||||
if (scan_active)
|
if (scan_active)
|
||||||
goto set_ch_out;
|
goto set_ch_out;
|
||||||
|
|
||||||
@@ -2125,7 +2080,6 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|||||||
|
|
||||||
spin_lock_irqsave(&il->lock, flags);
|
spin_lock_irqsave(&il->lock, flags);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
|
||||||
/* Configure HT40 channels */
|
/* Configure HT40 channels */
|
||||||
if (ctx->ht.enabled != conf_is_ht(conf)) {
|
if (ctx->ht.enabled != conf_is_ht(conf)) {
|
||||||
ctx->ht.enabled = conf_is_ht(conf);
|
ctx->ht.enabled = conf_is_ht(conf);
|
||||||
@@ -2166,7 +2120,6 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|||||||
|
|
||||||
il_set_flags_for_band(il, ctx, channel->band,
|
il_set_flags_for_band(il, ctx, channel->band,
|
||||||
ctx->vif);
|
ctx->vif);
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&il->lock, flags);
|
spin_unlock_irqrestore(&il->lock, flags);
|
||||||
|
|
||||||
@@ -2203,15 +2156,12 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
|
|||||||
if (scan_active)
|
if (scan_active)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
|
||||||
if (memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging)))
|
if (memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging)))
|
||||||
il_commit_rxon(il, ctx);
|
il_commit_rxon(il, ctx);
|
||||||
else
|
else
|
||||||
D_INFO(
|
D_INFO("Not re-sending same RXON configuration.\n");
|
||||||
"Not re-sending same RXON configuration.\n");
|
|
||||||
if (ht_changed)
|
if (ht_changed)
|
||||||
il_update_qos(il, ctx);
|
il_update_qos(il, ctx);
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
D_MAC80211("leave\n");
|
D_MAC80211("leave\n");
|
||||||
|
@@ -599,12 +599,11 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf,
|
|||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
struct il_priv *il = file->private_data;
|
struct il_priv *il = file->private_data;
|
||||||
struct il_rxon_context *ctx;
|
struct il_rxon_context *ctx = &il->ctx;
|
||||||
int pos = 0, i;
|
int pos = 0, i;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
const size_t bufsz = sizeof(buf);
|
const size_t bufsz = sizeof(buf);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
|
||||||
pos += scnprintf(buf + pos, bufsz - pos, "context %d:\n",
|
pos += scnprintf(buf + pos, bufsz - pos, "context %d:\n",
|
||||||
ctx->ctxid);
|
ctx->ctxid);
|
||||||
for (i = 0; i < AC_NUM; i++) {
|
for (i = 0; i < AC_NUM; i++) {
|
||||||
@@ -617,8 +616,7 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf,
|
|||||||
ctx->qos_data.def_qos_parm.ac[i].aifsn,
|
ctx->qos_data.def_qos_parm.ac[i].aifsn,
|
||||||
ctx->qos_data.def_qos_parm.ac[i].edca_txop);
|
ctx->qos_data.def_qos_parm.ac[i].edca_txop);
|
||||||
}
|
}
|
||||||
pos += scnprintf(buf + pos, bufsz - pos, "\n");
|
|
||||||
}
|
|
||||||
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -290,7 +290,9 @@ u16 il_get_passive_dwell_time(struct il_priv *il,
|
|||||||
enum ieee80211_band band,
|
enum ieee80211_band band,
|
||||||
struct ieee80211_vif *vif)
|
struct ieee80211_vif *vif)
|
||||||
{
|
{
|
||||||
struct il_rxon_context *ctx;
|
struct il_rxon_context *ctx = &il->ctx;
|
||||||
|
u16 value;
|
||||||
|
|
||||||
u16 passive = (band == IEEE80211_BAND_2GHZ) ?
|
u16 passive = (band == IEEE80211_BAND_2GHZ) ?
|
||||||
IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_24 :
|
IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_24 :
|
||||||
IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_52;
|
IL_PASSIVE_DWELL_BASE + IL_PASSIVE_DWELL_TIME_52;
|
||||||
@@ -301,18 +303,12 @@ u16 il_get_passive_dwell_time(struct il_priv *il,
|
|||||||
* dwell time to be 98% of the smallest beacon interval
|
* dwell time to be 98% of the smallest beacon interval
|
||||||
* (minus 2 * channel tune time)
|
* (minus 2 * channel tune time)
|
||||||
*/
|
*/
|
||||||
for_each_context(il, ctx) {
|
|
||||||
u16 value;
|
|
||||||
|
|
||||||
if (!il_is_associated_ctx(ctx))
|
|
||||||
continue;
|
|
||||||
value = ctx->vif ? ctx->vif->bss_conf.beacon_int : 0;
|
value = ctx->vif ? ctx->vif->bss_conf.beacon_int : 0;
|
||||||
if (value > IL_PASSIVE_DWELL_BASE || !value)
|
if (value > IL_PASSIVE_DWELL_BASE || !value)
|
||||||
value = IL_PASSIVE_DWELL_BASE;
|
value = IL_PASSIVE_DWELL_BASE;
|
||||||
value = (value * 98) / 100 - IL_CHANNEL_TUNE_TIME * 2;
|
value = (value * 98) / 100 - IL_CHANNEL_TUNE_TIME * 2;
|
||||||
passive = min(value, passive);
|
passive = min(value, passive);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return passive;
|
return passive;
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,7 @@ int il_send_lq_cmd(struct il_priv *il,
|
|||||||
static inline void il_clear_driver_stations(struct il_priv *il)
|
static inline void il_clear_driver_stations(struct il_priv *il)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct il_rxon_context *ctx;
|
struct il_rxon_context *ctx = &il->ctx;
|
||||||
|
|
||||||
spin_lock_irqsave(&il->sta_lock, flags);
|
spin_lock_irqsave(&il->sta_lock, flags);
|
||||||
memset(il->stations, 0, sizeof(il->stations));
|
memset(il->stations, 0, sizeof(il->stations));
|
||||||
@@ -92,7 +92,6 @@ static inline void il_clear_driver_stations(struct il_priv *il)
|
|||||||
|
|
||||||
il->ucode_key_table = 0;
|
il->ucode_key_table = 0;
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
|
||||||
/*
|
/*
|
||||||
* Remove all key information that is not stored as part
|
* Remove all key information that is not stored as part
|
||||||
* of station information since mac80211 may not have had
|
* of station information since mac80211 may not have had
|
||||||
@@ -102,7 +101,6 @@ static inline void il_clear_driver_stations(struct il_priv *il)
|
|||||||
*/
|
*/
|
||||||
memset(ctx->wep_keys, 0, sizeof(ctx->wep_keys));
|
memset(ctx->wep_keys, 0, sizeof(ctx->wep_keys));
|
||||||
ctx->key_mapping_keys = 0;
|
ctx->key_mapping_keys = 0;
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&il->sta_lock, flags);
|
spin_unlock_irqrestore(&il->sta_lock, flags);
|
||||||
}
|
}
|
||||||
|
@@ -2710,10 +2710,8 @@ static void il3945_bg_restart(struct work_struct *data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) {
|
if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) {
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
mutex_lock(&il->mutex);
|
mutex_lock(&il->mutex);
|
||||||
for_each_context(il, ctx)
|
il->ctx.vif = NULL;
|
||||||
ctx->vif = NULL;
|
|
||||||
il->is_open = 0;
|
il->is_open = 0;
|
||||||
mutex_unlock(&il->mutex);
|
mutex_unlock(&il->mutex);
|
||||||
il3945_down(il);
|
il3945_down(il);
|
||||||
|
@@ -89,14 +89,10 @@ MODULE_ALIAS("iwl4965");
|
|||||||
|
|
||||||
void il4965_update_chain_flags(struct il_priv *il)
|
void il4965_update_chain_flags(struct il_priv *il)
|
||||||
{
|
{
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
|
|
||||||
if (il->cfg->ops->hcmd->set_rxon_chain) {
|
if (il->cfg->ops->hcmd->set_rxon_chain) {
|
||||||
for_each_context(il, ctx) {
|
il->cfg->ops->hcmd->set_rxon_chain(il, &il->ctx);
|
||||||
il->cfg->ops->hcmd->set_rxon_chain(il, ctx);
|
if (il->ctx.active.rx_chain != il->ctx.staging.rx_chain)
|
||||||
if (ctx->active.rx_chain != ctx->staging.rx_chain)
|
il_commit_rxon(il, &il->ctx);
|
||||||
il_commit_rxon(il, ctx);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1766,10 +1762,8 @@ static void il4965_alive_start(struct il_priv *il)
|
|||||||
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
||||||
active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
|
active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
|
||||||
} else {
|
} else {
|
||||||
struct il_rxon_context *tmp;
|
|
||||||
/* Initialize our rx_config data */
|
/* Initialize our rx_config data */
|
||||||
for_each_context(il, tmp)
|
il_connection_init_rx_config(il, &il->ctx);
|
||||||
il_connection_init_rx_config(il, tmp);
|
|
||||||
|
|
||||||
if (il->cfg->ops->hcmd->set_rxon_chain)
|
if (il->cfg->ops->hcmd->set_rxon_chain)
|
||||||
il->cfg->ops->hcmd->set_rxon_chain(il, ctx);
|
il->cfg->ops->hcmd->set_rxon_chain(il, ctx);
|
||||||
@@ -1950,7 +1944,6 @@ static int il4965_prepare_card_hw(struct il_priv *il)
|
|||||||
|
|
||||||
static int __il4965_up(struct il_priv *il)
|
static int __il4965_up(struct il_priv *il)
|
||||||
{
|
{
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
int i;
|
int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -1964,13 +1957,11 @@ static int __il4965_up(struct il_priv *il)
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
ret = il4965_alloc_bcast_station(il, &il->ctx);
|
||||||
ret = il4965_alloc_bcast_station(il, ctx);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
il_dealloc_bcast_stations(il);
|
il_dealloc_bcast_stations(il);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
il4965_prepare_card_hw(il);
|
il4965_prepare_card_hw(il);
|
||||||
|
|
||||||
@@ -2121,11 +2112,8 @@ static void il4965_bg_restart(struct work_struct *data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) {
|
if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) {
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
|
|
||||||
mutex_lock(&il->mutex);
|
mutex_lock(&il->mutex);
|
||||||
for_each_context(il, ctx)
|
il->ctx.vif = NULL;
|
||||||
ctx->vif = NULL;
|
|
||||||
il->is_open = 0;
|
il->is_open = 0;
|
||||||
|
|
||||||
__il4965_down(il);
|
__il4965_down(il);
|
||||||
@@ -2177,7 +2165,6 @@ static int il4965_mac_setup_register(struct il_priv *il,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct ieee80211_hw *hw = il->hw;
|
struct ieee80211_hw *hw = il->hw;
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
|
|
||||||
hw->rate_control_algorithm = "iwl-4965-rs";
|
hw->rate_control_algorithm = "iwl-4965-rs";
|
||||||
|
|
||||||
@@ -2195,10 +2182,8 @@ static int il4965_mac_setup_register(struct il_priv *il,
|
|||||||
hw->sta_data_size = sizeof(struct il_station_priv);
|
hw->sta_data_size = sizeof(struct il_station_priv);
|
||||||
hw->vif_data_size = sizeof(struct il_vif_priv);
|
hw->vif_data_size = sizeof(struct il_vif_priv);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
hw->wiphy->interface_modes |= il->ctx.interface_modes;
|
||||||
hw->wiphy->interface_modes |= ctx->interface_modes;
|
hw->wiphy->interface_modes |= il->ctx.exclusive_interface_modes;
|
||||||
hw->wiphy->interface_modes |= ctx->exclusive_interface_modes;
|
|
||||||
}
|
|
||||||
|
|
||||||
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
|
hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
|
||||||
WIPHY_FLAG_DISABLE_BEACON_HINTS;
|
WIPHY_FLAG_DISABLE_BEACON_HINTS;
|
||||||
@@ -2590,7 +2575,6 @@ void il4965_configure_filter(struct ieee80211_hw *hw,
|
|||||||
{
|
{
|
||||||
struct il_priv *il = hw->priv;
|
struct il_priv *il = hw->priv;
|
||||||
__le32 filter_or = 0, filter_nand = 0;
|
__le32 filter_or = 0, filter_nand = 0;
|
||||||
struct il_rxon_context *ctx;
|
|
||||||
|
|
||||||
#define CHK(test, flag) do { \
|
#define CHK(test, flag) do { \
|
||||||
if (*total_flags & (test)) \
|
if (*total_flags & (test)) \
|
||||||
@@ -2611,15 +2595,13 @@ void il4965_configure_filter(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
mutex_lock(&il->mutex);
|
mutex_lock(&il->mutex);
|
||||||
|
|
||||||
for_each_context(il, ctx) {
|
il->ctx.staging.filter_flags &= ~filter_nand;
|
||||||
ctx->staging.filter_flags &= ~filter_nand;
|
il->ctx.staging.filter_flags |= filter_or;
|
||||||
ctx->staging.filter_flags |= filter_or;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Not committing directly because hardware can perform a scan,
|
* Not committing directly because hardware can perform a scan,
|
||||||
* but we'll eventually commit the filter flags change anyway.
|
* but we'll eventually commit the filter flags change anyway.
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&il->mutex);
|
mutex_unlock(&il->mutex);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user