Commit 5f79ed3b authored by John W. Linville's avatar John W. Linville

Merge branch 'wireless-next-2.6' of...

Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
parents 09f921f8 9f28ebc3
...@@ -1784,6 +1784,9 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -1784,6 +1784,9 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
int rc = 0; int rc = 0;
bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK);
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return -EINVAL;
if (!iwl_is_alive(priv)) if (!iwl_is_alive(priv))
return -1; return -1;
......
...@@ -552,7 +552,7 @@ static struct iwl_bt_params iwl6000_bt_params = { ...@@ -552,7 +552,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
.bt_sco_disable = true, .bt_sco_disable = true,
}; };
struct iwl_cfg iwl6000g2a_2agn_cfg = { struct iwl_cfg iwl6005_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6205 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
.fw_name_pre = IWL6000G2A_FW_PRE, .fw_name_pre = IWL6000G2A_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -568,7 +568,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = { ...@@ -568,7 +568,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
.led_mode = IWL_LED_RF_STATE, .led_mode = IWL_LED_RF_STATE,
}; };
struct iwl_cfg iwl6000g2a_2abg_cfg = { struct iwl_cfg iwl6005_2abg_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6205 ABG", .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
.fw_name_pre = IWL6000G2A_FW_PRE, .fw_name_pre = IWL6000G2A_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -583,7 +583,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = { ...@@ -583,7 +583,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
.led_mode = IWL_LED_RF_STATE, .led_mode = IWL_LED_RF_STATE,
}; };
struct iwl_cfg iwl6000g2a_2bg_cfg = { struct iwl_cfg iwl6005_2bg_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6205 BG", .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
.fw_name_pre = IWL6000G2A_FW_PRE, .fw_name_pre = IWL6000G2A_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -598,7 +598,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = { ...@@ -598,7 +598,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
.led_mode = IWL_LED_RF_STATE, .led_mode = IWL_LED_RF_STATE,
}; };
struct iwl_cfg iwl6000g2b_2agn_cfg = { struct iwl_cfg iwl6030_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -618,7 +618,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = { ...@@ -618,7 +618,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
}; };
struct iwl_cfg iwl6000g2b_2abg_cfg = { struct iwl_cfg iwl6030_2abg_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6230 ABG", .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -637,7 +637,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = { ...@@ -637,7 +637,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
}; };
struct iwl_cfg iwl6000g2b_2bgn_cfg = { struct iwl_cfg iwl6030_2bgn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6230 BGN", .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -657,7 +657,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = { ...@@ -657,7 +657,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
}; };
struct iwl_cfg iwl6000g2b_2bg_cfg = { struct iwl_cfg iwl6030_2bg_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6230 BG", .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -676,7 +676,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = { ...@@ -676,7 +676,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
}; };
struct iwl_cfg iwl6000g2b_bgn_cfg = { struct iwl_cfg iwl1030_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -696,7 +696,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = { ...@@ -696,7 +696,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
}; };
struct iwl_cfg iwl6000g2b_bg_cfg = { struct iwl_cfg iwl1030_bg_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 1030 BG", .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
.fw_name_pre = IWL6000G2B_FW_PRE, .fw_name_pre = IWL6000G2B_FW_PRE,
.ucode_api_max = IWL6000G2_UCODE_API_MAX, .ucode_api_max = IWL6000G2_UCODE_API_MAX,
...@@ -782,7 +782,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { ...@@ -782,7 +782,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
.led_mode = IWL_LED_BLINK, .led_mode = IWL_LED_BLINK,
}; };
struct iwl_cfg iwl6050g2_bgn_cfg = { struct iwl_cfg iwl6150_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
.fw_name_pre = IWL6050_FW_PRE, .fw_name_pre = IWL6050_FW_PRE,
.ucode_api_max = IWL6050_UCODE_API_MAX, .ucode_api_max = IWL6050_UCODE_API_MAX,
......
...@@ -130,6 +130,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -130,6 +130,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
lockdep_assert_held(&priv->mutex); lockdep_assert_held(&priv->mutex);
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return -EINVAL;
if (!iwl_is_alive(priv)) if (!iwl_is_alive(priv))
return -EBUSY; return -EBUSY;
......
...@@ -531,6 +531,10 @@ int iwlagn_alive_notify(struct iwl_priv *priv) ...@@ -531,6 +531,10 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
/* Enable L1-Active */
iwl_clear_bits_prph(priv, APMG_PCIDEV_STT_REG,
APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
iwlagn_send_wimax_coex(priv); iwlagn_send_wimax_coex(priv);
iwlagn_set_Xtal_calib(priv); iwlagn_set_Xtal_calib(priv);
......
...@@ -2502,7 +2502,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log, ...@@ -2502,7 +2502,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
return pos; return pos;
} }
/* enable/disable bt channel announcement */ /* enable/disable bt channel inhibition */
priv->bt_ch_announce = iwlagn_bt_ch_announce; priv->bt_ch_announce = iwlagn_bt_ch_announce;
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
...@@ -4044,8 +4044,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -4044,8 +4044,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
(iwlagn_ant_coupling > IWL_BT_ANTENNA_COUPLING_THRESHOLD) ? (iwlagn_ant_coupling > IWL_BT_ANTENNA_COUPLING_THRESHOLD) ?
true : false; true : false;
/* enable/disable bt channel announcement */ /* enable/disable bt channel inhibition */
priv->bt_ch_announce = iwlagn_bt_ch_announce; priv->bt_ch_announce = iwlagn_bt_ch_announce;
IWL_DEBUG_INFO(priv, "BT channel inhibition is %s\n",
(priv->bt_ch_announce) ? "On" : "Off");
if (iwl_alloc_traffic_mem(priv)) if (iwl_alloc_traffic_mem(priv))
IWL_ERR(priv, "Not enough memory to generate traffic log\n"); IWL_ERR(priv, "Not enough memory to generate traffic log\n");
...@@ -4419,31 +4421,31 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { ...@@ -4419,31 +4421,31 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
{IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)}, {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
/* 6x00 Series Gen2a */ /* 6x00 Series Gen2a */
{IWL_PCI_DEVICE(0x0082, 0x1301, iwl6000g2a_2agn_cfg)}, {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)},
{IWL_PCI_DEVICE(0x0082, 0x1306, iwl6000g2a_2abg_cfg)}, {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)},
{IWL_PCI_DEVICE(0x0082, 0x1307, iwl6000g2a_2bg_cfg)}, {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)},
{IWL_PCI_DEVICE(0x0082, 0x1321, iwl6000g2a_2agn_cfg)}, {IWL_PCI_DEVICE(0x0082, 0x1321, iwl6005_2agn_cfg)},
{IWL_PCI_DEVICE(0x0082, 0x1326, iwl6000g2a_2abg_cfg)}, {IWL_PCI_DEVICE(0x0082, 0x1326, iwl6005_2abg_cfg)},
{IWL_PCI_DEVICE(0x0085, 0x1311, iwl6000g2a_2agn_cfg)}, {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)},
{IWL_PCI_DEVICE(0x0085, 0x1316, iwl6000g2a_2abg_cfg)}, {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)},
/* 6x00 Series Gen2b */ /* 6x00 Series Gen2b */
{IWL_PCI_DEVICE(0x008A, 0x5305, iwl6000g2b_bgn_cfg)}, {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)},
{IWL_PCI_DEVICE(0x008A, 0x5307, iwl6000g2b_bg_cfg)}, {IWL_PCI_DEVICE(0x008A, 0x5307, iwl1030_bg_cfg)},
{IWL_PCI_DEVICE(0x008A, 0x5325, iwl6000g2b_bgn_cfg)}, {IWL_PCI_DEVICE(0x008A, 0x5325, iwl1030_bgn_cfg)},
{IWL_PCI_DEVICE(0x008A, 0x5327, iwl6000g2b_bg_cfg)}, {IWL_PCI_DEVICE(0x008A, 0x5327, iwl1030_bg_cfg)},
{IWL_PCI_DEVICE(0x008B, 0x5315, iwl6000g2b_bgn_cfg)}, {IWL_PCI_DEVICE(0x008B, 0x5315, iwl1030_bgn_cfg)},
{IWL_PCI_DEVICE(0x008B, 0x5317, iwl6000g2b_bg_cfg)}, {IWL_PCI_DEVICE(0x008B, 0x5317, iwl1030_bg_cfg)},
{IWL_PCI_DEVICE(0x0090, 0x5211, iwl6000g2b_2agn_cfg)}, {IWL_PCI_DEVICE(0x0090, 0x5211, iwl6030_2agn_cfg)},
{IWL_PCI_DEVICE(0x0090, 0x5215, iwl6000g2b_2bgn_cfg)}, {IWL_PCI_DEVICE(0x0090, 0x5215, iwl6030_2bgn_cfg)},
{IWL_PCI_DEVICE(0x0090, 0x5216, iwl6000g2b_2abg_cfg)}, {IWL_PCI_DEVICE(0x0090, 0x5216, iwl6030_2abg_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5201, iwl6000g2b_2agn_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5201, iwl6030_2agn_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5205, iwl6000g2b_2bgn_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5205, iwl6030_2bgn_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5206, iwl6000g2b_2abg_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5206, iwl6030_2abg_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5207, iwl6000g2b_2bg_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5207, iwl6030_2bg_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5221, iwl6000g2b_2agn_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5221, iwl6030_2agn_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5225, iwl6000g2b_2bgn_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5225, iwl6030_2bgn_cfg)},
{IWL_PCI_DEVICE(0x0091, 0x5226, iwl6000g2b_2abg_cfg)}, {IWL_PCI_DEVICE(0x0091, 0x5226, iwl6030_2abg_cfg)},
/* 6x50 WiFi/WiMax Series */ /* 6x50 WiFi/WiMax Series */
{IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)}, {IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},
...@@ -4454,12 +4456,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { ...@@ -4454,12 +4456,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
{IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)}, {IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)},
/* 6x50 WiFi/WiMax Series Gen2 */ /* 6x50 WiFi/WiMax Series Gen2 */
{IWL_PCI_DEVICE(0x0885, 0x1305, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)},
{IWL_PCI_DEVICE(0x0885, 0x1306, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)},
{IWL_PCI_DEVICE(0x0885, 0x1325, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)},
{IWL_PCI_DEVICE(0x0885, 0x1326, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0885, 0x1326, iwl6150_bgn_cfg)},
{IWL_PCI_DEVICE(0x0886, 0x1315, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)},
{IWL_PCI_DEVICE(0x0886, 0x1316, iwl6050g2_bgn_cfg)}, {IWL_PCI_DEVICE(0x0886, 0x1316, iwl6150_bgn_cfg)},
/* 1000 Series WiFi */ /* 1000 Series WiFi */
{IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)}, {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
...@@ -4588,6 +4590,6 @@ module_param_named(antenna_coupling, iwlagn_ant_coupling, int, S_IRUGO); ...@@ -4588,6 +4590,6 @@ module_param_named(antenna_coupling, iwlagn_ant_coupling, int, S_IRUGO);
MODULE_PARM_DESC(antenna_coupling, MODULE_PARM_DESC(antenna_coupling,
"specify antenna coupling in dB (defualt: 0 dB)"); "specify antenna coupling in dB (defualt: 0 dB)");
module_param_named(bt_ch_announce, iwlagn_bt_ch_announce, bool, S_IRUGO); module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO);
MODULE_PARM_DESC(bt_ch_announce, MODULE_PARM_DESC(bt_ch_inhibition,
"Enable BT channel announcement mode (default: enable)"); "Disable BT channel inhibition (default: enable)");
...@@ -74,22 +74,22 @@ extern struct iwl_cfg iwl5100_bgn_cfg; ...@@ -74,22 +74,22 @@ extern struct iwl_cfg iwl5100_bgn_cfg;
extern struct iwl_cfg iwl5100_abg_cfg; extern struct iwl_cfg iwl5100_abg_cfg;
extern struct iwl_cfg iwl5150_agn_cfg; extern struct iwl_cfg iwl5150_agn_cfg;
extern struct iwl_cfg iwl5150_abg_cfg; extern struct iwl_cfg iwl5150_abg_cfg;
extern struct iwl_cfg iwl6000g2a_2agn_cfg; extern struct iwl_cfg iwl6005_2agn_cfg;
extern struct iwl_cfg iwl6000g2a_2abg_cfg; extern struct iwl_cfg iwl6005_2abg_cfg;
extern struct iwl_cfg iwl6000g2a_2bg_cfg; extern struct iwl_cfg iwl6005_2bg_cfg;
extern struct iwl_cfg iwl6000g2b_bgn_cfg; extern struct iwl_cfg iwl1030_bgn_cfg;
extern struct iwl_cfg iwl6000g2b_bg_cfg; extern struct iwl_cfg iwl1030_bg_cfg;
extern struct iwl_cfg iwl6000g2b_2agn_cfg; extern struct iwl_cfg iwl6030_2agn_cfg;
extern struct iwl_cfg iwl6000g2b_2abg_cfg; extern struct iwl_cfg iwl6030_2abg_cfg;
extern struct iwl_cfg iwl6000g2b_2bgn_cfg; extern struct iwl_cfg iwl6030_2bgn_cfg;
extern struct iwl_cfg iwl6000g2b_2bg_cfg; extern struct iwl_cfg iwl6030_2bg_cfg;
extern struct iwl_cfg iwl6000i_2agn_cfg; extern struct iwl_cfg iwl6000i_2agn_cfg;
extern struct iwl_cfg iwl6000i_2abg_cfg; extern struct iwl_cfg iwl6000i_2abg_cfg;
extern struct iwl_cfg iwl6000i_2bg_cfg; extern struct iwl_cfg iwl6000i_2bg_cfg;
extern struct iwl_cfg iwl6000_3agn_cfg; extern struct iwl_cfg iwl6000_3agn_cfg;
extern struct iwl_cfg iwl6050_2agn_cfg; extern struct iwl_cfg iwl6050_2agn_cfg;
extern struct iwl_cfg iwl6050_2abg_cfg; extern struct iwl_cfg iwl6050_2abg_cfg;
extern struct iwl_cfg iwl6050g2_bgn_cfg; extern struct iwl_cfg iwl6150_bgn_cfg;
extern struct iwl_cfg iwl1000_bgn_cfg; extern struct iwl_cfg iwl1000_bgn_cfg;
extern struct iwl_cfg iwl1000_bg_cfg; extern struct iwl_cfg iwl1000_bg_cfg;
extern struct iwl_cfg iwl100_bgn_cfg; extern struct iwl_cfg iwl100_bgn_cfg;
......
...@@ -647,6 +647,7 @@ void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -647,6 +647,7 @@ void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
memcpy(&lq, priv->stations[sta_id].lq, sizeof(lq)); memcpy(&lq, priv->stations[sta_id].lq, sizeof(lq));
active = priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE; active = priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE;
priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
spin_unlock_irqrestore(&priv->sta_lock, flags); spin_unlock_irqrestore(&priv->sta_lock, flags);
if (active) { if (active) {
...@@ -657,6 +658,10 @@ void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx) ...@@ -657,6 +658,10 @@ void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
IWL_ERR(priv, "failed to remove STA %pM (%d)\n", IWL_ERR(priv, "failed to remove STA %pM (%d)\n",
priv->stations[sta_id].sta.sta.addr, ret); priv->stations[sta_id].sta.sta.addr, ret);
} }
spin_lock_irqsave(&priv->sta_lock, flags);
priv->stations[sta_id].used |= IWL_STA_DRIVER_ACTIVE;
spin_unlock_irqrestore(&priv->sta_lock, flags);
ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC);
if (ret) if (ret)
IWL_ERR(priv, "failed to re-add STA %pM (%d)\n", IWL_ERR(priv, "failed to re-add STA %pM (%d)\n",
...@@ -777,6 +782,14 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx, ...@@ -777,6 +782,14 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
if (WARN_ON(lq->sta_id == IWL_INVALID_STATION)) if (WARN_ON(lq->sta_id == IWL_INVALID_STATION))
return -EINVAL; return -EINVAL;
spin_lock_irqsave(&priv->sta_lock, flags_spin);
if (!(priv->stations[lq->sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
return -EINVAL;
}
spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
iwl_dump_lq_cmd(priv, lq); iwl_dump_lq_cmd(priv, lq);
BUG_ON(init && (cmd.flags & CMD_ASYNC)); BUG_ON(init && (cmd.flags & CMD_ASYNC));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment