aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c51
1 files changed, 9 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8a002c6f3a61..c22d3d8c440c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2173,7 +2173,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
2173 } 2173 }
2174 2174
2175 /* Configure Bluetooth device coexistence support */ 2175 /* Configure Bluetooth device coexistence support */
2176 iwl_send_bt_config(priv); 2176 priv->cfg->ops->hcmd->send_bt_config(priv);
2177 2177
2178 iwl_reset_run_time_calib(priv); 2178 iwl_reset_run_time_calib(priv);
2179 2179
@@ -3177,44 +3177,6 @@ static ssize_t store_tx_power(struct device *d,
3177 3177
3178static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); 3178static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
3179 3179
3180static ssize_t show_statistics(struct device *d,
3181 struct device_attribute *attr, char *buf)
3182{
3183 struct iwl_priv *priv = dev_get_drvdata(d);
3184 u32 size = sizeof(struct iwl_notif_statistics);
3185 u32 len = 0, ofs = 0;
3186 u8 *data = (u8 *)&priv->statistics;
3187 int rc = 0;
3188
3189 if (!iwl_is_alive(priv))
3190 return -EAGAIN;
3191
3192 mutex_lock(&priv->mutex);
3193 rc = iwl_send_statistics_request(priv, CMD_SYNC, false);
3194 mutex_unlock(&priv->mutex);
3195
3196 if (rc) {
3197 len = sprintf(buf,
3198 "Error sending statistics request: 0x%08X\n", rc);
3199 return len;
3200 }
3201
3202 while (size && (PAGE_SIZE - len)) {
3203 hex_dump_to_buffer(data + ofs, size, 16, 1, buf + len,
3204 PAGE_SIZE - len, 1);
3205 len = strlen(buf);
3206 if (PAGE_SIZE - len)
3207 buf[len++] = '\n';
3208
3209 ofs += 16;
3210 size -= min(size, 16U);
3211 }
3212
3213 return len;
3214}
3215
3216static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL);
3217
3218static ssize_t show_rts_ht_protection(struct device *d, 3180static ssize_t show_rts_ht_protection(struct device *d,
3219 struct device_attribute *attr, char *buf) 3181 struct device_attribute *attr, char *buf)
3220{ 3182{
@@ -3304,6 +3266,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv)
3304 3266
3305 cancel_delayed_work_sync(&priv->init_alive_start); 3267 cancel_delayed_work_sync(&priv->init_alive_start);
3306 cancel_delayed_work(&priv->scan_check); 3268 cancel_delayed_work(&priv->scan_check);
3269 cancel_work_sync(&priv->start_internal_scan);
3307 cancel_delayed_work(&priv->alive_start); 3270 cancel_delayed_work(&priv->alive_start);
3308 cancel_work_sync(&priv->beacon_update); 3271 cancel_work_sync(&priv->beacon_update);
3309 del_timer_sync(&priv->statistics_periodic); 3272 del_timer_sync(&priv->statistics_periodic);
@@ -3399,11 +3362,10 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
3399 iwl_calib_free_results(priv); 3362 iwl_calib_free_results(priv);
3400 iwlcore_free_geos(priv); 3363 iwlcore_free_geos(priv);
3401 iwl_free_channel_map(priv); 3364 iwl_free_channel_map(priv);
3402 kfree(priv->scan); 3365 kfree(priv->scan_cmd);
3403} 3366}
3404 3367
3405static struct attribute *iwl_sysfs_entries[] = { 3368static struct attribute *iwl_sysfs_entries[] = {
3406 &dev_attr_statistics.attr,
3407 &dev_attr_temperature.attr, 3369 &dev_attr_temperature.attr,
3408 &dev_attr_tx_power.attr, 3370 &dev_attr_tx_power.attr,
3409 &dev_attr_rts_ht_protection.attr, 3371 &dev_attr_rts_ht_protection.attr,
@@ -3834,7 +3796,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
3834 {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)}, 3796 {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)},
3835 {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)}, 3797 {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)},
3836 {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)}, 3798 {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
3837 {IWL_PCI_DEVICE(0x0082, 0x1201, iwl6000i_g2_2agn_cfg)}, 3799
3800/* 6x00 Series Gen2 */
3801 {IWL_PCI_DEVICE(0x0082, 0x1201, iwl6000g2_2agn_cfg)},
3802 {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6000g2_2agn_cfg)},
3803 {IWL_PCI_DEVICE(0x0082, 0x1321, iwl6000g2_2agn_cfg)},
3804 {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6000g2_2agn_cfg)},
3838 3805
3839/* 6x50 WiFi/WiMax Series */ 3806/* 6x50 WiFi/WiMax Series */
3840 {IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)}, 3807 {IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},