hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/net/wireless/intel/ipw2x00/ipw2100.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23
34 Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved.
45
5
- This program is free software; you can redistribute it and/or modify it
6
- under the terms of version 2 of the GNU General Public License as
7
- published by the Free Software Foundation.
8
-
9
- This program is distributed in the hope that it will be useful, but WITHOUT
10
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- more details.
13
-
14
- You should have received a copy of the GNU General Public License along with
15
- this program; if not, write to the Free Software Foundation, Inc., 59
16
- Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
-
18
- The full GNU General Public License is included in this distribution in the
19
- file called LICENSE.
206
217 Contact Information:
228 Intel Linux Wireless <ilw@linux.intel.com>
....@@ -215,8 +201,7 @@
215201 #define IPW_DEBUG(level, message...) \
216202 do { \
217203 if (ipw2100_debug_level & (level)) { \
218
- printk(KERN_DEBUG "ipw2100: %c %s ", \
219
- in_interrupt() ? 'I' : 'U', __func__); \
204
+ printk(KERN_DEBUG "ipw2100: %s ", __func__); \
220205 printk(message); \
221206 } \
222207 } while (0)
....@@ -643,30 +628,30 @@
643628 int out, i, j, l;
644629 char c;
645630
646
- out = snprintf(buf, count, "%08X", ofs);
631
+ out = scnprintf(buf, count, "%08X", ofs);
647632
648633 for (l = 0, i = 0; i < 2; i++) {
649
- out += snprintf(buf + out, count - out, " ");
634
+ out += scnprintf(buf + out, count - out, " ");
650635 for (j = 0; j < 8 && l < len; j++, l++)
651
- out += snprintf(buf + out, count - out, "%02X ",
636
+ out += scnprintf(buf + out, count - out, "%02X ",
652637 data[(i * 8 + j)]);
653638 for (; j < 8; j++)
654
- out += snprintf(buf + out, count - out, " ");
639
+ out += scnprintf(buf + out, count - out, " ");
655640 }
656641
657
- out += snprintf(buf + out, count - out, " ");
642
+ out += scnprintf(buf + out, count - out, " ");
658643 for (l = 0, i = 0; i < 2; i++) {
659
- out += snprintf(buf + out, count - out, " ");
644
+ out += scnprintf(buf + out, count - out, " ");
660645 for (j = 0; j < 8 && l < len; j++, l++) {
661646 c = data[(i * 8 + j)];
662647 if (!isascii(c) || !isprint(c))
663648 c = '.';
664649
665
- out += snprintf(buf + out, count - out, "%c", c);
650
+ out += scnprintf(buf + out, count - out, "%c", c);
666651 }
667652
668653 for (; j < 8; j++)
669
- out += snprintf(buf + out, count - out, " ");
654
+ out += scnprintf(buf + out, count - out, " ");
670655 }
671656
672657 return buf;
....@@ -1744,7 +1729,7 @@
17441729 /* the ipw2100 hardware really doesn't want power management delays
17451730 * longer than 175usec
17461731 */
1747
- pm_qos_update_request(&ipw2100_pm_qos_req, 175);
1732
+ cpu_latency_qos_update_request(&ipw2100_pm_qos_req, 175);
17481733
17491734 /* If the interrupt is enabled, turn it off... */
17501735 spin_lock_irqsave(&priv->low_lock, flags);
....@@ -1889,7 +1874,8 @@
18891874 ipw2100_disable_interrupts(priv);
18901875 spin_unlock_irqrestore(&priv->low_lock, flags);
18911876
1892
- pm_qos_update_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
1877
+ cpu_latency_qos_update_request(&ipw2100_pm_qos_req,
1878
+ PM_QOS_DEFAULT_VALUE);
18931879
18941880 /* We have to signal any supplicant if we are disassociating */
18951881 if (associated)
....@@ -2308,10 +2294,11 @@
23082294 return -ENOMEM;
23092295
23102296 packet->rxp = (struct ipw2100_rx *)packet->skb->data;
2311
- packet->dma_addr = pci_map_single(priv->pci_dev, packet->skb->data,
2297
+ packet->dma_addr = dma_map_single(&priv->pci_dev->dev,
2298
+ packet->skb->data,
23122299 sizeof(struct ipw2100_rx),
2313
- PCI_DMA_FROMDEVICE);
2314
- if (pci_dma_mapping_error(priv->pci_dev, packet->dma_addr)) {
2300
+ DMA_FROM_DEVICE);
2301
+ if (dma_mapping_error(&priv->pci_dev->dev, packet->dma_addr)) {
23152302 dev_kfree_skb(packet->skb);
23162303 return -ENOMEM;
23172304 }
....@@ -2492,9 +2479,8 @@
24922479 return;
24932480 }
24942481
2495
- pci_unmap_single(priv->pci_dev,
2496
- packet->dma_addr,
2497
- sizeof(struct ipw2100_rx), PCI_DMA_FROMDEVICE);
2482
+ dma_unmap_single(&priv->pci_dev->dev, packet->dma_addr,
2483
+ sizeof(struct ipw2100_rx), DMA_FROM_DEVICE);
24982484
24992485 skb_put(packet->skb, status->frame_size);
25002486
....@@ -2576,8 +2562,8 @@
25762562 return;
25772563 }
25782564
2579
- pci_unmap_single(priv->pci_dev, packet->dma_addr,
2580
- sizeof(struct ipw2100_rx), PCI_DMA_FROMDEVICE);
2565
+ dma_unmap_single(&priv->pci_dev->dev, packet->dma_addr,
2566
+ sizeof(struct ipw2100_rx), DMA_FROM_DEVICE);
25812567 memmove(packet->skb->data + sizeof(struct ipw_rt_hdr),
25822568 packet->skb->data, status->frame_size);
25832569
....@@ -2702,9 +2688,9 @@
27022688
27032689 /* Sync the DMA for the RX buffer so CPU is sure to get
27042690 * the correct values */
2705
- pci_dma_sync_single_for_cpu(priv->pci_dev, packet->dma_addr,
2706
- sizeof(struct ipw2100_rx),
2707
- PCI_DMA_FROMDEVICE);
2691
+ dma_sync_single_for_cpu(&priv->pci_dev->dev, packet->dma_addr,
2692
+ sizeof(struct ipw2100_rx),
2693
+ DMA_FROM_DEVICE);
27082694
27092695 if (unlikely(ipw2100_corruption_check(priv, i))) {
27102696 ipw2100_corruption_detected(priv, i);
....@@ -2936,9 +2922,8 @@
29362922 (packet->index + 1 + i) % txq->entries,
29372923 tbd->host_addr, tbd->buf_length);
29382924
2939
- pci_unmap_single(priv->pci_dev,
2940
- tbd->host_addr,
2941
- tbd->buf_length, PCI_DMA_TODEVICE);
2925
+ dma_unmap_single(&priv->pci_dev->dev, tbd->host_addr,
2926
+ tbd->buf_length, DMA_TO_DEVICE);
29422927 }
29432928
29442929 libipw_txb_free(packet->info.d_struct.txb);
....@@ -3178,15 +3163,13 @@
31783163 tbd->buf_length = packet->info.d_struct.txb->
31793164 fragments[i]->len - LIBIPW_3ADDR_LEN;
31803165
3181
- tbd->host_addr = pci_map_single(priv->pci_dev,
3166
+ tbd->host_addr = dma_map_single(&priv->pci_dev->dev,
31823167 packet->info.d_struct.
3183
- txb->fragments[i]->
3184
- data +
3168
+ txb->fragments[i]->data +
31853169 LIBIPW_3ADDR_LEN,
31863170 tbd->buf_length,
3187
- PCI_DMA_TODEVICE);
3188
- if (pci_dma_mapping_error(priv->pci_dev,
3189
- tbd->host_addr)) {
3171
+ DMA_TO_DEVICE);
3172
+ if (dma_mapping_error(&priv->pci_dev->dev, tbd->host_addr)) {
31903173 IPW_DEBUG_TX("dma mapping error\n");
31913174 break;
31923175 }
....@@ -3195,10 +3178,10 @@
31953178 txq->next, tbd->host_addr,
31963179 tbd->buf_length);
31973180
3198
- pci_dma_sync_single_for_device(priv->pci_dev,
3199
- tbd->host_addr,
3200
- tbd->buf_length,
3201
- PCI_DMA_TODEVICE);
3181
+ dma_sync_single_for_device(&priv->pci_dev->dev,
3182
+ tbd->host_addr,
3183
+ tbd->buf_length,
3184
+ DMA_TO_DEVICE);
32023185
32033186 txq->next++;
32043187 txq->next %= txq->entries;
....@@ -3220,9 +3203,9 @@
32203203 }
32213204 }
32223205
3223
-static void ipw2100_irq_tasklet(unsigned long data)
3206
+static void ipw2100_irq_tasklet(struct tasklet_struct *t)
32243207 {
3225
- struct ipw2100_priv *priv = (struct ipw2100_priv *)data;
3208
+ struct ipw2100_priv *priv = from_tasklet(priv, t, irq_tasklet);
32263209 struct net_device *dev = priv->net_dev;
32273210 unsigned long flags;
32283211 u32 inta, tmp;
....@@ -3453,9 +3436,9 @@
34533436 return -ENOMEM;
34543437
34553438 for (i = 0; i < IPW_COMMAND_POOL_SIZE; i++) {
3456
- v = pci_zalloc_consistent(priv->pci_dev,
3457
- sizeof(struct ipw2100_cmd_header),
3458
- &p);
3439
+ v = dma_alloc_coherent(&priv->pci_dev->dev,
3440
+ sizeof(struct ipw2100_cmd_header), &p,
3441
+ GFP_KERNEL);
34593442 if (!v) {
34603443 printk(KERN_ERR DRV_NAME ": "
34613444 "%s: PCI alloc failed for msg "
....@@ -3474,11 +3457,10 @@
34743457 return 0;
34753458
34763459 for (j = 0; j < i; j++) {
3477
- pci_free_consistent(priv->pci_dev,
3478
- sizeof(struct ipw2100_cmd_header),
3479
- priv->msg_buffers[j].info.c_struct.cmd,
3480
- priv->msg_buffers[j].info.c_struct.
3481
- cmd_phys);
3460
+ dma_free_coherent(&priv->pci_dev->dev,
3461
+ sizeof(struct ipw2100_cmd_header),
3462
+ priv->msg_buffers[j].info.c_struct.cmd,
3463
+ priv->msg_buffers[j].info.c_struct.cmd_phys);
34823464 }
34833465
34843466 kfree(priv->msg_buffers);
....@@ -3509,11 +3491,10 @@
35093491 return;
35103492
35113493 for (i = 0; i < IPW_COMMAND_POOL_SIZE; i++) {
3512
- pci_free_consistent(priv->pci_dev,
3513
- sizeof(struct ipw2100_cmd_header),
3514
- priv->msg_buffers[i].info.c_struct.cmd,
3515
- priv->msg_buffers[i].info.c_struct.
3516
- cmd_phys);
3494
+ dma_free_coherent(&priv->pci_dev->dev,
3495
+ sizeof(struct ipw2100_cmd_header),
3496
+ priv->msg_buffers[i].info.c_struct.cmd,
3497
+ priv->msg_buffers[i].info.c_struct.cmd_phys);
35173498 }
35183499
35193500 kfree(priv->msg_buffers);
....@@ -4336,7 +4317,8 @@
43364317 IPW_DEBUG_INFO("enter\n");
43374318
43384319 q->size = entries * sizeof(struct ipw2100_status);
4339
- q->drv = pci_zalloc_consistent(priv->pci_dev, q->size, &q->nic);
4320
+ q->drv = dma_alloc_coherent(&priv->pci_dev->dev, q->size, &q->nic,
4321
+ GFP_KERNEL);
43404322 if (!q->drv) {
43414323 IPW_DEBUG_WARNING("Can not allocate status queue.\n");
43424324 return -ENOMEM;
....@@ -4352,9 +4334,10 @@
43524334 IPW_DEBUG_INFO("enter\n");
43534335
43544336 if (priv->status_queue.drv) {
4355
- pci_free_consistent(priv->pci_dev, priv->status_queue.size,
4356
- priv->status_queue.drv,
4357
- priv->status_queue.nic);
4337
+ dma_free_coherent(&priv->pci_dev->dev,
4338
+ priv->status_queue.size,
4339
+ priv->status_queue.drv,
4340
+ priv->status_queue.nic);
43584341 priv->status_queue.drv = NULL;
43594342 }
43604343
....@@ -4370,7 +4353,8 @@
43704353
43714354 q->entries = entries;
43724355 q->size = entries * sizeof(struct ipw2100_bd);
4373
- q->drv = pci_zalloc_consistent(priv->pci_dev, q->size, &q->nic);
4356
+ q->drv = dma_alloc_coherent(&priv->pci_dev->dev, q->size, &q->nic,
4357
+ GFP_KERNEL);
43744358 if (!q->drv) {
43754359 IPW_DEBUG_INFO
43764360 ("can't allocate shared memory for buffer descriptors\n");
....@@ -4390,7 +4374,8 @@
43904374 return;
43914375
43924376 if (q->drv) {
4393
- pci_free_consistent(priv->pci_dev, q->size, q->drv, q->nic);
4377
+ dma_free_coherent(&priv->pci_dev->dev, q->size, q->drv,
4378
+ q->nic);
43944379 q->drv = NULL;
43954380 }
43964381
....@@ -4428,7 +4413,7 @@
44284413
44294414 static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
44304415 {
4431
- int i, j, err = -EINVAL;
4416
+ int i, j, err;
44324417 void *v;
44334418 dma_addr_t p;
44344419
....@@ -4443,16 +4428,16 @@
44434428
44444429 priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
44454430 sizeof(struct ipw2100_tx_packet),
4446
- GFP_ATOMIC);
4431
+ GFP_KERNEL);
44474432 if (!priv->tx_buffers) {
44484433 bd_queue_free(priv, &priv->tx_queue);
44494434 return -ENOMEM;
44504435 }
44514436
44524437 for (i = 0; i < TX_PENDED_QUEUE_LENGTH; i++) {
4453
- v = pci_alloc_consistent(priv->pci_dev,
4454
- sizeof(struct ipw2100_data_header),
4455
- &p);
4438
+ v = dma_alloc_coherent(&priv->pci_dev->dev,
4439
+ sizeof(struct ipw2100_data_header), &p,
4440
+ GFP_KERNEL);
44564441 if (!v) {
44574442 printk(KERN_ERR DRV_NAME
44584443 ": %s: PCI alloc failed for tx " "buffers.\n",
....@@ -4472,11 +4457,10 @@
44724457 return 0;
44734458
44744459 for (j = 0; j < i; j++) {
4475
- pci_free_consistent(priv->pci_dev,
4476
- sizeof(struct ipw2100_data_header),
4477
- priv->tx_buffers[j].info.d_struct.data,
4478
- priv->tx_buffers[j].info.d_struct.
4479
- data_phys);
4460
+ dma_free_coherent(&priv->pci_dev->dev,
4461
+ sizeof(struct ipw2100_data_header),
4462
+ priv->tx_buffers[j].info.d_struct.data,
4463
+ priv->tx_buffers[j].info.d_struct.data_phys);
44804464 }
44814465
44824466 kfree(priv->tx_buffers);
....@@ -4553,12 +4537,10 @@
45534537 priv->tx_buffers[i].info.d_struct.txb = NULL;
45544538 }
45554539 if (priv->tx_buffers[i].info.d_struct.data)
4556
- pci_free_consistent(priv->pci_dev,
4557
- sizeof(struct ipw2100_data_header),
4558
- priv->tx_buffers[i].info.d_struct.
4559
- data,
4560
- priv->tx_buffers[i].info.d_struct.
4561
- data_phys);
4540
+ dma_free_coherent(&priv->pci_dev->dev,
4541
+ sizeof(struct ipw2100_data_header),
4542
+ priv->tx_buffers[i].info.d_struct.data,
4543
+ priv->tx_buffers[i].info.d_struct.data_phys);
45624544 }
45634545
45644546 kfree(priv->tx_buffers);
....@@ -4621,9 +4603,10 @@
46214603 return 0;
46224604
46234605 for (j = 0; j < i; j++) {
4624
- pci_unmap_single(priv->pci_dev, priv->rx_buffers[j].dma_addr,
4606
+ dma_unmap_single(&priv->pci_dev->dev,
4607
+ priv->rx_buffers[j].dma_addr,
46254608 sizeof(struct ipw2100_rx_packet),
4626
- PCI_DMA_FROMDEVICE);
4609
+ DMA_FROM_DEVICE);
46274610 dev_kfree_skb(priv->rx_buffers[j].skb);
46284611 }
46294612
....@@ -4675,10 +4658,10 @@
46754658
46764659 for (i = 0; i < RX_QUEUE_LENGTH; i++) {
46774660 if (priv->rx_buffers[i].rxp) {
4678
- pci_unmap_single(priv->pci_dev,
4661
+ dma_unmap_single(&priv->pci_dev->dev,
46794662 priv->rx_buffers[i].dma_addr,
46804663 sizeof(struct ipw2100_rx),
4681
- PCI_DMA_FROMDEVICE);
4664
+ DMA_FROM_DEVICE);
46824665 dev_kfree_skb(priv->rx_buffers[i].skb);
46834666 }
46844667 }
....@@ -5580,7 +5563,7 @@
55805563 struct libipw_security *sec)
55815564 {
55825565 struct ipw2100_priv *priv = libipw_priv(dev);
5583
- int i, force_update = 0;
5566
+ int i;
55845567
55855568 mutex_lock(&priv->action_mutex);
55865569 if (!(priv->status & STATUS_INITIALIZED))
....@@ -5604,12 +5587,8 @@
56045587
56055588 if ((sec->flags & SEC_ACTIVE_KEY) &&
56065589 priv->ieee->sec.active_key != sec->active_key) {
5607
- if (sec->active_key <= 3) {
5608
- priv->ieee->sec.active_key = sec->active_key;
5609
- priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
5610
- } else
5611
- priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
5612
-
5590
+ priv->ieee->sec.active_key = sec->active_key;
5591
+ priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
56135592 priv->status |= STATUS_SECURITY_UPDATED;
56145593 }
56155594
....@@ -5624,7 +5603,6 @@
56245603 priv->ieee->sec.flags |= SEC_ENABLED;
56255604 priv->ieee->sec.enabled = sec->enabled;
56265605 priv->status |= STATUS_SECURITY_UPDATED;
5627
- force_update = 1;
56285606 }
56295607
56305608 if (sec->flags & SEC_ENCRYPT)
....@@ -5853,7 +5831,7 @@
58535831 /*
58545832 * TODO: Fix this function... its just wrong
58555833 */
5856
-static void ipw2100_tx_timeout(struct net_device *dev)
5834
+static void ipw2100_tx_timeout(struct net_device *dev, unsigned int txqueue)
58575835 {
58585836 struct ipw2100_priv *priv = libipw_priv(dev);
58595837
....@@ -6026,7 +6004,7 @@
60266004 spin_unlock_irqrestore(&priv->low_lock, flags);
60276005 }
60286006
6029
-static void ipw2100_irq_tasklet(unsigned long data);
6007
+static void ipw2100_irq_tasklet(struct tasklet_struct *t);
60306008
60316009 static const struct net_device_ops ipw2100_netdev_ops = {
60326010 .ndo_open = ipw2100_open,
....@@ -6156,8 +6134,7 @@
61566134 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
61576135 INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event);
61586136
6159
- tasklet_init(&priv->irq_tasklet,
6160
- ipw2100_irq_tasklet, (unsigned long)priv);
6137
+ tasklet_setup(&priv->irq_tasklet, ipw2100_irq_tasklet);
61616138
61626139 /* NOTE: We do not start the deferred work for status checks yet */
61636140 priv->stop_rf_kill = 1;
....@@ -6187,7 +6164,7 @@
61876164 ioaddr = pci_iomap(pci_dev, 0, 0);
61886165 if (!ioaddr) {
61896166 printk(KERN_WARNING DRV_NAME
6190
- "Error calling ioremap_nocache.\n");
6167
+ "Error calling ioremap.\n");
61916168 err = -EIO;
61926169 goto fail;
61936170 }
....@@ -6214,7 +6191,7 @@
62146191 pci_set_master(pci_dev);
62156192 pci_set_drvdata(pci_dev, priv);
62166193
6217
- err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
6194
+ err = dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32));
62186195 if (err) {
62196196 printk(KERN_WARNING DRV_NAME
62206197 "Error calling pci_set_dma_mask.\n");
....@@ -6415,10 +6392,9 @@
64156392 IPW_DEBUG_INFO("exit\n");
64166393 }
64176394
6418
-#ifdef CONFIG_PM
6419
-static int ipw2100_suspend(struct pci_dev *pci_dev, pm_message_t state)
6395
+static int __maybe_unused ipw2100_suspend(struct device *dev_d)
64206396 {
6421
- struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
6397
+ struct ipw2100_priv *priv = dev_get_drvdata(dev_d);
64226398 struct net_device *dev = priv->net_dev;
64236399
64246400 IPW_DEBUG_INFO("%s: Going into suspend...\n", dev->name);
....@@ -6432,10 +6408,6 @@
64326408 /* Remove the PRESENT state of the device */
64336409 netif_device_detach(dev);
64346410
6435
- pci_save_state(pci_dev);
6436
- pci_disable_device(pci_dev);
6437
- pci_set_power_state(pci_dev, PCI_D3hot);
6438
-
64396411 priv->suspend_at = ktime_get_boottime_seconds();
64406412
64416413 mutex_unlock(&priv->action_mutex);
....@@ -6443,11 +6415,11 @@
64436415 return 0;
64446416 }
64456417
6446
-static int ipw2100_resume(struct pci_dev *pci_dev)
6418
+static int __maybe_unused ipw2100_resume(struct device *dev_d)
64476419 {
6420
+ struct pci_dev *pci_dev = to_pci_dev(dev_d);
64486421 struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
64496422 struct net_device *dev = priv->net_dev;
6450
- int err;
64516423 u32 val;
64526424
64536425 if (IPW2100_PM_DISABLED)
....@@ -6456,16 +6428,6 @@
64566428 mutex_lock(&priv->action_mutex);
64576429
64586430 IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name);
6459
-
6460
- pci_set_power_state(pci_dev, PCI_D0);
6461
- err = pci_enable_device(pci_dev);
6462
- if (err) {
6463
- printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
6464
- dev->name);
6465
- mutex_unlock(&priv->action_mutex);
6466
- return err;
6467
- }
6468
- pci_restore_state(pci_dev);
64696431
64706432 /*
64716433 * Suspend/Resume resets the PCI configuration space, so we have to
....@@ -6491,7 +6453,6 @@
64916453
64926454 return 0;
64936455 }
6494
-#endif
64956456
64966457 static void ipw2100_shutdown(struct pci_dev *pci_dev)
64976458 {
....@@ -6557,15 +6518,14 @@
65576518
65586519 MODULE_DEVICE_TABLE(pci, ipw2100_pci_id_table);
65596520
6521
+static SIMPLE_DEV_PM_OPS(ipw2100_pm_ops, ipw2100_suspend, ipw2100_resume);
6522
+
65606523 static struct pci_driver ipw2100_pci_driver = {
65616524 .name = DRV_NAME,
65626525 .id_table = ipw2100_pci_id_table,
65636526 .probe = ipw2100_pci_init_one,
65646527 .remove = ipw2100_pci_remove_one,
6565
-#ifdef CONFIG_PM
6566
- .suspend = ipw2100_suspend,
6567
- .resume = ipw2100_resume,
6568
-#endif
6528
+ .driver.pm = &ipw2100_pm_ops,
65696529 .shutdown = ipw2100_shutdown,
65706530 };
65716531
....@@ -6585,8 +6545,7 @@
65856545 printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
65866546 printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
65876547
6588
- pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
6589
- PM_QOS_DEFAULT_VALUE);
6548
+ cpu_latency_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
65906549
65916550 ret = pci_register_driver(&ipw2100_pci_driver);
65926551 if (ret)
....@@ -6613,7 +6572,7 @@
66136572 &driver_attr_debug_level);
66146573 #endif
66156574 pci_unregister_driver(&ipw2100_pci_driver);
6616
- pm_qos_remove_request(&ipw2100_pm_qos_req);
6575
+ cpu_latency_qos_remove_request(&ipw2100_pm_qos_req);
66176576 }
66186577
66196578 module_init(ipw2100_init);
....@@ -8371,7 +8330,7 @@
83718330 if (IPW2100_FW_MAJOR(h->version) != IPW2100_FW_MAJOR_VERSION) {
83728331 printk(KERN_WARNING DRV_NAME ": Firmware image not compatible "
83738332 "(detected version id of %u). "
8374
- "See Documentation/networking/README.ipw2100\n",
8333
+ "See Documentation/networking/device_drivers/wifi/intel/ipw2100.rst\n",
83758334 h->version);
83768335 return 1;
83778336 }