aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 08:51:01 -0500
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 08:51:01 -0500
commit1722f8e12a9c6117d872bd19ec5919460ccdfb4e (patch)
tree8f40a7240155e074c1a8f01927821c4a16eabe70 /drivers/net
parente7392364fcd1004a5e495f15cf21b1e0ef874215 (diff)
iwlegacy: checkpatch.pl fixes
Fix most checkpatch.pl ERRORs and some WARNINGs. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlegacy/3945-debug.c12
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c10
-rw-r--r--drivers/net/wireless/iwlegacy/3945-rs.c4
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c43
-rw-r--r--drivers/net/wireless/iwlegacy/3945.h29
-rw-r--r--drivers/net/wireless/iwlegacy/4965-calib.c7
-rw-r--r--drivers/net/wireless/iwlegacy/4965-debug.c12
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c60
-rw-r--r--drivers/net/wireless/iwlegacy/4965-rs.c36
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c4
-rw-r--r--drivers/net/wireless/iwlegacy/4965.h30
-rw-r--r--drivers/net/wireless/iwlegacy/common.c157
-rw-r--r--drivers/net/wireless/iwlegacy/common.h132
-rw-r--r--drivers/net/wireless/iwlegacy/debug.c172
14 files changed, 297 insertions, 411 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-debug.c b/drivers/net/wireless/iwlegacy/3945-debug.c
index 382af2e958eb..5e1a19fd354d 100644
--- a/drivers/net/wireless/iwlegacy/3945-debug.c
+++ b/drivers/net/wireless/iwlegacy/3945-debug.c
@@ -49,8 +49,8 @@ il3945_stats_flag(struct il_priv *il, char *buf, int bufsz)
49} 49}
50 50
51ssize_t 51ssize_t
52il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf, 52il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
53 size_t count, loff_t * ppos) 53 size_t count, loff_t *ppos)
54{ 54{
55 struct il_priv *il = file->private_data; 55 struct il_priv *il = file->private_data;
56 int pos = 0; 56 int pos = 0;
@@ -314,8 +314,8 @@ il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf,
314} 314}
315 315
316ssize_t 316ssize_t
317il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf, 317il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
318 size_t count, loff_t * ppos) 318 size_t count, loff_t *ppos)
319{ 319{
320 struct il_priv *il = file->private_data; 320 struct il_priv *il = file->private_data;
321 int pos = 0; 321 int pos = 0;
@@ -404,8 +404,8 @@ il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf,
404} 404}
405 405
406ssize_t 406ssize_t
407il3945_ucode_general_stats_read(struct file * file, char __user * user_buf, 407il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
408 size_t count, loff_t * ppos) 408 size_t count, loff_t *ppos)
409{ 409{
410 struct il_priv *il = file->private_data; 410 struct il_priv *il = file->private_data;
411 int pos = 0; 411 int pos = 0;
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 2249fe44e669..daef6b58f6cc 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -1033,11 +1033,9 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority)
1033 D_INFO("Failed to allocate SKB buffer.\n"); 1033 D_INFO("Failed to allocate SKB buffer.\n");
1034 if (rxq->free_count <= RX_LOW_WATERMARK && 1034 if (rxq->free_count <= RX_LOW_WATERMARK &&
1035 net_ratelimit()) 1035 net_ratelimit())
1036 IL_ERR 1036 IL_ERR("Failed to allocate SKB buffer with %0x."
1037 ("Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", 1037 "Only %u free buffers remaining.\n",
1038 priority == 1038 priority, rxq->free_count);
1039 GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL",
1040 rxq->free_count);
1041 /* We don't reschedule replenish work here -- we will 1039 /* We don't reschedule replenish work here -- we will
1042 * call the restock method and if it still needs 1040 * call the restock method and if it still needs
1043 * more buffers it will schedule replenish */ 1041 * more buffers it will schedule replenish */
@@ -3250,7 +3248,7 @@ il3945_show_measurement(struct device *d, struct device_attribute *attr,
3250 struct il_priv *il = dev_get_drvdata(d); 3248 struct il_priv *il = dev_get_drvdata(d);
3251 struct il_spectrum_notification measure_report; 3249 struct il_spectrum_notification measure_report;
3252 u32 size = sizeof(measure_report), len = 0, ofs = 0; 3250 u32 size = sizeof(measure_report), len = 0, ofs = 0;
3253 u8 *data = (u8 *) & measure_report; 3251 u8 *data = (u8 *) &measure_report;
3254 unsigned long flags; 3252 unsigned long flags;
3255 3253
3256 spin_lock_irqsave(&il->lock, flags); 3254 spin_lock_irqsave(&il->lock, flags);
diff --git a/drivers/net/wireless/iwlegacy/3945-rs.c b/drivers/net/wireless/iwlegacy/3945-rs.c
index 3420b1c0ee0c..30ad404f8df7 100644
--- a/drivers/net/wireless/iwlegacy/3945-rs.c
+++ b/drivers/net/wireless/iwlegacy/3945-rs.c
@@ -837,8 +837,8 @@ il3945_open_file_generic(struct inode *inode, struct file *file)
837} 837}
838 838
839static ssize_t 839static ssize_t
840il3945_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf, 840il3945_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
841 size_t count, loff_t * ppos) 841 size_t count, loff_t *ppos)
842{ 842{
843 char *buff; 843 char *buff;
844 int desc = 0; 844 int desc = 0;
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 7f0b9f56f4be..7367dbb75ec6 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -381,10 +381,10 @@ il3945_accumulative_stats(struct il_priv *il, __le32 * stats)
381 u32 *accum_stats; 381 u32 *accum_stats;
382 u32 *delta, *max_delta; 382 u32 *delta, *max_delta;
383 383
384 prev_stats = (__le32 *) & il->_3945.stats; 384 prev_stats = (__le32 *) &il->_3945.stats;
385 accum_stats = (u32 *) & il->_3945.accum_stats; 385 accum_stats = (u32 *) &il->_3945.accum_stats;
386 delta = (u32 *) & il->_3945.delta_stats; 386 delta = (u32 *) &il->_3945.delta_stats;
387 max_delta = (u32 *) & il->_3945.max_delta; 387 max_delta = (u32 *) &il->_3945.max_delta;
388 388
389 for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats); 389 for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats);
390 i += 390 i +=
@@ -416,7 +416,7 @@ il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb)
416 (int)sizeof(struct il3945_notif_stats), 416 (int)sizeof(struct il3945_notif_stats),
417 le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK); 417 le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK);
418#ifdef CONFIG_IWLEGACY_DEBUGFS 418#ifdef CONFIG_IWLEGACY_DEBUGFS
419 il3945_accumulative_stats(il, (__le32 *) & pkt->u.raw); 419 il3945_accumulative_stats(il, (__le32 *) &pkt->u.raw);
420#endif 420#endif
421 421
422 memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); 422 memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats));
@@ -426,7 +426,7 @@ void
426il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) 426il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb)
427{ 427{
428 struct il_rx_pkt *pkt = rxb_addr(rxb); 428 struct il_rx_pkt *pkt = rxb_addr(rxb);
429 __le32 *flag = (__le32 *) & pkt->u.raw; 429 __le32 *flag = (__le32 *) &pkt->u.raw;
430 430
431 if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) { 431 if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) {
432#ifdef CONFIG_IWLEGACY_DEBUGFS 432#ifdef CONFIG_IWLEGACY_DEBUGFS
@@ -775,7 +775,8 @@ il3945_set_pwr_vmain(struct il_priv *il)
775 APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, 775 APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
776 ~APMG_PS_CTRL_MSK_PWR_SRC); 776 ~APMG_PS_CTRL_MSK_PWR_SRC);
777 777
778 _il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, CSR_GPIO_IN_BIT_AUX_POWER, 5000); /* uS */ 778 _il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC,
779 CSR_GPIO_IN_BIT_AUX_POWER, 5000);
779} 780}
780 781
781static int 782static int
@@ -1228,7 +1229,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
1228 {3, 113}, 1229 {3, 113},
1229 {3, 106}, 1230 {3, 106},
1230 {3, 102}, 1231 {3, 102},
1231 {3, 95}}, /* 2.4 GHz, lowest power */ 1232 {3, 95} /* 2.4 GHz, lowest power */
1233 },
1232 { 1234 {
1233 {251, 127}, /* 5.x GHz, highest power */ 1235 {251, 127}, /* 5.x GHz, highest power */
1234 {251, 120}, 1236 {251, 120},
@@ -1307,7 +1309,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
1307 {35, 113}, 1309 {35, 113},
1308 {35, 107}, 1310 {35, 107},
1309 {35, 99}, 1311 {35, 99},
1310 {3, 120}} /* 5.x GHz, lowest power */ 1312 {3, 120} /* 5.x GHz, lowest power */
1313 }
1311}; 1314};
1312 1315
1313static inline u8 1316static inline u8
@@ -1331,7 +1334,7 @@ il3945_hw_reg_fix_power_idx(int idx)
1331 */ 1334 */
1332static void 1335static void
1333il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx, 1336il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx,
1334 const s8 * clip_pwrs, 1337 const s8 *clip_pwrs,
1335 struct il_channel_info *ch_info, int band_idx) 1338 struct il_channel_info *ch_info, int band_idx)
1336{ 1339{
1337 struct il3945_scan_power_info *scan_power_info; 1340 struct il3945_scan_power_info *scan_power_info;
@@ -1883,8 +1886,7 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work)
1883} 1886}
1884 1887
1885/** 1888/**
1886 * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) 1889 * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel.
1887 * for the channel.
1888 * 1890 *
1889 * This function is used when initializing channel-info structs. 1891 * This function is used when initializing channel-info structs.
1890 * 1892 *
@@ -1930,7 +1932,7 @@ il3945_hw_reg_get_ch_grp_idx(struct il_priv *il,
1930 */ 1932 */
1931static int 1933static int
1932il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power, 1934il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power,
1933 s32 setting_idx, s32 * new_idx) 1935 s32 setting_idx, s32 *new_idx)
1934{ 1936{
1935 const struct il3945_eeprom_txpower_group *chnl_grp = NULL; 1937 const struct il3945_eeprom_txpower_group *chnl_grp = NULL;
1936 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; 1938 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom;
@@ -2735,14 +2737,13 @@ static struct il_cfg il3945_abg_cfg = {
2735}; 2737};
2736 2738
2737DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { 2739DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = {
2738 { 2740 {IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)},
2739 IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)}, { 2741 {IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)},
2740 IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)}, { 2742 {IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)},
2741 IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)}, { 2743 {IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)},
2742 IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)}, { 2744 {IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)},
2743 IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)}, { 2745 {IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)},
2744 IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)}, { 2746 {0}
2745 0}
2746}; 2747};
2747 2748
2748MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids); 2749MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids);
diff --git a/drivers/net/wireless/iwlegacy/3945.h b/drivers/net/wireless/iwlegacy/3945.h
index 8e53751270f0..00d3336fd16b 100644
--- a/drivers/net/wireless/iwlegacy/3945.h
+++ b/drivers/net/wireless/iwlegacy/3945.h
@@ -269,11 +269,6 @@ extern int il3945_init_hw_rate_table(struct il_priv *il);
269extern void il3945_reg_txpower_periodic(struct il_priv *il); 269extern void il3945_reg_txpower_periodic(struct il_priv *il);
270extern int il3945_txpower_set_from_eeprom(struct il_priv *il); 270extern int il3945_txpower_set_from_eeprom(struct il_priv *il);
271 271
272extern const struct il_channel_info *il3945_get_channel_info(const struct
273 il_priv *il,
274 enum ieee80211_band
275 band, u16 channel);
276
277extern int il3945_rs_next_rate(struct il_priv *il, int rate); 272extern int il3945_rs_next_rate(struct il_priv *il, int rate);
278 273
279/* scanning */ 274/* scanning */
@@ -619,31 +614,31 @@ struct il3945_tfd {
619} __packed; 614} __packed;
620 615
621#ifdef CONFIG_IWLEGACY_DEBUGFS 616#ifdef CONFIG_IWLEGACY_DEBUGFS
622ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf, 617ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
623 size_t count, loff_t * ppos); 618 size_t count, loff_t *ppos);
624ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf, 619ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
625 size_t count, loff_t * ppos); 620 size_t count, loff_t *ppos);
626ssize_t il3945_ucode_general_stats_read(struct file *file, 621ssize_t il3945_ucode_general_stats_read(struct file *file,
627 char __user * user_buf, size_t count, 622 char __user *user_buf, size_t count,
628 loff_t * ppos); 623 loff_t *ppos);
629#else 624#else
630static ssize_t 625static ssize_t
631il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf, 626il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
632 size_t count, loff_t * ppos) 627 size_t count, loff_t *ppos)
633{ 628{
634 return 0; 629 return 0;
635} 630}
636 631
637static ssize_t 632static ssize_t
638il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf, 633il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
639 size_t count, loff_t * ppos) 634 size_t count, loff_t *ppos)
640{ 635{
641 return 0; 636 return 0;
642} 637}
643 638
644static ssize_t 639static ssize_t
645il3945_ucode_general_stats_read(struct file *file, char __user * user_buf, 640il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
646 size_t count, loff_t * ppos) 641 size_t count, loff_t *ppos)
647{ 642{
648 return 0; 643 return 0;
649} 644}
diff --git a/drivers/net/wireless/iwlegacy/4965-calib.c b/drivers/net/wireless/iwlegacy/4965-calib.c
index efb32331ec88..d3248e3ef23b 100644
--- a/drivers/net/wireless/iwlegacy/4965-calib.c
+++ b/drivers/net/wireless/iwlegacy/4965-calib.c
@@ -366,7 +366,7 @@ il4965_sens_auto_corr_ofdm(struct il_priv *il, u32 norm_fa, u32 rx_enable_time)
366static void 366static void
367il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il, 367il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
368 struct il_sensitivity_data *data, 368 struct il_sensitivity_data *data,
369 __le16 * tbl) 369 __le16 *tbl)
370{ 370{
371 tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] = 371 tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] =
372 cpu_to_le16((u16) data->auto_corr_ofdm); 372 cpu_to_le16((u16) data->auto_corr_ofdm);
@@ -707,9 +707,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig,
707 il4965_find_first_chain(il->cfg->valid_tx_ant); 707 il4965_find_first_chain(il->cfg->valid_tx_ant);
708 data->disconn_array[first_chain] = 0; 708 data->disconn_array[first_chain] = 0;
709 active_chains |= BIT(first_chain); 709 active_chains |= BIT(first_chain);
710 D_CALIB 710 D_CALIB("All Tx chains are disconnected"
711 ("All Tx chains are disconnected W/A - declare %d as connected\n", 711 "- declare %d as connected\n", first_chain);
712 first_chain);
713 break; 712 break;
714 } 713 }
715 } 714 }
diff --git a/drivers/net/wireless/iwlegacy/4965-debug.c b/drivers/net/wireless/iwlegacy/4965-debug.c
index 529939938600..98ec39f56ba3 100644
--- a/drivers/net/wireless/iwlegacy/4965-debug.c
+++ b/drivers/net/wireless/iwlegacy/4965-debug.c
@@ -56,8 +56,8 @@ il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
56} 56}
57 57
58ssize_t 58ssize_t
59il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf, 59il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
60 size_t count, loff_t * ppos) 60 size_t count, loff_t *ppos)
61{ 61{
62 struct il_priv *il = file->private_data; 62 struct il_priv *il = file->private_data;
63 int pos = 0; 63 int pos = 0;
@@ -468,8 +468,8 @@ il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf,
468} 468}
469 469
470ssize_t 470ssize_t
471il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf, 471il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
472 size_t count, loff_t * ppos) 472 size_t count, loff_t *ppos)
473{ 473{
474 struct il_priv *il = file->private_data; 474 struct il_priv *il = file->private_data;
475 int pos = 0; 475 int pos = 0;
@@ -634,8 +634,8 @@ il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf,
634} 634}
635 635
636ssize_t 636ssize_t
637il4965_ucode_general_stats_read(struct file * file, char __user * user_buf, 637il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
638 size_t count, loff_t * ppos) 638 size_t count, loff_t *ppos)
639{ 639{
640 struct il_priv *il = file->private_data; 640 struct il_priv *il = file->private_data;
641 int pos = 0; 641 int pos = 0;
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index ca819d872097..21a1381c9748 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -163,10 +163,10 @@ il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq)
163 il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG, 163 il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG,
164 FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | 164 FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL |
165 FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | 165 FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
166 FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | rb_size | (rb_timeout 166 FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK |
167 << 167 rb_size |
168 FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) 168 (rb_timeout << FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) |
169 | (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); 169 (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
170 170
171 /* Set interrupt coalescing timer to default (2048 usecs) */ 171 /* Set interrupt coalescing timer to default (2048 usecs) */
172 il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF); 172 il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF);
@@ -1235,9 +1235,8 @@ il4965_dump_fh(struct il_priv *il, char **buf, bool display)
1235 pos += 1235 pos +=
1236 scnprintf(*buf + pos, bufsz - pos, 1236 scnprintf(*buf + pos, bufsz - pos,
1237 " %34s: 0X%08x\n", 1237 " %34s: 0X%08x\n",
1238 il4965_get_fh_string(fh_tbl[i]), il_rd(il, 1238 il4965_get_fh_string(fh_tbl[i]),
1239 fh_tbl 1239 il_rd(il, fh_tbl[i]));
1240 [i]));
1241 } 1240 }
1242 return pos; 1241 return pos;
1243 } 1242 }
@@ -1328,15 +1327,15 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats)
1328 struct stats_general_common *general, *accum_general; 1327 struct stats_general_common *general, *accum_general;
1329 struct stats_tx *tx, *accum_tx; 1328 struct stats_tx *tx, *accum_tx;
1330 1329
1331 prev_stats = (__le32 *) & il->_4965.stats; 1330 prev_stats = (__le32 *) &il->_4965.stats;
1332 accum_stats = (u32 *) & il->_4965.accum_stats; 1331 accum_stats = (u32 *) &il->_4965.accum_stats;
1333 size = sizeof(struct il_notif_stats); 1332 size = sizeof(struct il_notif_stats);
1334 general = &il->_4965.stats.general.common; 1333 general = &il->_4965.stats.general.common;
1335 accum_general = &il->_4965.accum_stats.general.common; 1334 accum_general = &il->_4965.accum_stats.general.common;
1336 tx = &il->_4965.stats.tx; 1335 tx = &il->_4965.stats.tx;
1337 accum_tx = &il->_4965.accum_stats.tx; 1336 accum_tx = &il->_4965.accum_stats.tx;
1338 delta = (u32 *) & il->_4965.delta_stats; 1337 delta = (u32 *) &il->_4965.delta_stats;
1339 max_delta = (u32 *) & il->_4965.max_delta; 1338 max_delta = (u32 *) &il->_4965.max_delta;
1340 1339
1341 for (i = sizeof(__le32); i < size; 1340 for (i = sizeof(__le32); i < size;
1342 i += 1341 i +=
@@ -1375,7 +1374,7 @@ il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb)
1375 ((il->_4965.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK) != 1374 ((il->_4965.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK) !=
1376 (pkt->u.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK))); 1375 (pkt->u.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK)));
1377#ifdef CONFIG_IWLEGACY_DEBUGFS 1376#ifdef CONFIG_IWLEGACY_DEBUGFS
1378 il4965_accumulative_stats(il, (__le32 *) & pkt->u.stats); 1377 il4965_accumulative_stats(il, (__le32 *) &pkt->u.stats);
1379#endif 1378#endif
1380 1379
1381 /* TODO: reading some of stats is unneeded */ 1380 /* TODO: reading some of stats is unneeded */
@@ -2093,8 +2092,8 @@ il4965_txq_ctx_stop(struct il_priv *il)
2093 (il, FH49_TSSR_TX_STATUS_REG, 2092 (il, FH49_TSSR_TX_STATUS_REG,
2094 FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000)) 2093 FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000))
2095 IL_ERR("Failing on timeout while stopping" 2094 IL_ERR("Failing on timeout while stopping"
2096 " DMA channel %d [0x%08x]", ch, il_rd(il, 2095 " DMA channel %d [0x%08x]", ch,
2097 FH49_TSSR_TX_STATUS_REG)); 2096 il_rd(il, FH49_TSSR_TX_STATUS_REG));
2098 } 2097 }
2099 spin_unlock_irqrestore(&il->lock, flags); 2098 spin_unlock_irqrestore(&il->lock, flags);
2100 2099
@@ -2135,8 +2134,8 @@ il4965_tx_queue_stop_scheduler(struct il_priv *il, u16 txq_id)
2135 /* Simply stop the queue, but don't change any configuration; 2134 /* Simply stop the queue, but don't change any configuration;
2136 * the SCD_ACT_EN bit is the write-enable mask for the ACTIVE bit. */ 2135 * the SCD_ACT_EN bit is the write-enable mask for the ACTIVE bit. */
2137 il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id), 2136 il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id),
2138 (0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (1 << 2137 (0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
2139 IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN)); 2138 (1 << IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
2140} 2139}
2141 2140
2142/** 2141/**
@@ -2451,7 +2450,7 @@ il4965_txq_check_empty(struct il_priv *il, int sta_id, u8 tid, int txq_id)
2451 2450
2452static void 2451static void
2453il4965_non_agg_tx_status(struct il_priv *il, struct il_rxon_context *ctx, 2452il4965_non_agg_tx_status(struct il_priv *il, struct il_rxon_context *ctx,
2454 const u8 * addr1) 2453 const u8 *addr1)
2455{ 2454{
2456 struct ieee80211_sta *sta; 2455 struct ieee80211_sta *sta;
2457 struct il_station_priv *sta_priv; 2456 struct il_station_priv *sta_priv;
@@ -2661,7 +2660,7 @@ il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb)
2661 spin_lock_irqsave(&il->sta_lock, flags); 2660 spin_lock_irqsave(&il->sta_lock, flags);
2662 2661
2663 D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, " "sta_id = %d\n", 2662 D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, " "sta_id = %d\n",
2664 agg->wait_for_ba, (u8 *) & ba_resp->sta_addr_lo32, 2663 agg->wait_for_ba, (u8 *) &ba_resp->sta_addr_lo32,
2665 ba_resp->sta_id); 2664 ba_resp->sta_id);
2666 D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," "scd_flow = " 2665 D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," "scd_flow = "
2667 "%d, scd_ssn = %d\n", ba_resp->tid, ba_resp->seq_ctl, 2666 "%d, scd_ssn = %d\n", ba_resp->tid, ba_resp->seq_ctl,
@@ -2791,7 +2790,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id)
2791 */ 2790 */
2792int 2791int
2793il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx, 2792il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx,
2794 const u8 * addr, u8 * sta_id_r) 2793 const u8 *addr, u8 *sta_id_r)
2795{ 2794{
2796 int ret; 2795 int ret;
2797 u8 sta_id; 2796 u8 sta_id;
@@ -3277,8 +3276,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx)
3277 3276
3278 link_cmd = il4965_sta_alloc_lq(il, sta_id); 3277 link_cmd = il4965_sta_alloc_lq(il, sta_id);
3279 if (!link_cmd) { 3278 if (!link_cmd) {
3280 IL_ERR 3279 IL_ERR("Unable to initialize rate scaling for bcast sta.\n");
3281 ("Unable to initialize rate scaling for bcast station.\n");
3282 return -ENOMEM; 3280 return -ENOMEM;
3283 } 3281 }
3284 3282
@@ -3286,8 +3284,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx)
3286 if (il->stations[sta_id].lq) 3284 if (il->stations[sta_id].lq)
3287 kfree(il->stations[sta_id].lq); 3285 kfree(il->stations[sta_id].lq);
3288 else 3286 else
3289 D_INFO 3287 D_INFO("Bcast sta rate scaling has not been initialized.\n");
3290 ("Bcast station rate scaling has not been initialized yet.\n");
3291 il->stations[sta_id].lq = link_cmd; 3288 il->stations[sta_id].lq = link_cmd;
3292 spin_unlock_irqrestore(&il->sta_lock, flags); 3289 spin_unlock_irqrestore(&il->sta_lock, flags);
3293 3290
@@ -4819,11 +4816,10 @@ il4965_dump_nic_error_log(struct il_priv *il)
4819 u32 blink1, blink2, ilink1, ilink2; 4816 u32 blink1, blink2, ilink1, ilink2;
4820 u32 pc, hcmd; 4817 u32 pc, hcmd;
4821 4818
4822 if (il->ucode_type == UCODE_INIT) { 4819 if (il->ucode_type == UCODE_INIT)
4823 base = le32_to_cpu(il->card_alive_init.error_event_table_ptr); 4820 base = le32_to_cpu(il->card_alive_init.error_event_table_ptr);
4824 } else { 4821 else
4825 base = le32_to_cpu(il->card_alive.error_event_table_ptr); 4822 base = le32_to_cpu(il->card_alive.error_event_table_ptr);
4826 }
4827 4823
4828 if (!il->cfg->ops->lib->is_valid_rtc_data_addr(base)) { 4824 if (!il->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
4829 IL_ERR("Not valid error log pointer 0x%08X for %s uCode\n", 4825 IL_ERR("Not valid error log pointer 0x%08X for %s uCode\n",
@@ -6026,13 +6022,11 @@ il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq,
6026 6022
6027 /* Set up and activate */ 6023 /* Set up and activate */
6028 il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id), 6024 il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id),
6029 (active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (tx_fifo_id 6025 (active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
6030 << 6026 (tx_fifo_id << IL49_SCD_QUEUE_STTS_REG_POS_TXF) |
6031 IL49_SCD_QUEUE_STTS_REG_POS_TXF) 6027 (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) |
6032 | (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) | (scd_retry 6028 (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK) |
6033 << 6029 IL49_SCD_QUEUE_STTS_REG_MSK);
6034 IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK)
6035 | IL49_SCD_QUEUE_STTS_REG_MSK);
6036 6030
6037 txq->sched_retry = scd_retry; 6031 txq->sched_retry = scd_retry;
6038 6032
diff --git a/drivers/net/wireless/iwlegacy/4965-rs.c b/drivers/net/wireless/iwlegacy/4965-rs.c
index 3ea236157058..4bc5a1845821 100644
--- a/drivers/net/wireless/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/iwlegacy/4965-rs.c
@@ -96,18 +96,18 @@ static const u8 ant_toggle_lookup[] = {
96 */ 96 */
97const struct il_rate_info il_rates[RATE_COUNT] = { 97const struct il_rate_info il_rates[RATE_COUNT] = {
98 IL_DECLARE_RATE_INFO(1, INV, INV, 2, INV, 2, INV, 2), /* 1mbps */ 98 IL_DECLARE_RATE_INFO(1, INV, INV, 2, INV, 2, INV, 2), /* 1mbps */
99 IL_DECLARE_RATE_INFO(2, INV, 1, 5, 1, 5, 1, 5), /* 2mbps */ 99 IL_DECLARE_RATE_INFO(2, INV, 1, 5, 1, 5, 1, 5), /* 2mbps */
100 IL_DECLARE_RATE_INFO(5, INV, 2, 6, 2, 11, 2, 11), /*5.5mbps */ 100 IL_DECLARE_RATE_INFO(5, INV, 2, 6, 2, 11, 2, 11), /*5.5mbps */
101 IL_DECLARE_RATE_INFO(11, INV, 9, 12, 9, 12, 5, 18), /* 11mbps */ 101 IL_DECLARE_RATE_INFO(11, INV, 9, 12, 9, 12, 5, 18), /* 11mbps */
102 IL_DECLARE_RATE_INFO(6, 6, 5, 9, 5, 11, 5, 11), /* 6mbps */ 102 IL_DECLARE_RATE_INFO(6, 6, 5, 9, 5, 11, 5, 11), /* 6mbps */
103 IL_DECLARE_RATE_INFO(9, 6, 6, 11, 6, 11, 5, 11), /* 9mbps */ 103 IL_DECLARE_RATE_INFO(9, 6, 6, 11, 6, 11, 5, 11), /* 9mbps */
104 IL_DECLARE_RATE_INFO(12, 12, 11, 18, 11, 18, 11, 18), /* 12mbps */ 104 IL_DECLARE_RATE_INFO(12, 12, 11, 18, 11, 18, 11, 18), /* 12mbps */
105 IL_DECLARE_RATE_INFO(18, 18, 12, 24, 12, 24, 11, 24), /* 18mbps */ 105 IL_DECLARE_RATE_INFO(18, 18, 12, 24, 12, 24, 11, 24), /* 18mbps */
106 IL_DECLARE_RATE_INFO(24, 24, 18, 36, 18, 36, 18, 36), /* 24mbps */ 106 IL_DECLARE_RATE_INFO(24, 24, 18, 36, 18, 36, 18, 36), /* 24mbps */
107 IL_DECLARE_RATE_INFO(36, 36, 24, 48, 24, 48, 24, 48), /* 36mbps */ 107 IL_DECLARE_RATE_INFO(36, 36, 24, 48, 24, 48, 24, 48), /* 36mbps */
108 IL_DECLARE_RATE_INFO(48, 48, 36, 54, 36, 54, 36, 54), /* 48mbps */ 108 IL_DECLARE_RATE_INFO(48, 48, 36, 54, 36, 54, 36, 54), /* 48mbps */
109 IL_DECLARE_RATE_INFO(54, 54, 48, INV, 48, INV, 48, INV), /* 54mbps */ 109 IL_DECLARE_RATE_INFO(54, 54, 48, INV, 48, INV, 48, INV),/* 54mbps */
110 IL_DECLARE_RATE_INFO(60, 60, 48, INV, 48, INV, 48, INV), /* 60mbps */ 110 IL_DECLARE_RATE_INFO(60, 60, 48, INV, 48, INV, 48, INV),/* 60mbps */
111}; 111};
112 112
113static int 113static int
@@ -150,7 +150,7 @@ static void il4965_rs_stay_in_table(struct il_lq_sta *lq_sta,
150 150
151#ifdef CONFIG_MAC80211_DEBUGFS 151#ifdef CONFIG_MAC80211_DEBUGFS
152static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, 152static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta,
153 u32 * rate_n_flags, int idx); 153 u32 *rate_n_flags, int idx);
154#else 154#else
155static void 155static void
156il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx) 156il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
@@ -610,7 +610,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
610/* switch to another antenna/antennas and return 1 */ 610/* switch to another antenna/antennas and return 1 */
611/* if no other valid antenna found, return 0 */ 611/* if no other valid antenna found, return 0 */
612static int 612static int
613il4965_rs_toggle_antenna(u32 valid_ant, u32 * rate_n_flags, 613il4965_rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
614 struct il_scale_tbl_info *tbl) 614 struct il_scale_tbl_info *tbl)
615{ 615{
616 u8 new_ant_type; 616 u8 new_ant_type;
@@ -1082,7 +1082,8 @@ il4965_rs_set_expected_tpt_table(struct il_lq_sta *lq_sta,
1082 * bit rate will typically need to increase, but not if performance was bad. 1082 * bit rate will typically need to increase, but not if performance was bad.
1083 */ 1083 */
1084static s32 1084static s32
1085il4965_rs_get_best_rate(struct il_priv *il, struct il_lq_sta *lq_sta, struct il_scale_tbl_info *tbl, /* "search" */ 1085il4965_rs_get_best_rate(struct il_priv *il, struct il_lq_sta *lq_sta,
1086 struct il_scale_tbl_info *tbl, /* "search" */
1086 u16 rate_mask, s8 idx) 1087 u16 rate_mask, s8 idx)
1087{ 1088{
1088 /* "active" values */ 1089 /* "active" values */
@@ -2012,11 +2013,10 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb,
2012 /* Higher adjacent rate's throughput is measured */ 2013 /* Higher adjacent rate's throughput is measured */
2013 if (high_tpt != IL_INVALID_VALUE) { 2014 if (high_tpt != IL_INVALID_VALUE) {
2014 /* Higher rate has better throughput */ 2015 /* Higher rate has better throughput */
2015 if (high_tpt > current_tpt && sr >= RATE_INCREASE_TH) { 2016 if (high_tpt > current_tpt && sr >= RATE_INCREASE_TH)
2016 scale_action = 1; 2017 scale_action = 1;
2017 } else { 2018 else
2018 scale_action = 0; 2019 scale_action = 0;
2019 }
2020 2020
2021 /* Lower adjacent rate's throughput is measured */ 2021 /* Lower adjacent rate's throughput is measured */
2022 } else if (low_tpt != IL_INVALID_VALUE) { 2022 } else if (low_tpt != IL_INVALID_VALUE) {
@@ -2583,8 +2583,8 @@ il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
2583 2583
2584static ssize_t 2584static ssize_t
2585il4965_rs_sta_dbgfs_scale_table_write(struct file *file, 2585il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
2586 const char __user * user_buf, 2586 const char __user *user_buf,
2587 size_t count, loff_t * ppos) 2587 size_t count, loff_t *ppos)
2588{ 2588{
2589 struct il_lq_sta *lq_sta = file->private_data; 2589 struct il_lq_sta *lq_sta = file->private_data;
2590 struct il_priv *il; 2590 struct il_priv *il;
@@ -2622,8 +2622,8 @@ il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
2622} 2622}
2623 2623
2624static ssize_t 2624static ssize_t
2625il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user * user_buf, 2625il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user *user_buf,
2626 size_t count, loff_t * ppos) 2626 size_t count, loff_t *ppos)
2627{ 2627{
2628 char *buff; 2628 char *buff;
2629 int desc = 0; 2629 int desc = 0;
@@ -2730,8 +2730,8 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = {
2730}; 2730};
2731 2731
2732static ssize_t 2732static ssize_t
2733il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf, 2733il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
2734 size_t count, loff_t * ppos) 2734 size_t count, loff_t *ppos)
2735{ 2735{
2736 char *buff; 2736 char *buff;
2737 int desc = 0; 2737 int desc = 0;
@@ -2776,8 +2776,8 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
2776 2776
2777static ssize_t 2777static ssize_t
2778il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file, 2778il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file,
2779 char __user * user_buf, size_t count, 2779 char __user *user_buf, size_t count,
2780 loff_t * ppos) 2780 loff_t *ppos)
2781{ 2781{
2782 char buff[120]; 2782 char buff[120];
2783 int desc = 0; 2783 int desc = 0;
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index be054f1452b8..6f5e6a15a2cb 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -533,8 +533,8 @@ il4965_nic_config(struct il_priv *il)
533 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); 533 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
534 534
535 il->calib_info = 535 il->calib_info =
536 (struct il_eeprom_calib_info *)il_eeprom_query_addr(il, 536 (struct il_eeprom_calib_info *)
537 EEPROM_4965_CALIB_TXPOWER_OFFSET); 537 il_eeprom_query_addr(il, EEPROM_4965_CALIB_TXPOWER_OFFSET);
538 538
539 spin_unlock_irqrestore(&il->lock, flags); 539 spin_unlock_irqrestore(&il->lock, flags);
540} 540}
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 78eae22c8f29..ded8b922a44e 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -138,7 +138,7 @@ il4965_get_tx_fail_reason(u32 status)
138/* station management */ 138/* station management */
139int il4965_alloc_bcast_station(struct il_priv *il, struct il_rxon_context *ctx); 139int il4965_alloc_bcast_station(struct il_priv *il, struct il_rxon_context *ctx);
140int il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx, 140int il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx,
141 const u8 * addr, u8 * sta_id_r); 141 const u8 *addr, u8 *sta_id_r);
142int il4965_remove_default_wep_key(struct il_priv *il, 142int il4965_remove_default_wep_key(struct il_priv *il,
143 struct il_rxon_context *ctx, 143 struct il_rxon_context *ctx,
144 struct ieee80211_key_conf *key); 144 struct ieee80211_key_conf *key);
@@ -153,7 +153,7 @@ int il4965_remove_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx,
153void il4965_update_tkip_key(struct il_priv *il, struct il_rxon_context *ctx, 153void il4965_update_tkip_key(struct il_priv *il, struct il_rxon_context *ctx,
154 struct ieee80211_key_conf *keyconf, 154 struct ieee80211_key_conf *keyconf,
155 struct ieee80211_sta *sta, u32 iv32, 155 struct ieee80211_sta *sta, u32 iv32,
156 u16 * phase1key); 156 u16 *phase1key);
157int il4965_sta_tx_modify_enable_tid(struct il_priv *il, int sta_id, int tid); 157int il4965_sta_tx_modify_enable_tid(struct il_priv *il, int sta_id, int tid);
158int il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta, 158int il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta,
159 int tid, u16 ssn); 159 int tid, u16 ssn);
@@ -195,7 +195,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw,
195 struct ieee80211_vif *vif, 195 struct ieee80211_vif *vif,
196 struct ieee80211_key_conf *keyconf, 196 struct ieee80211_key_conf *keyconf,
197 struct ieee80211_sta *sta, u32 iv32, 197 struct ieee80211_sta *sta, u32 iv32,
198 u16 * phase1key); 198 u16 *phase1key);
199int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 199int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
200 enum ieee80211_ampdu_mlme_action action, 200 enum ieee80211_ampdu_mlme_action action,
201 struct ieee80211_sta *sta, u16 tid, u16 * ssn, 201 struct ieee80211_sta *sta, u16 tid, u16 * ssn,
@@ -949,31 +949,31 @@ void il4965_calib_free_results(struct il_priv *il);
949 949
950/* Debug */ 950/* Debug */
951#ifdef CONFIG_IWLEGACY_DEBUGFS 951#ifdef CONFIG_IWLEGACY_DEBUGFS
952ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf, 952ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
953 size_t count, loff_t * ppos); 953 size_t count, loff_t *ppos);
954ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf, 954ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
955 size_t count, loff_t * ppos); 955 size_t count, loff_t *ppos);
956ssize_t il4965_ucode_general_stats_read(struct file *file, 956ssize_t il4965_ucode_general_stats_read(struct file *file,
957 char __user * user_buf, size_t count, 957 char __user *user_buf, size_t count,
958 loff_t * ppos); 958 loff_t *ppos);
959#else 959#else
960static ssize_t 960static ssize_t
961il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf, 961il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
962 size_t count, loff_t * ppos) 962 size_t count, loff_t *ppos)
963{ 963{
964 return 0; 964 return 0;
965} 965}
966 966
967static ssize_t 967static ssize_t
968il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf, 968il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
969 size_t count, loff_t * ppos) 969 size_t count, loff_t *ppos)
970{ 970{
971 return 0; 971 return 0;
972} 972}
973 973
974static ssize_t 974static ssize_t
975il4965_ucode_general_stats_read(struct file *file, char __user * user_buf, 975il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
976 size_t count, loff_t * ppos) 976 size_t count, loff_t *ppos)
977{ 977{
978 return 0; 978 return 0;
979} 979}
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 2e1bbb2e8464..7e2924f332a7 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -92,7 +92,6 @@ il_get_cmd_string(u8 cmd)
92 92
93 } 93 }
94} 94}
95
96EXPORT_SYMBOL(il_get_cmd_string); 95EXPORT_SYMBOL(il_get_cmd_string);
97 96
98#define HOST_COMPLETE_TIMEOUT (HZ / 2) 97#define HOST_COMPLETE_TIMEOUT (HZ / 2)
@@ -231,7 +230,6 @@ fail:
231out: 230out:
232 return ret; 231 return ret;
233} 232}
234
235EXPORT_SYMBOL(il_send_cmd_sync); 233EXPORT_SYMBOL(il_send_cmd_sync);
236 234
237int 235int
@@ -242,7 +240,6 @@ il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd)
242 240
243 return il_send_cmd_sync(il, cmd); 241 return il_send_cmd_sync(il, cmd);
244} 242}
245
246EXPORT_SYMBOL(il_send_cmd); 243EXPORT_SYMBOL(il_send_cmd);
247 244
248int 245int
@@ -256,14 +253,13 @@ il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len, const void *data)
256 253
257 return il_send_cmd_sync(il, &cmd); 254 return il_send_cmd_sync(il, &cmd);
258} 255}
259
260EXPORT_SYMBOL(il_send_cmd_pdu); 256EXPORT_SYMBOL(il_send_cmd_pdu);
261 257
262int 258int
263il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data, 259il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
264 void (*callback) (struct il_priv * il, 260 void (*callback) (struct il_priv *il,
265 struct il_device_cmd * cmd, 261 struct il_device_cmd *cmd,
266 struct il_rx_pkt * pkt)) 262 struct il_rx_pkt *pkt))
267{ 263{
268 struct il_host_cmd cmd = { 264 struct il_host_cmd cmd = {
269 .id = id, 265 .id = id,
@@ -276,7 +272,6 @@ il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
276 272
277 return il_send_cmd_async(il, &cmd); 273 return il_send_cmd_async(il, &cmd);
278} 274}
279
280EXPORT_SYMBOL(il_send_cmd_pdu_async); 275EXPORT_SYMBOL(il_send_cmd_pdu_async);
281 276
282/* default: IL_LED_BLINK(0) using blinking idx table */ 277/* default: IL_LED_BLINK(0) using blinking idx table */
@@ -299,16 +294,16 @@ MODULE_PARM_DESC(led_mode,
299 * <=0 SOLID ON 294 * <=0 SOLID ON
300 */ 295 */
301static const struct ieee80211_tpt_blink il_blink[] = { 296static const struct ieee80211_tpt_blink il_blink[] = {
302 {.throughput = 0,.blink_time = 334}, 297 {.throughput = 0, .blink_time = 334},
303 {.throughput = 1 * 1024 - 1,.blink_time = 260}, 298 {.throughput = 1 * 1024 - 1, .blink_time = 260},
304 {.throughput = 5 * 1024 - 1,.blink_time = 220}, 299 {.throughput = 5 * 1024 - 1, .blink_time = 220},
305 {.throughput = 10 * 1024 - 1,.blink_time = 190}, 300 {.throughput = 10 * 1024 - 1, .blink_time = 190},
306 {.throughput = 20 * 1024 - 1,.blink_time = 170}, 301 {.throughput = 20 * 1024 - 1, .blink_time = 170},
307 {.throughput = 50 * 1024 - 1,.blink_time = 150}, 302 {.throughput = 50 * 1024 - 1, .blink_time = 150},
308 {.throughput = 70 * 1024 - 1,.blink_time = 130}, 303 {.throughput = 70 * 1024 - 1, .blink_time = 130},
309 {.throughput = 100 * 1024 - 1,.blink_time = 110}, 304 {.throughput = 100 * 1024 - 1, .blink_time = 110},
310 {.throughput = 200 * 1024 - 1,.blink_time = 80}, 305 {.throughput = 200 * 1024 - 1, .blink_time = 80},
311 {.throughput = 300 * 1024 - 1,.blink_time = 50}, 306 {.throughput = 300 * 1024 - 1, .blink_time = 50},
312}; 307};
313 308
314/* 309/*
@@ -433,7 +428,6 @@ il_leds_init(struct il_priv *il)
433 428
434 il->led_registered = true; 429 il->led_registered = true;
435} 430}
436
437EXPORT_SYMBOL(il_leds_init); 431EXPORT_SYMBOL(il_leds_init);
438 432
439void 433void
@@ -445,7 +439,6 @@ il_leds_exit(struct il_priv *il)
445 led_classdev_unregister(&il->led); 439 led_classdev_unregister(&il->led);
446 kfree(il->led.name); 440 kfree(il->led.name);
447} 441}
448
449EXPORT_SYMBOL(il_leds_exit); 442EXPORT_SYMBOL(il_leds_exit);
450 443
451/************************** EEPROM BANDS **************************** 444/************************** EEPROM BANDS ****************************
@@ -540,17 +533,15 @@ il_eeprom_query_addr(const struct il_priv *il, size_t offset)
540 BUG_ON(offset >= il->cfg->base_params->eeprom_size); 533 BUG_ON(offset >= il->cfg->base_params->eeprom_size);
541 return &il->eeprom[offset]; 534 return &il->eeprom[offset];
542} 535}
543
544EXPORT_SYMBOL(il_eeprom_query_addr); 536EXPORT_SYMBOL(il_eeprom_query_addr);
545 537
546u16 538u16
547il_eeprom_query16(const struct il_priv * il, size_t offset) 539il_eeprom_query16(const struct il_priv *il, size_t offset)
548{ 540{
549 if (!il->eeprom) 541 if (!il->eeprom)
550 return 0; 542 return 0;
551 return (u16) il->eeprom[offset] | ((u16) il->eeprom[offset + 1] << 8); 543 return (u16) il->eeprom[offset] | ((u16) il->eeprom[offset + 1] << 8);
552} 544}
553
554EXPORT_SYMBOL(il_eeprom_query16); 545EXPORT_SYMBOL(il_eeprom_query16);
555 546
556/** 547/**
@@ -631,7 +622,6 @@ err:
631alloc_err: 622alloc_err:
632 return ret; 623 return ret;
633} 624}
634
635EXPORT_SYMBOL(il_eeprom_init); 625EXPORT_SYMBOL(il_eeprom_init);
636 626
637void 627void
@@ -640,14 +630,13 @@ il_eeprom_free(struct il_priv *il)
640 kfree(il->eeprom); 630 kfree(il->eeprom);
641 il->eeprom = NULL; 631 il->eeprom = NULL;
642} 632}
643
644EXPORT_SYMBOL(il_eeprom_free); 633EXPORT_SYMBOL(il_eeprom_free);
645 634
646static void 635static void
647il_init_band_reference(const struct il_priv *il, int eep_band, 636il_init_band_reference(const struct il_priv *il, int eep_band,
648 int *eeprom_ch_count, 637 int *eeprom_ch_count,
649 const struct il_eeprom_channel **eeprom_ch_info, 638 const struct il_eeprom_channel **eeprom_ch_info,
650 const u8 ** eeprom_ch_idx) 639 const u8 **eeprom_ch_idx)
651{ 640{
652 u32 offset = 641 u32 offset =
653 il->cfg->ops->lib->eeprom_ops.regulatory_bands[eep_band - 1]; 642 il->cfg->ops->lib->eeprom_ops.regulatory_bands[eep_band - 1];
@@ -885,7 +874,6 @@ il_init_channel_map(struct il_priv *il)
885 874
886 return 0; 875 return 0;
887} 876}
888
889EXPORT_SYMBOL(il_init_channel_map); 877EXPORT_SYMBOL(il_init_channel_map);
890 878
891/* 879/*
@@ -897,7 +885,6 @@ il_free_channel_map(struct il_priv *il)
897 kfree(il->channel_info); 885 kfree(il->channel_info);
898 il->channel_count = 0; 886 il->channel_count = 0;
899} 887}
900
901EXPORT_SYMBOL(il_free_channel_map); 888EXPORT_SYMBOL(il_free_channel_map);
902 889
903/** 890/**
@@ -928,7 +915,6 @@ il_get_channel_info(const struct il_priv *il, enum ieee80211_band band,
928 915
929 return NULL; 916 return NULL;
930} 917}
931
932EXPORT_SYMBOL(il_get_channel_info); 918EXPORT_SYMBOL(il_get_channel_info);
933 919
934/* 920/*
@@ -1033,7 +1019,6 @@ il_power_update_mode(struct il_priv *il, bool force)
1033 il_power_sleep_cam_cmd(il, &cmd); 1019 il_power_sleep_cam_cmd(il, &cmd);
1034 return il_power_set_mode(il, &cmd, force); 1020 return il_power_set_mode(il, &cmd, force);
1035} 1021}
1036
1037EXPORT_SYMBOL(il_power_update_mode); 1022EXPORT_SYMBOL(il_power_update_mode);
1038 1023
1039/* initialize to default */ 1024/* initialize to default */
@@ -1172,7 +1157,6 @@ il_scan_cancel(struct il_priv *il)
1172 queue_work(il->workqueue, &il->abort_scan); 1157 queue_work(il->workqueue, &il->abort_scan);
1173 return 0; 1158 return 0;
1174} 1159}
1175
1176EXPORT_SYMBOL(il_scan_cancel); 1160EXPORT_SYMBOL(il_scan_cancel);
1177 1161
1178/** 1162/**
@@ -1199,7 +1183,6 @@ il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
1199 1183
1200 return test_bit(S_SCAN_HW, &il->status); 1184 return test_bit(S_SCAN_HW, &il->status);
1201} 1185}
1202
1203EXPORT_SYMBOL(il_scan_cancel_timeout); 1186EXPORT_SYMBOL(il_scan_cancel_timeout);
1204 1187
1205/* Service response to C_SCAN (0x80) */ 1188/* Service response to C_SCAN (0x80) */
@@ -1279,7 +1262,6 @@ il_setup_rx_scan_handlers(struct il_priv *il)
1279 il->handlers[N_SCAN_RESULTS] = il_hdl_scan_results; 1262 il->handlers[N_SCAN_RESULTS] = il_hdl_scan_results;
1280 il->handlers[N_SCAN_COMPLETE] = il_hdl_scan_complete; 1263 il->handlers[N_SCAN_COMPLETE] = il_hdl_scan_complete;
1281} 1264}
1282
1283EXPORT_SYMBOL(il_setup_rx_scan_handlers); 1265EXPORT_SYMBOL(il_setup_rx_scan_handlers);
1284 1266
1285inline u16 1267inline u16
@@ -1293,12 +1275,11 @@ il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
1293 return IL_ACTIVE_DWELL_TIME_24 + 1275 return IL_ACTIVE_DWELL_TIME_24 +
1294 IL_ACTIVE_DWELL_FACTOR_24GHZ * (n_probes + 1); 1276 IL_ACTIVE_DWELL_FACTOR_24GHZ * (n_probes + 1);
1295} 1277}
1296
1297EXPORT_SYMBOL(il_get_active_dwell_time); 1278EXPORT_SYMBOL(il_get_active_dwell_time);
1298 1279
1299u16 1280u16
1300il_get_passive_dwell_time(struct il_priv * il, enum ieee80211_band band, 1281il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band,
1301 struct ieee80211_vif * vif) 1282 struct ieee80211_vif *vif)
1302{ 1283{
1303 struct il_rxon_context *ctx = &il->ctx; 1284 struct il_rxon_context *ctx = &il->ctx;
1304 u16 value; 1285 u16 value;
@@ -1324,7 +1305,6 @@ il_get_passive_dwell_time(struct il_priv * il, enum ieee80211_band band,
1324 1305
1325 return passive; 1306 return passive;
1326} 1307}
1327
1328EXPORT_SYMBOL(il_get_passive_dwell_time); 1308EXPORT_SYMBOL(il_get_passive_dwell_time);
1329 1309
1330void 1310void
@@ -1336,7 +1316,6 @@ il_init_scan_params(struct il_priv *il)
1336 if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ]) 1316 if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ])
1337 il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; 1317 il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx;
1338} 1318}
1339
1340EXPORT_SYMBOL(il_init_scan_params); 1319EXPORT_SYMBOL(il_init_scan_params);
1341 1320
1342static int 1321static int
@@ -1417,7 +1396,6 @@ out_unlock:
1417 1396
1418 return ret; 1397 return ret;
1419} 1398}
1420
1421EXPORT_SYMBOL(il_mac_hw_scan); 1399EXPORT_SYMBOL(il_mac_hw_scan);
1422 1400
1423static void 1401static void
@@ -1442,7 +1420,7 @@ il_bg_scan_check(struct work_struct *data)
1442 1420
1443u16 1421u16
1444il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, 1422il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
1445 const u8 * ta, const u8 * ies, int ie_len, int left) 1423 const u8 *ta, const u8 *ies, int ie_len, int left)
1446{ 1424{
1447 int len = 0; 1425 int len = 0;
1448 u8 *pos = NULL; 1426 u8 *pos = NULL;
@@ -1483,7 +1461,6 @@ il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
1483 1461
1484 return (u16) len; 1462 return (u16) len;
1485} 1463}
1486
1487EXPORT_SYMBOL(il_fill_probe_req); 1464EXPORT_SYMBOL(il_fill_probe_req);
1488 1465
1489static void 1466static void
@@ -1548,7 +1525,6 @@ il_setup_scan_deferred_work(struct il_priv *il)
1548 INIT_WORK(&il->abort_scan, il_bg_abort_scan); 1525 INIT_WORK(&il->abort_scan, il_bg_abort_scan);
1549 INIT_DELAYED_WORK(&il->scan_check, il_bg_scan_check); 1526 INIT_DELAYED_WORK(&il->scan_check, il_bg_scan_check);
1550} 1527}
1551
1552EXPORT_SYMBOL(il_setup_scan_deferred_work); 1528EXPORT_SYMBOL(il_setup_scan_deferred_work);
1553 1529
1554void 1530void
@@ -1563,7 +1539,6 @@ il_cancel_scan_deferred_work(struct il_priv *il)
1563 mutex_unlock(&il->mutex); 1539 mutex_unlock(&il->mutex);
1564 } 1540 }
1565} 1541}
1566
1567EXPORT_SYMBOL(il_cancel_scan_deferred_work); 1542EXPORT_SYMBOL(il_cancel_scan_deferred_work);
1568 1543
1569/* il->sta_lock must be held */ 1544/* il->sta_lock must be held */
@@ -1693,7 +1668,6 @@ il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags)
1693 1668
1694 return ret; 1669 return ret;
1695} 1670}
1696
1697EXPORT_SYMBOL(il_send_add_sta); 1671EXPORT_SYMBOL(il_send_add_sta);
1698 1672
1699static void 1673static void
@@ -1709,10 +1683,9 @@ il_set_ht_add_station(struct il_priv *il, u8 idx, struct ieee80211_sta *sta,
1709 1683
1710 mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; 1684 mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2;
1711 D_ASSOC("spatial multiplexing power save mode: %s\n", 1685 D_ASSOC("spatial multiplexing power save mode: %s\n",
1712 (mimo_ps_mode == 1686 (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? "static" :
1713 WLAN_HT_CAP_SM_PS_STATIC) ? "static" : (mimo_ps_mode == 1687 (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? "dynamic" :
1714 WLAN_HT_CAP_SM_PS_DYNAMIC) 1688 "disabled");
1715 ? "dynamic" : "disabled");
1716 1689
1717 sta_flags = il->stations[idx].sta.station_flags; 1690 sta_flags = il->stations[idx].sta.station_flags;
1718 1691
@@ -1756,8 +1729,8 @@ done:
1756 * should be called with sta_lock held 1729 * should be called with sta_lock held
1757 */ 1730 */
1758u8 1731u8
1759il_prep_station(struct il_priv * il, struct il_rxon_context * ctx, 1732il_prep_station(struct il_priv *il, struct il_rxon_context *ctx,
1760 const u8 * addr, bool is_ap, struct ieee80211_sta * sta) 1733 const u8 *addr, bool is_ap, struct ieee80211_sta *sta)
1761{ 1734{
1762 struct il_station_entry *station; 1735 struct il_station_entry *station;
1763 int i; 1736 int i;
@@ -1841,7 +1814,6 @@ il_prep_station(struct il_priv * il, struct il_rxon_context * ctx,
1841 return sta_id; 1814 return sta_id;
1842 1815
1843} 1816}
1844
1845EXPORT_SYMBOL_GPL(il_prep_station); 1817EXPORT_SYMBOL_GPL(il_prep_station);
1846 1818
1847#define STA_WAIT_TIMEOUT (HZ/2) 1819#define STA_WAIT_TIMEOUT (HZ/2)
@@ -1851,8 +1823,8 @@ EXPORT_SYMBOL_GPL(il_prep_station);
1851 */ 1823 */
1852int 1824int
1853il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx, 1825il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx,
1854 const u8 * addr, bool is_ap, struct ieee80211_sta *sta, 1826 const u8 *addr, bool is_ap, struct ieee80211_sta *sta,
1855 u8 * sta_id_r) 1827 u8 *sta_id_r)
1856{ 1828{
1857 unsigned long flags_spin; 1829 unsigned long flags_spin;
1858 int ret = 0; 1830 int ret = 0;
@@ -1905,7 +1877,6 @@ il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx,
1905 *sta_id_r = sta_id; 1877 *sta_id_r = sta_id;
1906 return ret; 1878 return ret;
1907} 1879}
1908
1909EXPORT_SYMBOL(il_add_station_common); 1880EXPORT_SYMBOL(il_add_station_common);
1910 1881
1911/** 1882/**
@@ -2038,7 +2009,6 @@ out_err:
2038 spin_unlock_irqrestore(&il->sta_lock, flags); 2009 spin_unlock_irqrestore(&il->sta_lock, flags);
2039 return -EINVAL; 2010 return -EINVAL;
2040} 2011}
2041
2042EXPORT_SYMBOL_GPL(il_remove_station); 2012EXPORT_SYMBOL_GPL(il_remove_station);
2043 2013
2044/** 2014/**
@@ -2074,7 +2044,6 @@ il_clear_ucode_stations(struct il_priv *il, struct il_rxon_context *ctx)
2074 if (!cleared) 2044 if (!cleared)
2075 D_INFO("No active stations found to be cleared\n"); 2045 D_INFO("No active stations found to be cleared\n");
2076} 2046}
2077
2078EXPORT_SYMBOL(il_clear_ucode_stations); 2047EXPORT_SYMBOL(il_clear_ucode_stations);
2079 2048
2080/** 2049/**
@@ -2156,7 +2125,6 @@ il_restore_stations(struct il_priv *il, struct il_rxon_context *ctx)
2156 else 2125 else
2157 D_INFO("Restoring all known stations" " .... complete.\n"); 2126 D_INFO("Restoring all known stations" " .... complete.\n");
2158} 2127}
2159
2160EXPORT_SYMBOL(il_restore_stations); 2128EXPORT_SYMBOL(il_restore_stations);
2161 2129
2162int 2130int
@@ -2170,7 +2138,6 @@ il_get_free_ucode_key_idx(struct il_priv *il)
2170 2138
2171 return WEP_INVALID_OFFSET; 2139 return WEP_INVALID_OFFSET;
2172} 2140}
2173
2174EXPORT_SYMBOL(il_get_free_ucode_key_idx); 2141EXPORT_SYMBOL(il_get_free_ucode_key_idx);
2175 2142
2176void 2143void
@@ -2192,7 +2159,6 @@ il_dealloc_bcast_stations(struct il_priv *il)
2192 } 2159 }
2193 spin_unlock_irqrestore(&il->sta_lock, flags); 2160 spin_unlock_irqrestore(&il->sta_lock, flags);
2194} 2161}
2195
2196EXPORT_SYMBOL_GPL(il_dealloc_bcast_stations); 2162EXPORT_SYMBOL_GPL(il_dealloc_bcast_stations);
2197 2163
2198#ifdef CONFIG_IWLEGACY_DEBUG 2164#ifdef CONFIG_IWLEGACY_DEBUG
@@ -2299,7 +2265,6 @@ il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx,
2299 } 2265 }
2300 return ret; 2266 return ret;
2301} 2267}
2302
2303EXPORT_SYMBOL(il_send_lq_cmd); 2268EXPORT_SYMBOL(il_send_lq_cmd);
2304 2269
2305int 2270int
@@ -2319,7 +2284,6 @@ il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2319 mutex_unlock(&il->mutex); 2284 mutex_unlock(&il->mutex);
2320 return ret; 2285 return ret;
2321} 2286}
2322
2323EXPORT_SYMBOL(il_mac_sta_remove); 2287EXPORT_SYMBOL(il_mac_sta_remove);
2324 2288
2325/************************** RX-FUNCTIONS ****************************/ 2289/************************** RX-FUNCTIONS ****************************/
@@ -2404,7 +2368,6 @@ il_rx_queue_space(const struct il_rx_queue *q)
2404 s = 0; 2368 s = 0;
2405 return s; 2369 return s;
2406} 2370}
2407
2408EXPORT_SYMBOL(il_rx_queue_space); 2371EXPORT_SYMBOL(il_rx_queue_space);
2409 2372
2410/** 2373/**
@@ -2449,7 +2412,6 @@ il_rx_queue_update_write_ptr(struct il_priv *il, struct il_rx_queue *q)
2449exit_unlock: 2412exit_unlock:
2450 spin_unlock_irqrestore(&q->lock, flags); 2413 spin_unlock_irqrestore(&q->lock, flags);
2451} 2414}
2452
2453EXPORT_SYMBOL(il_rx_queue_update_write_ptr); 2415EXPORT_SYMBOL(il_rx_queue_update_write_ptr);
2454 2416
2455int 2417int
@@ -2494,7 +2456,6 @@ err_rb:
2494err_bd: 2456err_bd:
2495 return -ENOMEM; 2457 return -ENOMEM;
2496} 2458}
2497
2498EXPORT_SYMBOL(il_rx_queue_alloc); 2459EXPORT_SYMBOL(il_rx_queue_alloc);
2499 2460
2500void 2461void
@@ -2511,7 +2472,6 @@ il_hdl_spectrum_measurement(struct il_priv *il, struct il_rx_buf *rxb)
2511 memcpy(&il->measure_report, report, sizeof(*report)); 2472 memcpy(&il->measure_report, report, sizeof(*report));
2512 il->measurement_status |= MEASUREMENT_READY; 2473 il->measurement_status |= MEASUREMENT_READY;
2513} 2474}
2514
2515EXPORT_SYMBOL(il_hdl_spectrum_measurement); 2475EXPORT_SYMBOL(il_hdl_spectrum_measurement);
2516 2476
2517/* 2477/*
@@ -2563,7 +2523,6 @@ il_set_decrypted_flag(struct il_priv *il, struct ieee80211_hdr *hdr,
2563 } 2523 }
2564 return 0; 2524 return 0;
2565} 2525}
2566
2567EXPORT_SYMBOL(il_set_decrypted_flag); 2526EXPORT_SYMBOL(il_set_decrypted_flag);
2568 2527
2569/** 2528/**
@@ -2604,7 +2563,6 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
2604 _il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8)); 2563 _il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8));
2605 txq->need_update = 0; 2564 txq->need_update = 0;
2606} 2565}
2607
2608EXPORT_SYMBOL(il_txq_update_write_ptr); 2566EXPORT_SYMBOL(il_txq_update_write_ptr);
2609 2567
2610/** 2568/**
@@ -2624,7 +2582,6 @@ il_tx_queue_unmap(struct il_priv *il, int txq_id)
2624 q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd); 2582 q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd);
2625 } 2583 }
2626} 2584}
2627
2628EXPORT_SYMBOL(il_tx_queue_unmap); 2585EXPORT_SYMBOL(il_tx_queue_unmap);
2629 2586
2630/** 2587/**
@@ -2666,7 +2623,6 @@ il_tx_queue_free(struct il_priv *il, int txq_id)
2666 /* 0-fill queue descriptor structure */ 2623 /* 0-fill queue descriptor structure */
2667 memset(txq, 0, sizeof(*txq)); 2624 memset(txq, 0, sizeof(*txq));
2668} 2625}
2669
2670EXPORT_SYMBOL(il_tx_queue_free); 2626EXPORT_SYMBOL(il_tx_queue_free);
2671 2627
2672/** 2628/**
@@ -2705,7 +2661,6 @@ il_cmd_queue_unmap(struct il_priv *il)
2705 txq->meta[i].flags = 0; 2661 txq->meta[i].flags = 0;
2706 } 2662 }
2707} 2663}
2708
2709EXPORT_SYMBOL(il_cmd_queue_unmap); 2664EXPORT_SYMBOL(il_cmd_queue_unmap);
2710 2665
2711/** 2666/**
@@ -2743,7 +2698,6 @@ il_cmd_queue_free(struct il_priv *il)
2743 /* 0-fill queue descriptor structure */ 2698 /* 0-fill queue descriptor structure */
2744 memset(txq, 0, sizeof(*txq)); 2699 memset(txq, 0, sizeof(*txq));
2745} 2700}
2746
2747EXPORT_SYMBOL(il_cmd_queue_free); 2701EXPORT_SYMBOL(il_cmd_queue_free);
2748 2702
2749/*************** DMA-QUEUE-GENERAL-FUNCTIONS ***** 2703/*************** DMA-QUEUE-GENERAL-FUNCTIONS *****
@@ -2785,7 +2739,6 @@ il_queue_space(const struct il_queue *q)
2785 s = 0; 2739 s = 0;
2786 return s; 2740 return s;
2787} 2741}
2788
2789EXPORT_SYMBOL(il_queue_space); 2742EXPORT_SYMBOL(il_queue_space);
2790 2743
2791 2744
@@ -2940,7 +2893,6 @@ out_free_arrays:
2940 2893
2941 return -ENOMEM; 2894 return -ENOMEM;
2942} 2895}
2943
2944EXPORT_SYMBOL(il_tx_queue_init); 2896EXPORT_SYMBOL(il_tx_queue_init);
2945 2897
2946void 2898void
@@ -2962,7 +2914,6 @@ il_tx_queue_reset(struct il_priv *il, struct il_tx_queue *txq, int slots_num,
2962 /* Tell device where to find queue */ 2914 /* Tell device where to find queue */
2963 il->cfg->ops->lib->txq_init(il, txq); 2915 il->cfg->ops->lib->txq_init(il, txq);
2964} 2916}
2965
2966EXPORT_SYMBOL(il_tx_queue_reset); 2917EXPORT_SYMBOL(il_tx_queue_reset);
2967 2918
2968/*************** HOST COMMAND QUEUE FUNCTIONS *****/ 2919/*************** HOST COMMAND QUEUE FUNCTIONS *****/
@@ -3219,7 +3170,6 @@ u32 il_debug_level;
3219EXPORT_SYMBOL(il_debug_level); 3170EXPORT_SYMBOL(il_debug_level);
3220 3171
3221const u8 il_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 3172const u8 il_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
3222
3223EXPORT_SYMBOL(il_bcast_addr); 3173EXPORT_SYMBOL(il_bcast_addr);
3224 3174
3225/* This function both allocates and initializes hw and il. */ 3175/* This function both allocates and initializes hw and il. */
@@ -3244,7 +3194,6 @@ il_alloc_all(struct il_cfg *cfg)
3244out: 3194out:
3245 return hw; 3195 return hw;
3246} 3196}
3247
3248EXPORT_SYMBOL(il_alloc_all); 3197EXPORT_SYMBOL(il_alloc_all);
3249 3198
3250#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */ 3199#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
@@ -3418,7 +3367,6 @@ il_init_geos(struct il_priv *il)
3418 3367
3419 return 0; 3368 return 0;
3420} 3369}
3421
3422EXPORT_SYMBOL(il_init_geos); 3370EXPORT_SYMBOL(il_init_geos);
3423 3371
3424/* 3372/*
@@ -3431,7 +3379,6 @@ il_free_geos(struct il_priv *il)
3431 kfree(il->ieee_rates); 3379 kfree(il->ieee_rates);
3432 clear_bit(S_GEO_CONFIGURED, &il->status); 3380 clear_bit(S_GEO_CONFIGURED, &il->status);
3433} 3381}
3434
3435EXPORT_SYMBOL(il_free_geos); 3382EXPORT_SYMBOL(il_free_geos);
3436 3383
3437static bool 3384static bool
@@ -3455,8 +3402,8 @@ il_is_channel_extension(struct il_priv *il, enum ieee80211_band band,
3455} 3402}
3456 3403
3457bool 3404bool
3458il_is_ht40_tx_allowed(struct il_priv * il, struct il_rxon_context * ctx, 3405il_is_ht40_tx_allowed(struct il_priv *il, struct il_rxon_context *ctx,
3459 struct ieee80211_sta_ht_cap * ht_cap) 3406 struct ieee80211_sta_ht_cap *ht_cap)
3460{ 3407{
3461 if (!ctx->ht.enabled || !ctx->ht.is_40mhz) 3408 if (!ctx->ht.enabled || !ctx->ht.is_40mhz)
3462 return false; 3409 return false;
@@ -3477,7 +3424,6 @@ il_is_ht40_tx_allowed(struct il_priv * il, struct il_rxon_context * ctx,
3477 le16_to_cpu(ctx->staging.channel), 3424 le16_to_cpu(ctx->staging.channel),
3478 ctx->ht.extension_chan_offset); 3425 ctx->ht.extension_chan_offset);
3479} 3426}
3480
3481EXPORT_SYMBOL(il_is_ht40_tx_allowed); 3427EXPORT_SYMBOL(il_is_ht40_tx_allowed);
3482 3428
3483static u16 3429static u16
@@ -3561,7 +3507,6 @@ il_send_rxon_timing(struct il_priv *il, struct il_rxon_context *ctx)
3561 return il_send_cmd_pdu(il, ctx->rxon_timing_cmd, sizeof(ctx->timing), 3507 return il_send_cmd_pdu(il, ctx->rxon_timing_cmd, sizeof(ctx->timing),
3562 &ctx->timing); 3508 &ctx->timing);
3563} 3509}
3564
3565EXPORT_SYMBOL(il_send_rxon_timing); 3510EXPORT_SYMBOL(il_send_rxon_timing);
3566 3511
3567void 3512void
@@ -3576,7 +3521,6 @@ il_set_rxon_hwcrypto(struct il_priv *il, struct il_rxon_context *ctx,
3576 rxon->filter_flags |= RXON_FILTER_DIS_DECRYPT_MSK; 3521 rxon->filter_flags |= RXON_FILTER_DIS_DECRYPT_MSK;
3577 3522
3578} 3523}
3579
3580EXPORT_SYMBOL(il_set_rxon_hwcrypto); 3524EXPORT_SYMBOL(il_set_rxon_hwcrypto);
3581 3525
3582/* validate RXON structure is valid */ 3526/* validate RXON structure is valid */
@@ -3650,7 +3594,6 @@ il_check_rxon_cmd(struct il_priv *il, struct il_rxon_context *ctx)
3650 } 3594 }
3651 return 0; 3595 return 0;
3652} 3596}
3653
3654EXPORT_SYMBOL(il_check_rxon_cmd); 3597EXPORT_SYMBOL(il_check_rxon_cmd);
3655 3598
3656/** 3599/**
@@ -3713,11 +3656,10 @@ il_full_rxon_required(struct il_priv *il, struct il_rxon_context *ctx)
3713 3656
3714 return 0; 3657 return 0;
3715} 3658}
3716
3717EXPORT_SYMBOL(il_full_rxon_required); 3659EXPORT_SYMBOL(il_full_rxon_required);
3718 3660
3719u8 3661u8
3720il_get_lowest_plcp(struct il_priv * il, struct il_rxon_context * ctx) 3662il_get_lowest_plcp(struct il_priv *il, struct il_rxon_context *ctx)
3721{ 3663{
3722 /* 3664 /*
3723 * Assign the lowest rate -- should really get this from 3665 * Assign the lowest rate -- should really get this from
@@ -3728,7 +3670,6 @@ il_get_lowest_plcp(struct il_priv * il, struct il_rxon_context * ctx)
3728 else 3670 else
3729 return RATE_6M_PLCP; 3671 return RATE_6M_PLCP;
3730} 3672}
3731
3732EXPORT_SYMBOL(il_get_lowest_plcp); 3673EXPORT_SYMBOL(il_get_lowest_plcp);
3733 3674
3734static void 3675static void
@@ -3803,7 +3744,6 @@ il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
3803{ 3744{
3804 _il_set_rxon_ht(il, ht_conf, &il->ctx); 3745 _il_set_rxon_ht(il, ht_conf, &il->ctx);
3805} 3746}
3806
3807EXPORT_SYMBOL(il_set_rxon_ht); 3747EXPORT_SYMBOL(il_set_rxon_ht);
3808 3748
3809/* Return valid, unused, channel for a passive scan to reset the RF */ 3749/* Return valid, unused, channel for a passive scan to reset the RF */
@@ -3835,7 +3775,6 @@ il_get_single_channel_number(struct il_priv *il, enum ieee80211_band band)
3835 3775
3836 return channel; 3776 return channel;
3837} 3777}
3838
3839EXPORT_SYMBOL(il_get_single_channel_number); 3778EXPORT_SYMBOL(il_get_single_channel_number);
3840 3779
3841/** 3780/**
@@ -3867,7 +3806,6 @@ il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch,
3867 3806
3868 return 0; 3807 return 0;
3869} 3808}
3870
3871EXPORT_SYMBOL(il_set_rxon_channel); 3809EXPORT_SYMBOL(il_set_rxon_channel);
3872 3810
3873void 3811void
@@ -3891,7 +3829,6 @@ il_set_flags_for_band(struct il_priv *il, struct il_rxon_context *ctx,
3891 ctx->staging.flags &= ~RXON_FLG_CCK_MSK; 3829 ctx->staging.flags &= ~RXON_FLG_CCK_MSK;
3892 } 3830 }
3893} 3831}
3894
3895EXPORT_SYMBOL(il_set_flags_for_band); 3832EXPORT_SYMBOL(il_set_flags_for_band);
3896 3833
3897/* 3834/*
@@ -3962,7 +3899,6 @@ il_connection_init_rx_config(struct il_priv *il, struct il_rxon_context *ctx)
3962 ctx->staging.ofdm_ht_single_stream_basic_rates = 0xff; 3899 ctx->staging.ofdm_ht_single_stream_basic_rates = 0xff;
3963 ctx->staging.ofdm_ht_dual_stream_basic_rates = 0xff; 3900 ctx->staging.ofdm_ht_dual_stream_basic_rates = 0xff;
3964} 3901}
3965
3966EXPORT_SYMBOL(il_connection_init_rx_config); 3902EXPORT_SYMBOL(il_connection_init_rx_config);
3967 3903
3968void 3904void
@@ -3994,7 +3930,6 @@ il_set_rate(struct il_priv *il)
3994 il->ctx.staging.ofdm_basic_rates = 3930 il->ctx.staging.ofdm_basic_rates =
3995 (IL_OFDM_BASIC_RATES_MASK >> IL_FIRST_OFDM_RATE) & 0xFF; 3931 (IL_OFDM_BASIC_RATES_MASK >> IL_FIRST_OFDM_RATE) & 0xFF;
3996} 3932}
3997
3998EXPORT_SYMBOL(il_set_rate); 3933EXPORT_SYMBOL(il_set_rate);
3999 3934
4000void 3935void
@@ -4008,7 +3943,6 @@ il_chswitch_done(struct il_priv *il, bool is_success)
4008 if (test_and_clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status)) 3943 if (test_and_clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
4009 ieee80211_chswitch_done(ctx->vif, is_success); 3944 ieee80211_chswitch_done(ctx->vif, is_success);
4010} 3945}
4011
4012EXPORT_SYMBOL(il_chswitch_done); 3946EXPORT_SYMBOL(il_chswitch_done);
4013 3947
4014void 3948void
@@ -4034,7 +3968,6 @@ il_hdl_csa(struct il_priv *il, struct il_rx_buf *rxb)
4034 il_chswitch_done(il, false); 3968 il_chswitch_done(il, false);
4035 } 3969 }
4036} 3970}
4037
4038EXPORT_SYMBOL(il_hdl_csa); 3971EXPORT_SYMBOL(il_hdl_csa);
4039 3972
4040#ifdef CONFIG_IWLEGACY_DEBUG 3973#ifdef CONFIG_IWLEGACY_DEBUG
@@ -4055,7 +3988,6 @@ il_print_rx_config_cmd(struct il_priv *il, struct il_rxon_context *ctx)
4055 D_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr); 3988 D_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
4056 D_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 3989 D_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4057} 3990}
4058
4059EXPORT_SYMBOL(il_print_rx_config_cmd); 3991EXPORT_SYMBOL(il_print_rx_config_cmd);
4060#endif 3992#endif
4061/** 3993/**
@@ -4094,7 +4026,6 @@ il_irq_handle_error(struct il_priv *il)
4094 queue_work(il->workqueue, &il->restart); 4026 queue_work(il->workqueue, &il->restart);
4095 } 4027 }
4096} 4028}
4097
4098EXPORT_SYMBOL(il_irq_handle_error); 4029EXPORT_SYMBOL(il_irq_handle_error);
4099 4030
4100static int 4031static int
@@ -4135,7 +4066,6 @@ il_apm_stop(struct il_priv *il)
4135 */ 4066 */
4136 il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 4067 il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
4137} 4068}
4138
4139EXPORT_SYMBOL(il_apm_stop); 4069EXPORT_SYMBOL(il_apm_stop);
4140 4070
4141/* 4071/*
@@ -4249,7 +4179,6 @@ il_apm_init(struct il_priv *il)
4249out: 4179out:
4250 return ret; 4180 return ret;
4251} 4181}
4252
4253EXPORT_SYMBOL(il_apm_init); 4182EXPORT_SYMBOL(il_apm_init);
4254 4183
4255int 4184int
@@ -4307,7 +4236,6 @@ il_set_tx_power(struct il_priv *il, s8 tx_power, bool force)
4307 } 4236 }
4308 return ret; 4237 return ret;
4309} 4238}
4310
4311EXPORT_SYMBOL(il_set_tx_power); 4239EXPORT_SYMBOL(il_set_tx_power);
4312 4240
4313void 4241void
@@ -4356,7 +4284,7 @@ il_hdl_pm_sleep(struct il_priv *il, struct il_rx_buf *rxb)
4356 struct il_rx_pkt *pkt = rxb_addr(rxb); 4284 struct il_rx_pkt *pkt = rxb_addr(rxb);
4357 struct il_sleep_notification *sleep = &(pkt->u.sleep_notif); 4285 struct il_sleep_notification *sleep = &(pkt->u.sleep_notif);
4358 D_RX("sleep mode: %d, src: %d\n", 4286 D_RX("sleep mode: %d, src: %d\n",
4359 sleep->pm_sleep_mode, sleep->pm_wakeup_src); 4287 sleep->pm_sleep_mode, sleep->pm_wakeup_src);
4360#endif 4288#endif
4361} 4289}
4362EXPORT_SYMBOL(il_hdl_pm_sleep); 4290EXPORT_SYMBOL(il_hdl_pm_sleep);
@@ -4432,7 +4360,6 @@ il_mac_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
4432 D_MAC80211("leave\n"); 4360 D_MAC80211("leave\n");
4433 return 0; 4361 return 0;
4434} 4362}
4435
4436EXPORT_SYMBOL(il_mac_conf_tx); 4363EXPORT_SYMBOL(il_mac_conf_tx);
4437 4364
4438int 4365int
@@ -4442,7 +4369,6 @@ il_mac_tx_last_beacon(struct ieee80211_hw *hw)
4442 4369
4443 return il->ibss_manager == IL_IBSS_MANAGER; 4370 return il->ibss_manager == IL_IBSS_MANAGER;
4444} 4371}
4445
4446EXPORT_SYMBOL_GPL(il_mac_tx_last_beacon); 4372EXPORT_SYMBOL_GPL(il_mac_tx_last_beacon);
4447 4373
4448static int 4374static int
@@ -4529,7 +4455,6 @@ out:
4529 D_MAC80211("leave\n"); 4455 D_MAC80211("leave\n");
4530 return err; 4456 return err;
4531} 4457}
4532
4533EXPORT_SYMBOL(il_mac_add_interface); 4458EXPORT_SYMBOL(il_mac_add_interface);
4534 4459
4535static void 4460static void
@@ -4573,7 +4498,6 @@ il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
4573 D_MAC80211("leave\n"); 4498 D_MAC80211("leave\n");
4574 4499
4575} 4500}
4576
4577EXPORT_SYMBOL(il_mac_remove_interface); 4501EXPORT_SYMBOL(il_mac_remove_interface);
4578 4502
4579int 4503int
@@ -4589,7 +4513,6 @@ il_alloc_txq_mem(struct il_priv *il)
4589 } 4513 }
4590 return 0; 4514 return 0;
4591} 4515}
4592
4593EXPORT_SYMBOL(il_alloc_txq_mem); 4516EXPORT_SYMBOL(il_alloc_txq_mem);
4594 4517
4595void 4518void
@@ -4598,7 +4521,6 @@ il_txq_mem(struct il_priv *il)
4598 kfree(il->txq); 4521 kfree(il->txq);
4599 il->txq = NULL; 4522 il->txq = NULL;
4600} 4523}
4601
4602EXPORT_SYMBOL(il_txq_mem); 4524EXPORT_SYMBOL(il_txq_mem);
4603 4525
4604#ifdef CONFIG_IWLEGACY_DEBUGFS 4526#ifdef CONFIG_IWLEGACY_DEBUGFS
@@ -4638,7 +4560,6 @@ il_alloc_traffic_mem(struct il_priv *il)
4638 il_reset_traffic_log(il); 4560 il_reset_traffic_log(il);
4639 return 0; 4561 return 0;
4640} 4562}
4641
4642EXPORT_SYMBOL(il_alloc_traffic_mem); 4563EXPORT_SYMBOL(il_alloc_traffic_mem);
4643 4564
4644void 4565void
@@ -4650,7 +4571,6 @@ il_free_traffic_mem(struct il_priv *il)
4650 kfree(il->rx_traffic); 4571 kfree(il->rx_traffic);
4651 il->rx_traffic = NULL; 4572 il->rx_traffic = NULL;
4652} 4573}
4653
4654EXPORT_SYMBOL(il_free_traffic_mem); 4574EXPORT_SYMBOL(il_free_traffic_mem);
4655 4575
4656void 4576void
@@ -4678,7 +4598,6 @@ il_dbg_log_tx_data_frame(struct il_priv *il, u16 length,
4678 (il->tx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES; 4598 (il->tx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES;
4679 } 4599 }
4680} 4600}
4681
4682EXPORT_SYMBOL(il_dbg_log_tx_data_frame); 4601EXPORT_SYMBOL(il_dbg_log_tx_data_frame);
4683 4602
4684void 4603void
@@ -4706,7 +4625,6 @@ il_dbg_log_rx_data_frame(struct il_priv *il, u16 length,
4706 (il->rx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES; 4625 (il->rx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES;
4707 } 4626 }
4708} 4627}
4709
4710EXPORT_SYMBOL(il_dbg_log_rx_data_frame); 4628EXPORT_SYMBOL(il_dbg_log_rx_data_frame);
4711 4629
4712const char * 4630const char *
@@ -4849,7 +4767,6 @@ il_update_stats(struct il_priv *il, bool is_tx, __le16 fc, u16 len)
4849 stats->data_bytes += len; 4767 stats->data_bytes += len;
4850 } 4768 }
4851} 4769}
4852
4853EXPORT_SYMBOL(il_update_stats); 4770EXPORT_SYMBOL(il_update_stats);
4854#endif 4771#endif
4855 4772
@@ -4958,7 +4875,6 @@ out:
4958 mutex_unlock(&il->mutex); 4875 mutex_unlock(&il->mutex);
4959 return err; 4876 return err;
4960} 4877}
4961
4962EXPORT_SYMBOL(il_mac_change_interface); 4878EXPORT_SYMBOL(il_mac_change_interface);
4963 4879
4964/* 4880/*
@@ -5034,7 +4950,6 @@ il_bg_watchdog(unsigned long data)
5034 mod_timer(&il->watchdog, 4950 mod_timer(&il->watchdog,
5035 jiffies + msecs_to_jiffies(IL_WD_TICK(timeout))); 4951 jiffies + msecs_to_jiffies(IL_WD_TICK(timeout)));
5036} 4952}
5037
5038EXPORT_SYMBOL(il_bg_watchdog); 4953EXPORT_SYMBOL(il_bg_watchdog);
5039 4954
5040void 4955void
@@ -5048,7 +4963,6 @@ il_setup_watchdog(struct il_priv *il)
5048 else 4963 else
5049 del_timer(&il->watchdog); 4964 del_timer(&il->watchdog);
5050} 4965}
5051
5052EXPORT_SYMBOL(il_setup_watchdog); 4966EXPORT_SYMBOL(il_setup_watchdog);
5053 4967
5054/* 4968/*
@@ -5080,14 +4994,13 @@ il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval)
5080 4994
5081 return (quot << il->hw_params.beacon_time_tsf_bits) + rem; 4995 return (quot << il->hw_params.beacon_time_tsf_bits) + rem;
5082} 4996}
5083
5084EXPORT_SYMBOL(il_usecs_to_beacons); 4997EXPORT_SYMBOL(il_usecs_to_beacons);
5085 4998
5086/* base is usually what we get from ucode with each received frame, 4999/* base is usually what we get from ucode with each received frame,
5087 * the same as HW timer counter counting down 5000 * the same as HW timer counter counting down
5088 */ 5001 */
5089__le32 5002__le32
5090il_add_beacon_time(struct il_priv * il, u32 base, u32 addon, 5003il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
5091 u32 beacon_interval) 5004 u32 beacon_interval)
5092{ 5005{
5093 u32 base_low = base & il_beacon_time_mask_low(il, 5006 u32 base_low = base & il_beacon_time_mask_low(il,
@@ -5114,7 +5027,6 @@ il_add_beacon_time(struct il_priv * il, u32 base, u32 addon,
5114 5027
5115 return cpu_to_le32(res); 5028 return cpu_to_le32(res);
5116} 5029}
5117
5118EXPORT_SYMBOL(il_add_beacon_time); 5030EXPORT_SYMBOL(il_add_beacon_time);
5119 5031
5120#ifdef CONFIG_PM 5032#ifdef CONFIG_PM
@@ -5136,7 +5048,6 @@ il_pci_suspend(struct device *device)
5136 5048
5137 return 0; 5049 return 0;
5138} 5050}
5139
5140EXPORT_SYMBOL(il_pci_suspend); 5051EXPORT_SYMBOL(il_pci_suspend);
5141 5052
5142int 5053int
@@ -5166,7 +5077,6 @@ il_pci_resume(struct device *device)
5166 5077
5167 return 0; 5078 return 0;
5168} 5079}
5169
5170EXPORT_SYMBOL(il_pci_resume); 5080EXPORT_SYMBOL(il_pci_resume);
5171 5081
5172const struct dev_pm_ops il_pm_ops = { 5082const struct dev_pm_ops il_pm_ops = {
@@ -5177,7 +5087,6 @@ const struct dev_pm_ops il_pm_ops = {
5177 .poweroff = il_pci_suspend, 5087 .poweroff = il_pci_suspend,
5178 .restore = il_pci_resume, 5088 .restore = il_pci_resume,
5179}; 5089};
5180
5181EXPORT_SYMBOL(il_pm_ops); 5090EXPORT_SYMBOL(il_pm_ops);
5182 5091
5183#endif /* CONFIG_PM */ 5092#endif /* CONFIG_PM */
@@ -5413,7 +5322,6 @@ il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
5413 5322
5414 D_MAC80211("leave\n"); 5323 D_MAC80211("leave\n");
5415} 5324}
5416
5417EXPORT_SYMBOL(il_mac_reset_tsf); 5325EXPORT_SYMBOL(il_mac_reset_tsf);
5418 5326
5419static void 5327static void
@@ -5701,7 +5609,6 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
5701 5609
5702 D_MAC80211("leave\n"); 5610 D_MAC80211("leave\n");
5703} 5611}
5704
5705EXPORT_SYMBOL(il_mac_bss_info_changed); 5612EXPORT_SYMBOL(il_mac_bss_info_changed);
5706 5613
5707irqreturn_t 5614irqreturn_t
@@ -5763,7 +5670,6 @@ none:
5763 spin_unlock_irqrestore(&il->lock, flags); 5670 spin_unlock_irqrestore(&il->lock, flags);
5764 return IRQ_NONE; 5671 return IRQ_NONE;
5765} 5672}
5766
5767EXPORT_SYMBOL(il_isr); 5673EXPORT_SYMBOL(il_isr);
5768 5674
5769/* 5675/*
@@ -5772,7 +5678,7 @@ EXPORT_SYMBOL(il_isr);
5772 */ 5678 */
5773void 5679void
5774il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info, 5680il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
5775 __le16 fc, __le32 * tx_flags) 5681 __le16 fc, __le32 *tx_flags)
5776{ 5682{
5777 if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) { 5683 if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
5778 *tx_flags |= TX_CMD_FLG_RTS_MSK; 5684 *tx_flags |= TX_CMD_FLG_RTS_MSK;
@@ -5798,5 +5704,4 @@ il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
5798 *tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK; 5704 *tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
5799 } 5705 }
5800} 5706}
5801
5802EXPORT_SYMBOL(il_tx_cmd_protection); 5707EXPORT_SYMBOL(il_tx_cmd_protection);
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 38ff3d66c745..d0975ab8b908 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -112,8 +112,8 @@ struct il_cmd_meta {
112 * invoked for SYNC commands, if it were and its result passed 112 * invoked for SYNC commands, if it were and its result passed
113 * through it would be simpler...) 113 * through it would be simpler...)
114 */ 114 */
115 void (*callback) (struct il_priv * il, struct il_device_cmd * cmd, 115 void (*callback) (struct il_priv *il, struct il_device_cmd *cmd,
116 struct il_rx_pkt * pkt); 116 struct il_rx_pkt *pkt);
117 117
118 /* The CMD_SIZE_HUGE flag bit indicates that the command 118 /* The CMD_SIZE_HUGE flag bit indicates that the command
119 * structure is stored at the end of the shared queue memory. */ 119 * structure is stored at the end of the shared queue memory. */
@@ -432,8 +432,8 @@ struct il_eeprom_calib_info {
432 432
433struct il_eeprom_ops { 433struct il_eeprom_ops {
434 const u32 regulatory_bands[7]; 434 const u32 regulatory_bands[7];
435 int (*acquire_semaphore) (struct il_priv * il); 435 int (*acquire_semaphore) (struct il_priv *il);
436 void (*release_semaphore) (struct il_priv * il); 436 void (*release_semaphore) (struct il_priv *il);
437}; 437};
438 438
439int il_eeprom_init(struct il_priv *il); 439int il_eeprom_init(struct il_priv *il);
@@ -592,8 +592,8 @@ struct il_device_cmd {
592struct il_host_cmd { 592struct il_host_cmd {
593 const void *data; 593 const void *data;
594 unsigned long reply_page; 594 unsigned long reply_page;
595 void (*callback) (struct il_priv * il, struct il_device_cmd * cmd, 595 void (*callback) (struct il_priv *il, struct il_device_cmd *cmd,
596 struct il_rx_pkt * pkt); 596 struct il_rx_pkt *pkt);
597 u32 flags; 597 u32 flags;
598 u16 len; 598 u16 len;
599 u8 id; 599 u8 id;
@@ -1224,8 +1224,8 @@ struct il_priv {
1224 enum ieee80211_band band; 1224 enum ieee80211_band band;
1225 int alloc_rxb_page; 1225 int alloc_rxb_page;
1226 1226
1227 void (*handlers[IL_CN_MAX]) (struct il_priv * il, 1227 void (*handlers[IL_CN_MAX]) (struct il_priv *il,
1228 struct il_rx_buf * rxb); 1228 struct il_rx_buf *rxb);
1229 1229
1230 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 1230 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
1231 1231
@@ -1613,69 +1613,69 @@ il_free_pages(struct il_priv *il, unsigned long page)
1613#define IL_RX_BUF_SIZE_8K (8 * 1024) 1613#define IL_RX_BUF_SIZE_8K (8 * 1024)
1614 1614
1615struct il_hcmd_ops { 1615struct il_hcmd_ops {
1616 int (*rxon_assoc) (struct il_priv * il, struct il_rxon_context * ctx); 1616 int (*rxon_assoc) (struct il_priv *il, struct il_rxon_context *ctx);
1617 int (*commit_rxon) (struct il_priv * il, struct il_rxon_context * ctx); 1617 int (*commit_rxon) (struct il_priv *il, struct il_rxon_context *ctx);
1618 void (*set_rxon_chain) (struct il_priv * il, 1618 void (*set_rxon_chain) (struct il_priv *il,
1619 struct il_rxon_context * ctx); 1619 struct il_rxon_context *ctx);
1620}; 1620};
1621 1621
1622struct il_hcmd_utils_ops { 1622struct il_hcmd_utils_ops {
1623 u16(*get_hcmd_size) (u8 cmd_id, u16 len); 1623 u16(*get_hcmd_size) (u8 cmd_id, u16 len);
1624 u16(*build_addsta_hcmd) (const struct il_addsta_cmd * cmd, u8 * data); 1624 u16(*build_addsta_hcmd) (const struct il_addsta_cmd *cmd, u8 *data);
1625 int (*request_scan) (struct il_priv * il, struct ieee80211_vif * vif); 1625 int (*request_scan) (struct il_priv *il, struct ieee80211_vif *vif);
1626 void (*post_scan) (struct il_priv * il); 1626 void (*post_scan) (struct il_priv *il);
1627}; 1627};
1628 1628
1629struct il_apm_ops { 1629struct il_apm_ops {
1630 int (*init) (struct il_priv * il); 1630 int (*init) (struct il_priv *il);
1631 void (*config) (struct il_priv * il); 1631 void (*config) (struct il_priv *il);
1632}; 1632};
1633 1633
1634struct il_debugfs_ops { 1634struct il_debugfs_ops {
1635 ssize_t(*rx_stats_read) (struct file * file, char __user * user_buf, 1635 ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf,
1636 size_t count, loff_t * ppos); 1636 size_t count, loff_t *ppos);
1637 ssize_t(*tx_stats_read) (struct file * file, char __user * user_buf, 1637 ssize_t(*tx_stats_read) (struct file *file, char __user *user_buf,
1638 size_t count, loff_t * ppos); 1638 size_t count, loff_t *ppos);
1639 ssize_t(*general_stats_read) (struct file * file, 1639 ssize_t(*general_stats_read) (struct file *file,
1640 char __user * user_buf, size_t count, 1640 char __user *user_buf, size_t count,
1641 loff_t * ppos); 1641 loff_t *ppos);
1642}; 1642};
1643 1643
1644struct il_temp_ops { 1644struct il_temp_ops {
1645 void (*temperature) (struct il_priv * il); 1645 void (*temperature) (struct il_priv *il);
1646}; 1646};
1647 1647
1648struct il_lib_ops { 1648struct il_lib_ops {
1649 /* set hw dependent parameters */ 1649 /* set hw dependent parameters */
1650 int (*set_hw_params) (struct il_priv * il); 1650 int (*set_hw_params) (struct il_priv *il);
1651 /* Handling TX */ 1651 /* Handling TX */
1652 void (*txq_update_byte_cnt_tbl) (struct il_priv * il, 1652 void (*txq_update_byte_cnt_tbl) (struct il_priv *il,
1653 struct il_tx_queue * txq, 1653 struct il_tx_queue *txq,
1654 u16 byte_cnt); 1654 u16 byte_cnt);
1655 int (*txq_attach_buf_to_tfd) (struct il_priv * il, 1655 int (*txq_attach_buf_to_tfd) (struct il_priv *il,
1656 struct il_tx_queue * txq, dma_addr_t addr, 1656 struct il_tx_queue *txq, dma_addr_t addr,
1657 u16 len, u8 reset, u8 pad); 1657 u16 len, u8 reset, u8 pad);
1658 void (*txq_free_tfd) (struct il_priv * il, struct il_tx_queue * txq); 1658 void (*txq_free_tfd) (struct il_priv *il, struct il_tx_queue *txq);
1659 int (*txq_init) (struct il_priv * il, struct il_tx_queue * txq); 1659 int (*txq_init) (struct il_priv *il, struct il_tx_queue *txq);
1660 /* setup Rx handler */ 1660 /* setup Rx handler */
1661 void (*handler_setup) (struct il_priv * il); 1661 void (*handler_setup) (struct il_priv *il);
1662 /* alive notification after init uCode load */ 1662 /* alive notification after init uCode load */
1663 void (*init_alive_start) (struct il_priv * il); 1663 void (*init_alive_start) (struct il_priv *il);
1664 /* check validity of rtc data address */ 1664 /* check validity of rtc data address */
1665 int (*is_valid_rtc_data_addr) (u32 addr); 1665 int (*is_valid_rtc_data_addr) (u32 addr);
1666 /* 1st ucode load */ 1666 /* 1st ucode load */
1667 int (*load_ucode) (struct il_priv * il); 1667 int (*load_ucode) (struct il_priv *il);
1668 1668
1669 void (*dump_nic_error_log) (struct il_priv * il); 1669 void (*dump_nic_error_log) (struct il_priv *il);
1670 int (*dump_fh) (struct il_priv * il, char **buf, bool display); 1670 int (*dump_fh) (struct il_priv *il, char **buf, bool display);
1671 int (*set_channel_switch) (struct il_priv * il, 1671 int (*set_channel_switch) (struct il_priv *il,
1672 struct ieee80211_channel_switch * ch_switch); 1672 struct ieee80211_channel_switch *ch_switch);
1673 /* power management */ 1673 /* power management */
1674 struct il_apm_ops apm_ops; 1674 struct il_apm_ops apm_ops;
1675 1675
1676 /* power */ 1676 /* power */
1677 int (*send_tx_power) (struct il_priv * il); 1677 int (*send_tx_power) (struct il_priv *il);
1678 void (*update_chain_flags) (struct il_priv * il); 1678 void (*update_chain_flags) (struct il_priv *il);
1679 1679
1680 /* eeprom operations */ 1680 /* eeprom operations */
1681 struct il_eeprom_ops eeprom_ops; 1681 struct il_eeprom_ops eeprom_ops;
@@ -1688,16 +1688,16 @@ struct il_lib_ops {
1688}; 1688};
1689 1689
1690struct il_led_ops { 1690struct il_led_ops {
1691 int (*cmd) (struct il_priv * il, struct il_led_cmd * led_cmd); 1691 int (*cmd) (struct il_priv *il, struct il_led_cmd *led_cmd);
1692}; 1692};
1693 1693
1694struct il_legacy_ops { 1694struct il_legacy_ops {
1695 void (*post_associate) (struct il_priv * il); 1695 void (*post_associate) (struct il_priv *il);
1696 void (*config_ap) (struct il_priv * il); 1696 void (*config_ap) (struct il_priv *il);
1697 /* station management */ 1697 /* station management */
1698 int (*update_bcast_stations) (struct il_priv * il); 1698 int (*update_bcast_stations) (struct il_priv *il);
1699 int (*manage_ibss_station) (struct il_priv * il, 1699 int (*manage_ibss_station) (struct il_priv *il,
1700 struct ieee80211_vif * vif, bool add); 1700 struct ieee80211_vif *vif, bool add);
1701}; 1701};
1702 1702
1703struct il_ops { 1703struct il_ops {
@@ -1965,7 +1965,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1965void il_internal_short_hw_scan(struct il_priv *il); 1965void il_internal_short_hw_scan(struct il_priv *il);
1966int il_force_reset(struct il_priv *il, bool external); 1966int il_force_reset(struct il_priv *il, bool external);
1967u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, 1967u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
1968 const u8 * ta, const u8 * ie, int ie_len, int left); 1968 const u8 *ta, const u8 *ie, int ie_len, int left);
1969void il_setup_rx_scan_handlers(struct il_priv *il); 1969void il_setup_rx_scan_handlers(struct il_priv *il);
1970u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, 1970u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
1971 u8 n_probes); 1971 u8 n_probes);
@@ -1995,9 +1995,9 @@ int il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd);
1995int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len, 1995int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len,
1996 const void *data); 1996 const void *data);
1997int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data, 1997int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
1998 void (*callback) (struct il_priv * il, 1998 void (*callback) (struct il_priv *il,
1999 struct il_device_cmd * cmd, 1999 struct il_device_cmd *cmd,
2000 struct il_rx_pkt * pkt)); 2000 struct il_rx_pkt *pkt));
2001 2001
2002int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); 2002int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd);
2003 2003
@@ -2155,7 +2155,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
2155void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2155void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2156 struct ieee80211_bss_conf *bss_conf, u32 changes); 2156 struct ieee80211_bss_conf *bss_conf, u32 changes);
2157void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info, 2157void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
2158 __le16 fc, __le32 * tx_flags); 2158 __le16 fc, __le32 *tx_flags);
2159 2159
2160irqreturn_t il_isr(int irq, void *data); 2160irqreturn_t il_isr(int irq, void *data);
2161 2161
@@ -2191,8 +2191,7 @@ _il_poll_bit(struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout)
2191 return t; 2191 return t;
2192 udelay(IL_POLL_INTERVAL); 2192 udelay(IL_POLL_INTERVAL);
2193 t += IL_POLL_INTERVAL; 2193 t += IL_POLL_INTERVAL;
2194 } 2194 } while (t < timeout);
2195 while (t < timeout);
2196 2195
2197 return -ETIMEDOUT; 2196 return -ETIMEDOUT;
2198} 2197}
@@ -2324,8 +2323,7 @@ il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout)
2324 return t; 2323 return t;
2325 udelay(IL_POLL_INTERVAL); 2324 udelay(IL_POLL_INTERVAL);
2326 t += IL_POLL_INTERVAL; 2325 t += IL_POLL_INTERVAL;
2327 } 2326 } while (t < timeout);
2328 while (t < timeout);
2329 2327
2330 return -ETIMEDOUT; 2328 return -ETIMEDOUT;
2331} 2329}
@@ -2485,14 +2483,14 @@ void il_dealloc_bcast_stations(struct il_priv *il);
2485int il_get_free_ucode_key_idx(struct il_priv *il); 2483int il_get_free_ucode_key_idx(struct il_priv *il);
2486int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags); 2484int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags);
2487int il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx, 2485int il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx,
2488 const u8 * addr, bool is_ap, 2486 const u8 *addr, bool is_ap,
2489 struct ieee80211_sta *sta, u8 * sta_id_r); 2487 struct ieee80211_sta *sta, u8 *sta_id_r);
2490int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr); 2488int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr);
2491int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2489int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2492 struct ieee80211_sta *sta); 2490 struct ieee80211_sta *sta);
2493 2491
2494u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, 2492u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx,
2495 const u8 * addr, bool is_ap, struct ieee80211_sta *sta); 2493 const u8 *addr, bool is_ap, struct ieee80211_sta *sta);
2496 2494
2497int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx, 2495int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx,
2498 struct il_link_quality_cmd *lq, u8 flags, bool init); 2496 struct il_link_quality_cmd *lq, u8 flags, bool init);
@@ -2758,10 +2756,10 @@ il_get_dma_hi_addr(dma_addr_t addr)
2758 * 2756 *
2759 * This structure contains dma address and length of transmission address 2757 * This structure contains dma address and length of transmission address
2760 * 2758 *
2761 * @lo: low [31:0] portion of the dma address of TX buffer 2759 * @lo: low [31:0] portion of the dma address of TX buffer every even is
2762 * every even is unaligned on 16 bit boundary 2760 * unaligned on 16 bit boundary
2763 * @hi_n_len 0-3 [35:32] portion of dma 2761 * @hi_n_len: 0-3 [35:32] portion of dma
2764 * 4-15 length of the tx buffer 2762 * 4-15 length of the tx buffer
2765 */ 2763 */
2766struct il_tfd_tb { 2764struct il_tfd_tb {
2767 __le32 lo; 2765 __le32 lo;
@@ -2778,7 +2776,7 @@ struct il_tfd_tb {
2778 * 5 reserved 2776 * 5 reserved
2779 * 6-7 padding (not used) 2777 * 6-7 padding (not used)
2780 * @ tbs[20] transmit frame buffer descriptors 2778 * @ tbs[20] transmit frame buffer descriptors
2781 * @ __pad padding 2779 * @ __pad padding
2782 * 2780 *
2783 * Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM. 2781 * Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM.
2784 * Both driver and device share these circular buffers, each of which must be 2782 * Both driver and device share these circular buffers, each of which must be
@@ -3295,7 +3293,7 @@ do { \
3295 __func__ , ## args); \ 3293 __func__ , ## args); \
3296} while (0) 3294} while (0)
3297 3295
3298#define il_print_hex_dump(il, level, p, len) \ 3296#define il_print_hex_dump(il, level, p, len) \
3299do { \ 3297do { \
3300 if (il_get_debug_level(il) & level) \ 3298 if (il_get_debug_level(il) & level) \
3301 print_hex_dump(KERN_DEBUG, "iwl data: ", \ 3299 print_hex_dump(KERN_DEBUG, "iwl data: ", \
@@ -3342,9 +3340,9 @@ il_dbgfs_unregister(struct il_priv *il)
3342 * 3340 *
3343 * The active debug levels can be accessed via files 3341 * The active debug levels can be accessed via files
3344 * 3342 *
3345 * /sys/module/iwl4965/parameters/debug 3343 * /sys/module/iwl4965/parameters/debug
3346 * /sys/module/iwl3945/parameters/debug 3344 * /sys/module/iwl3945/parameters/debug
3347 * /sys/class/net/wlan0/device/debug_level 3345 * /sys/class/net/wlan0/device/debug_level
3348 * 3346 *
3349 * when CONFIG_IWLEGACY_DEBUG=y. 3347 * when CONFIG_IWLEGACY_DEBUG=y.
3350 */ 3348 */
diff --git a/drivers/net/wireless/iwlegacy/debug.c b/drivers/net/wireless/iwlegacy/debug.c
index e79794a7e326..928bdbb00085 100644
--- a/drivers/net/wireless/iwlegacy/debug.c
+++ b/drivers/net/wireless/iwlegacy/debug.c
@@ -71,35 +71,35 @@ il_dbgfs_open_file_generic(struct inode *inode, struct file *file)
71 return 0; 71 return 0;
72} 72}
73 73
74#define DEBUGFS_READ_FILE_OPS(name) \ 74#define DEBUGFS_READ_FILE_OPS(name) \
75 DEBUGFS_READ_FUNC(name); \ 75 DEBUGFS_READ_FUNC(name); \
76static const struct file_operations il_dbgfs_##name##_ops = { \ 76static const struct file_operations il_dbgfs_##name##_ops = { \
77 .read = il_dbgfs_##name##_read, \ 77 .read = il_dbgfs_##name##_read, \
78 .open = il_dbgfs_open_file_generic, \ 78 .open = il_dbgfs_open_file_generic, \
79 .llseek = generic_file_llseek, \ 79 .llseek = generic_file_llseek, \
80}; 80};
81 81
82#define DEBUGFS_WRITE_FILE_OPS(name) \ 82#define DEBUGFS_WRITE_FILE_OPS(name) \
83 DEBUGFS_WRITE_FUNC(name); \ 83 DEBUGFS_WRITE_FUNC(name); \
84static const struct file_operations il_dbgfs_##name##_ops = { \ 84static const struct file_operations il_dbgfs_##name##_ops = { \
85 .write = il_dbgfs_##name##_write, \ 85 .write = il_dbgfs_##name##_write, \
86 .open = il_dbgfs_open_file_generic, \ 86 .open = il_dbgfs_open_file_generic, \
87 .llseek = generic_file_llseek, \ 87 .llseek = generic_file_llseek, \
88}; 88};
89 89
90#define DEBUGFS_READ_WRITE_FILE_OPS(name) \ 90#define DEBUGFS_READ_WRITE_FILE_OPS(name) \
91 DEBUGFS_READ_FUNC(name); \ 91 DEBUGFS_READ_FUNC(name); \
92 DEBUGFS_WRITE_FUNC(name); \ 92 DEBUGFS_WRITE_FUNC(name); \
93static const struct file_operations il_dbgfs_##name##_ops = { \ 93static const struct file_operations il_dbgfs_##name##_ops = { \
94 .write = il_dbgfs_##name##_write, \ 94 .write = il_dbgfs_##name##_write, \
95 .read = il_dbgfs_##name##_read, \ 95 .read = il_dbgfs_##name##_read, \
96 .open = il_dbgfs_open_file_generic, \ 96 .open = il_dbgfs_open_file_generic, \
97 .llseek = generic_file_llseek, \ 97 .llseek = generic_file_llseek, \
98}; 98};
99 99
100static ssize_t 100static ssize_t
101il_dbgfs_tx_stats_read(struct file *file, char __user * user_buf, size_t count, 101il_dbgfs_tx_stats_read(struct file *file, char __user *user_buf, size_t count,
102 loff_t * ppos) 102 loff_t *ppos)
103{ 103{
104 104
105 struct il_priv *il = file->private_data; 105 struct il_priv *il = file->private_data;
@@ -139,8 +139,8 @@ il_dbgfs_tx_stats_read(struct file *file, char __user * user_buf, size_t count,
139 139
140static ssize_t 140static ssize_t
141il_dbgfs_clear_traffic_stats_write(struct file *file, 141il_dbgfs_clear_traffic_stats_write(struct file *file,
142 const char __user * user_buf, size_t count, 142 const char __user *user_buf, size_t count,
143 loff_t * ppos) 143 loff_t *ppos)
144{ 144{
145 struct il_priv *il = file->private_data; 145 struct il_priv *il = file->private_data;
146 u32 clear_flag; 146 u32 clear_flag;
@@ -159,8 +159,8 @@ il_dbgfs_clear_traffic_stats_write(struct file *file,
159} 159}
160 160
161static ssize_t 161static ssize_t
162il_dbgfs_rx_stats_read(struct file *file, char __user * user_buf, size_t count, 162il_dbgfs_rx_stats_read(struct file *file, char __user *user_buf, size_t count,
163 loff_t * ppos) 163 loff_t *ppos)
164{ 164{
165 165
166 struct il_priv *il = file->private_data; 166 struct il_priv *il = file->private_data;
@@ -203,8 +203,8 @@ il_dbgfs_rx_stats_read(struct file *file, char __user * user_buf, size_t count,
203#define BYTE2_MASK 0x0000ffff; 203#define BYTE2_MASK 0x0000ffff;
204#define BYTE3_MASK 0x00ffffff; 204#define BYTE3_MASK 0x00ffffff;
205static ssize_t 205static ssize_t
206il_dbgfs_sram_read(struct file *file, char __user * user_buf, size_t count, 206il_dbgfs_sram_read(struct file *file, char __user *user_buf, size_t count,
207 loff_t * ppos) 207 loff_t *ppos)
208{ 208{
209 u32 val; 209 u32 val;
210 char *buf; 210 char *buf;
@@ -262,8 +262,8 @@ il_dbgfs_sram_read(struct file *file, char __user * user_buf, size_t count,
262} 262}
263 263
264static ssize_t 264static ssize_t
265il_dbgfs_sram_write(struct file *file, const char __user * user_buf, 265il_dbgfs_sram_write(struct file *file, const char __user *user_buf,
266 size_t count, loff_t * ppos) 266 size_t count, loff_t *ppos)
267{ 267{
268 struct il_priv *il = file->private_data; 268 struct il_priv *il = file->private_data;
269 char buf[64]; 269 char buf[64];
@@ -287,8 +287,8 @@ il_dbgfs_sram_write(struct file *file, const char __user * user_buf,
287} 287}
288 288
289static ssize_t 289static ssize_t
290il_dbgfs_stations_read(struct file *file, char __user * user_buf, size_t count, 290il_dbgfs_stations_read(struct file *file, char __user *user_buf, size_t count,
291 loff_t * ppos) 291 loff_t *ppos)
292{ 292{
293 struct il_priv *il = file->private_data; 293 struct il_priv *il = file->private_data;
294 struct il_station_entry *station; 294 struct il_station_entry *station;
@@ -351,8 +351,8 @@ il_dbgfs_stations_read(struct file *file, char __user * user_buf, size_t count,
351} 351}
352 352
353static ssize_t 353static ssize_t
354il_dbgfs_nvm_read(struct file *file, char __user * user_buf, size_t count, 354il_dbgfs_nvm_read(struct file *file, char __user *user_buf, size_t count,
355 loff_t * ppos) 355 loff_t *ppos)
356{ 356{
357 ssize_t ret; 357 ssize_t ret;
358 struct il_priv *il = file->private_data; 358 struct il_priv *il = file->private_data;
@@ -399,8 +399,8 @@ il_dbgfs_nvm_read(struct file *file, char __user * user_buf, size_t count,
399} 399}
400 400
401static ssize_t 401static ssize_t
402il_dbgfs_channels_read(struct file *file, char __user * user_buf, size_t count, 402il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count,
403 loff_t * ppos) 403 loff_t *ppos)
404{ 404{
405 struct il_priv *il = file->private_data; 405 struct il_priv *il = file->private_data;
406 struct ieee80211_channel *channels = NULL; 406 struct ieee80211_channel *channels = NULL;
@@ -478,8 +478,8 @@ il_dbgfs_channels_read(struct file *file, char __user * user_buf, size_t count,
478} 478}
479 479
480static ssize_t 480static ssize_t
481il_dbgfs_status_read(struct file *file, char __user * user_buf, size_t count, 481il_dbgfs_status_read(struct file *file, char __user *user_buf, size_t count,
482 loff_t * ppos) 482 loff_t *ppos)
483{ 483{
484 484
485 struct il_priv *il = file->private_data; 485 struct il_priv *il = file->private_data;
@@ -539,8 +539,8 @@ il_dbgfs_status_read(struct file *file, char __user * user_buf, size_t count,
539} 539}
540 540
541static ssize_t 541static ssize_t
542il_dbgfs_interrupt_read(struct file *file, char __user * user_buf, size_t count, 542il_dbgfs_interrupt_read(struct file *file, char __user *user_buf, size_t count,
543 loff_t * ppos) 543 loff_t *ppos)
544{ 544{
545 545
546 struct il_priv *il = file->private_data; 546 struct il_priv *il = file->private_data;
@@ -618,8 +618,8 @@ il_dbgfs_interrupt_read(struct file *file, char __user * user_buf, size_t count,
618} 618}
619 619
620static ssize_t 620static ssize_t
621il_dbgfs_interrupt_write(struct file *file, const char __user * user_buf, 621il_dbgfs_interrupt_write(struct file *file, const char __user *user_buf,
622 size_t count, loff_t * ppos) 622 size_t count, loff_t *ppos)
623{ 623{
624 struct il_priv *il = file->private_data; 624 struct il_priv *il = file->private_data;
625 char buf[8]; 625 char buf[8];
@@ -639,8 +639,8 @@ il_dbgfs_interrupt_write(struct file *file, const char __user * user_buf,
639} 639}
640 640
641static ssize_t 641static ssize_t
642il_dbgfs_qos_read(struct file *file, char __user * user_buf, size_t count, 642il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count,
643 loff_t * ppos) 643 loff_t *ppos)
644{ 644{
645 struct il_priv *il = file->private_data; 645 struct il_priv *il = file->private_data;
646 struct il_rxon_context *ctx = &il->ctx; 646 struct il_rxon_context *ctx = &il->ctx;
@@ -666,8 +666,8 @@ il_dbgfs_qos_read(struct file *file, char __user * user_buf, size_t count,
666} 666}
667 667
668static ssize_t 668static ssize_t
669il_dbgfs_disable_ht40_write(struct file *file, const char __user * user_buf, 669il_dbgfs_disable_ht40_write(struct file *file, const char __user *user_buf,
670 size_t count, loff_t * ppos) 670 size_t count, loff_t *ppos)
671{ 671{
672 struct il_priv *il = file->private_data; 672 struct il_priv *il = file->private_data;
673 char buf[8]; 673 char buf[8];
@@ -692,8 +692,8 @@ il_dbgfs_disable_ht40_write(struct file *file, const char __user * user_buf,
692} 692}
693 693
694static ssize_t 694static ssize_t
695il_dbgfs_disable_ht40_read(struct file *file, char __user * user_buf, 695il_dbgfs_disable_ht40_read(struct file *file, char __user *user_buf,
696 size_t count, loff_t * ppos) 696 size_t count, loff_t *ppos)
697{ 697{
698 struct il_priv *il = file->private_data; 698 struct il_priv *il = file->private_data;
699 char buf[100]; 699 char buf[100];
@@ -716,8 +716,8 @@ DEBUGFS_READ_FILE_OPS(qos);
716DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40); 716DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40);
717 717
718static ssize_t 718static ssize_t
719il_dbgfs_traffic_log_read(struct file *file, char __user * user_buf, 719il_dbgfs_traffic_log_read(struct file *file, char __user *user_buf,
720 size_t count, loff_t * ppos) 720 size_t count, loff_t *ppos)
721{ 721{
722 struct il_priv *il = file->private_data; 722 struct il_priv *il = file->private_data;
723 int pos = 0, ofs = 0; 723 int pos = 0, ofs = 0;
@@ -801,8 +801,8 @@ il_dbgfs_traffic_log_read(struct file *file, char __user * user_buf,
801} 801}
802 802
803static ssize_t 803static ssize_t
804il_dbgfs_traffic_log_write(struct file *file, const char __user * user_buf, 804il_dbgfs_traffic_log_write(struct file *file, const char __user *user_buf,
805 size_t count, loff_t * ppos) 805 size_t count, loff_t *ppos)
806{ 806{
807 struct il_priv *il = file->private_data; 807 struct il_priv *il = file->private_data;
808 char buf[8]; 808 char buf[8];
@@ -822,8 +822,8 @@ il_dbgfs_traffic_log_write(struct file *file, const char __user * user_buf,
822} 822}
823 823
824static ssize_t 824static ssize_t
825il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count, 825il_dbgfs_tx_queue_read(struct file *file, char __user *user_buf, size_t count,
826 loff_t * ppos) 826 loff_t *ppos)
827{ 827{
828 828
829 struct il_priv *il = file->private_data; 829 struct il_priv *il = file->private_data;
@@ -851,9 +851,8 @@ il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count,
851 scnprintf(buf + pos, bufsz - pos, 851 scnprintf(buf + pos, bufsz - pos,
852 "hwq %.2d: read=%u write=%u stop=%d" 852 "hwq %.2d: read=%u write=%u stop=%d"
853 " swq_id=%#.2x (ac %d/hwq %d)\n", cnt, 853 " swq_id=%#.2x (ac %d/hwq %d)\n", cnt,
854 q->read_ptr, q->write_ptr, !!test_bit(cnt, 854 q->read_ptr, q->write_ptr,
855 il-> 855 !!test_bit(cnt, il->queue_stopped),
856 queue_stopped),
857 txq->swq_id, txq->swq_id & 3, 856 txq->swq_id, txq->swq_id & 3,
858 (txq->swq_id >> 2) & 0x1f); 857 (txq->swq_id >> 2) & 0x1f);
859 if (cnt >= 4) 858 if (cnt >= 4)
@@ -870,8 +869,8 @@ il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count,
870} 869}
871 870
872static ssize_t 871static ssize_t
873il_dbgfs_rx_queue_read(struct file *file, char __user * user_buf, size_t count, 872il_dbgfs_rx_queue_read(struct file *file, char __user *user_buf, size_t count,
874 loff_t * ppos) 873 loff_t *ppos)
875{ 874{
876 875
877 struct il_priv *il = file->private_data; 876 struct il_priv *il = file->private_data;
@@ -899,8 +898,8 @@ il_dbgfs_rx_queue_read(struct file *file, char __user * user_buf, size_t count,
899} 898}
900 899
901static ssize_t 900static ssize_t
902il_dbgfs_ucode_rx_stats_read(struct file *file, char __user * user_buf, 901il_dbgfs_ucode_rx_stats_read(struct file *file, char __user *user_buf,
903 size_t count, loff_t * ppos) 902 size_t count, loff_t *ppos)
904{ 903{
905 struct il_priv *il = file->private_data; 904 struct il_priv *il = file->private_data;
906 return il->cfg->ops->lib->debugfs_ops.rx_stats_read(file, user_buf, 905 return il->cfg->ops->lib->debugfs_ops.rx_stats_read(file, user_buf,
@@ -908,8 +907,8 @@ il_dbgfs_ucode_rx_stats_read(struct file *file, char __user * user_buf,
908} 907}
909 908
910static ssize_t 909static ssize_t
911il_dbgfs_ucode_tx_stats_read(struct file *file, char __user * user_buf, 910il_dbgfs_ucode_tx_stats_read(struct file *file, char __user *user_buf,
912 size_t count, loff_t * ppos) 911 size_t count, loff_t *ppos)
913{ 912{
914 struct il_priv *il = file->private_data; 913 struct il_priv *il = file->private_data;
915 return il->cfg->ops->lib->debugfs_ops.tx_stats_read(file, user_buf, 914 return il->cfg->ops->lib->debugfs_ops.tx_stats_read(file, user_buf,
@@ -917,8 +916,8 @@ il_dbgfs_ucode_tx_stats_read(struct file *file, char __user * user_buf,
917} 916}
918 917
919static ssize_t 918static ssize_t
920il_dbgfs_ucode_general_stats_read(struct file *file, char __user * user_buf, 919il_dbgfs_ucode_general_stats_read(struct file *file, char __user *user_buf,
921 size_t count, loff_t * ppos) 920 size_t count, loff_t *ppos)
922{ 921{
923 struct il_priv *il = file->private_data; 922 struct il_priv *il = file->private_data;
924 return il->cfg->ops->lib->debugfs_ops.general_stats_read(file, user_buf, 923 return il->cfg->ops->lib->debugfs_ops.general_stats_read(file, user_buf,
@@ -926,8 +925,8 @@ il_dbgfs_ucode_general_stats_read(struct file *file, char __user * user_buf,
926} 925}
927 926
928static ssize_t 927static ssize_t
929il_dbgfs_sensitivity_read(struct file *file, char __user * user_buf, 928il_dbgfs_sensitivity_read(struct file *file, char __user *user_buf,
930 size_t count, loff_t * ppos) 929 size_t count, loff_t *ppos)
931{ 930{
932 931
933 struct il_priv *il = file->private_data; 932 struct il_priv *il = file->private_data;
@@ -1025,8 +1024,8 @@ il_dbgfs_sensitivity_read(struct file *file, char __user * user_buf,
1025} 1024}
1026 1025
1027static ssize_t 1026static ssize_t
1028il_dbgfs_chain_noise_read(struct file *file, char __user * user_buf, 1027il_dbgfs_chain_noise_read(struct file *file, char __user *user_buf,
1029 size_t count, loff_t * ppos) 1028 size_t count, loff_t *ppos)
1030{ 1029{
1031 1030
1032 struct il_priv *il = file->private_data; 1031 struct il_priv *il = file->private_data;
@@ -1096,8 +1095,8 @@ il_dbgfs_chain_noise_read(struct file *file, char __user * user_buf,
1096} 1095}
1097 1096
1098static ssize_t 1097static ssize_t
1099il_dbgfs_power_save_status_read(struct file *file, char __user * user_buf, 1098il_dbgfs_power_save_status_read(struct file *file, char __user *user_buf,
1100 size_t count, loff_t * ppos) 1099 size_t count, loff_t *ppos)
1101{ 1100{
1102 struct il_priv *il = file->private_data; 1101 struct il_priv *il = file->private_data;
1103 char buf[60]; 1102 char buf[60];
@@ -1111,19 +1110,18 @@ il_dbgfs_power_save_status_read(struct file *file, char __user * user_buf,
1111 pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: "); 1110 pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: ");
1112 pos += 1111 pos +=
1113 scnprintf(buf + pos, bufsz - pos, "%s\n", 1112 scnprintf(buf + pos, bufsz - pos, "%s\n",
1114 (pwrsave_status == 1113 (pwrsave_status == CSR_GP_REG_NO_POWER_SAVE) ? "none" :
1115 CSR_GP_REG_NO_POWER_SAVE) ? "none" : (pwrsave_status == 1114 (pwrsave_status == CSR_GP_REG_MAC_POWER_SAVE) ? "MAC" :
1116 CSR_GP_REG_MAC_POWER_SAVE) 1115 (pwrsave_status == CSR_GP_REG_PHY_POWER_SAVE) ? "PHY" :
1117 ? "MAC" : (pwrsave_status == 1116 "error");
1118 CSR_GP_REG_PHY_POWER_SAVE) ? "PHY" : "error");
1119 1117
1120 return simple_read_from_buffer(user_buf, count, ppos, buf, pos); 1118 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1121} 1119}
1122 1120
1123static ssize_t 1121static ssize_t
1124il_dbgfs_clear_ucode_stats_write(struct file *file, 1122il_dbgfs_clear_ucode_stats_write(struct file *file,
1125 const char __user * user_buf, size_t count, 1123 const char __user *user_buf, size_t count,
1126 loff_t * ppos) 1124 loff_t *ppos)
1127{ 1125{
1128 struct il_priv *il = file->private_data; 1126 struct il_priv *il = file->private_data;
1129 char buf[8]; 1127 char buf[8];
@@ -1146,8 +1144,8 @@ il_dbgfs_clear_ucode_stats_write(struct file *file,
1146} 1144}
1147 1145
1148static ssize_t 1146static ssize_t
1149il_dbgfs_rxon_flags_read(struct file *file, char __user * user_buf, 1147il_dbgfs_rxon_flags_read(struct file *file, char __user *user_buf,
1150 size_t count, loff_t * ppos) 1148 size_t count, loff_t *ppos)
1151{ 1149{
1152 1150
1153 struct il_priv *il = file->private_data; 1151 struct il_priv *il = file->private_data;
@@ -1159,8 +1157,8 @@ il_dbgfs_rxon_flags_read(struct file *file, char __user * user_buf,
1159} 1157}
1160 1158
1161static ssize_t 1159static ssize_t
1162il_dbgfs_rxon_filter_flags_read(struct file *file, char __user * user_buf, 1160il_dbgfs_rxon_filter_flags_read(struct file *file, char __user *user_buf,
1163 size_t count, loff_t * ppos) 1161 size_t count, loff_t *ppos)
1164{ 1162{
1165 1163
1166 struct il_priv *il = file->private_data; 1164 struct il_priv *il = file->private_data;
@@ -1173,8 +1171,8 @@ il_dbgfs_rxon_filter_flags_read(struct file *file, char __user * user_buf,
1173} 1171}
1174 1172
1175static ssize_t 1173static ssize_t
1176il_dbgfs_fh_reg_read(struct file *file, char __user * user_buf, size_t count, 1174il_dbgfs_fh_reg_read(struct file *file, char __user *user_buf, size_t count,
1177 loff_t * ppos) 1175 loff_t *ppos)
1178{ 1176{
1179 struct il_priv *il = file->private_data; 1177 struct il_priv *il = file->private_data;
1180 char *buf; 1178 char *buf;
@@ -1195,8 +1193,8 @@ il_dbgfs_fh_reg_read(struct file *file, char __user * user_buf, size_t count,
1195} 1193}
1196 1194
1197static ssize_t 1195static ssize_t
1198il_dbgfs_missed_beacon_read(struct file *file, char __user * user_buf, 1196il_dbgfs_missed_beacon_read(struct file *file, char __user *user_buf,
1199 size_t count, loff_t * ppos) 1197 size_t count, loff_t *ppos)
1200{ 1198{
1201 1199
1202 struct il_priv *il = file->private_data; 1200 struct il_priv *il = file->private_data;
@@ -1212,8 +1210,8 @@ il_dbgfs_missed_beacon_read(struct file *file, char __user * user_buf,
1212} 1210}
1213 1211
1214static ssize_t 1212static ssize_t
1215il_dbgfs_missed_beacon_write(struct file *file, const char __user * user_buf, 1213il_dbgfs_missed_beacon_write(struct file *file, const char __user *user_buf,
1216 size_t count, loff_t * ppos) 1214 size_t count, loff_t *ppos)
1217{ 1215{
1218 struct il_priv *il = file->private_data; 1216 struct il_priv *il = file->private_data;
1219 char buf[8]; 1217 char buf[8];
@@ -1237,8 +1235,8 @@ il_dbgfs_missed_beacon_write(struct file *file, const char __user * user_buf,
1237} 1235}
1238 1236
1239static ssize_t 1237static ssize_t
1240il_dbgfs_force_reset_read(struct file *file, char __user * user_buf, 1238il_dbgfs_force_reset_read(struct file *file, char __user *user_buf,
1241 size_t count, loff_t * ppos) 1239 size_t count, loff_t *ppos)
1242{ 1240{
1243 1241
1244 struct il_priv *il = file->private_data; 1242 struct il_priv *il = file->private_data;
@@ -1268,8 +1266,8 @@ il_dbgfs_force_reset_read(struct file *file, char __user * user_buf,
1268} 1266}
1269 1267
1270static ssize_t 1268static ssize_t
1271il_dbgfs_force_reset_write(struct file *file, const char __user * user_buf, 1269il_dbgfs_force_reset_write(struct file *file, const char __user *user_buf,
1272 size_t count, loff_t * ppos) 1270 size_t count, loff_t *ppos)
1273{ 1271{
1274 1272
1275 int ret; 1273 int ret;
@@ -1281,8 +1279,8 @@ il_dbgfs_force_reset_write(struct file *file, const char __user * user_buf,
1281} 1279}
1282 1280
1283static ssize_t 1281static ssize_t
1284il_dbgfs_wd_timeout_write(struct file *file, const char __user * user_buf, 1282il_dbgfs_wd_timeout_write(struct file *file, const char __user *user_buf,
1285 size_t count, loff_t * ppos) 1283 size_t count, loff_t *ppos)
1286{ 1284{
1287 1285
1288 struct il_priv *il = file->private_data; 1286 struct il_priv *il = file->private_data;
@@ -1394,7 +1392,6 @@ err:
1394 il_dbgfs_unregister(il); 1392 il_dbgfs_unregister(il);
1395 return -ENOMEM; 1393 return -ENOMEM;
1396} 1394}
1397
1398EXPORT_SYMBOL(il_dbgfs_register); 1395EXPORT_SYMBOL(il_dbgfs_register);
1399 1396
1400/** 1397/**
@@ -1410,5 +1407,4 @@ il_dbgfs_unregister(struct il_priv *il)
1410 debugfs_remove_recursive(il->debugfs_dir); 1407 debugfs_remove_recursive(il->debugfs_dir);
1411 il->debugfs_dir = NULL; 1408 il->debugfs_dir = NULL;
1412} 1409}
1413
1414EXPORT_SYMBOL(il_dbgfs_unregister); 1410EXPORT_SYMBOL(il_dbgfs_unregister);