@@ -1383,15 +1383,15 @@ enum ieee80211_ampdu_mlme_action {
1383
1383
* When the device is started it should not have a MAC address
1384
1384
* to avoid acknowledging frames before a non-monitor device
1385
1385
* is added.
1386
- * Must be implemented.
1386
+ * Must be implemented and can sleep .
1387
1387
*
1388
1388
* @stop: Called after last netdevice attached to the hardware
1389
1389
* is disabled. This should turn off the hardware (at least
1390
1390
* it must turn off frame reception.)
1391
1391
* May be called right after add_interface if that rejects
1392
1392
* an interface. If you added any work onto the mac80211 workqueue
1393
1393
* you should ensure to cancel it on this callback.
1394
- * Must be implemented.
1394
+ * Must be implemented and can sleep .
1395
1395
*
1396
1396
* @add_interface: Called when a netdevice attached to the hardware is
1397
1397
* enabled. Because it is not called for monitor mode devices, @start
@@ -1401,7 +1401,7 @@ enum ieee80211_ampdu_mlme_action {
1401
1401
* interface is given in the conf parameter.
1402
1402
* The callback may refuse to add an interface by returning a
1403
1403
* negative error code (which will be seen in userspace.)
1404
- * Must be implemented.
1404
+ * Must be implemented and can sleep .
1405
1405
*
1406
1406
* @remove_interface: Notifies a driver that an interface is going down.
1407
1407
* The @stop callback is called after this if it is the last interface
@@ -1410,40 +1410,43 @@ enum ieee80211_ampdu_mlme_action {
1410
1410
* must be cleared so the device no longer acknowledges packets,
1411
1411
* the mac_addr member of the conf structure is, however, set to the
1412
1412
* MAC address of the device going away.
1413
- * Hence, this callback must be implemented.
1413
+ * Hence, this callback must be implemented. It can sleep.
1414
1414
*
1415
1415
* @config: Handler for configuration requests. IEEE 802.11 code calls this
1416
1416
* function to change hardware configuration, e.g., channel.
1417
1417
* This function should never fail but returns a negative error code
1418
- * if it does.
1418
+ * if it does. The callback can sleep.
1419
1419
*
1420
1420
* @bss_info_changed: Handler for configuration requests related to BSS
1421
1421
* parameters that may vary during BSS's lifespan, and may affect low
1422
1422
* level driver (e.g. assoc/disassoc status, erp parameters).
1423
1423
* This function should not be used if no BSS has been set, unless
1424
1424
* for association indication. The @changed parameter indicates which
1425
- * of the bss parameters has changed when a call is made.
1425
+ * of the bss parameters has changed when a call is made. The callback
1426
+ * can sleep.
1426
1427
*
1427
1428
* @prepare_multicast: Prepare for multicast filter configuration.
1428
1429
* This callback is optional, and its return value is passed
1429
1430
* to configure_filter(). This callback must be atomic.
1430
1431
*
1431
1432
* @configure_filter: Configure the device's RX filter.
1432
1433
* See the section "Frame filtering" for more information.
1433
- * This callback must be implemented.
1434
+ * This callback must be implemented and can sleep .
1434
1435
*
1435
1436
* @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
1436
1437
* must be set or cleared for a given STA. Must be atomic.
1437
1438
*
1438
1439
* @set_key: See the section "Hardware crypto acceleration"
1439
- * This callback can sleep, and is only called between add_interface
1440
- * and remove_interface calls, i.e. while the given virtual interface
1440
+ * This callback is only called between add_interface and
1441
+ * remove_interface calls, i.e. while the given virtual interface
1441
1442
* is enabled.
1442
1443
* Returns a negative error code if the key can't be added.
1444
+ * The callback can sleep.
1443
1445
*
1444
1446
* @update_tkip_key: See the section "Hardware crypto acceleration"
1445
1447
* This callback will be called in the context of Rx. Called for drivers
1446
1448
* which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY.
1449
+ * The callback can sleep.
1447
1450
*
1448
1451
* @hw_scan: Ask the hardware to service the scan request, no need to start
1449
1452
* the scan state machine in stack. The scan must honour the channel
@@ -1457,21 +1460,28 @@ enum ieee80211_ampdu_mlme_action {
1457
1460
* When the scan finishes, ieee80211_scan_completed() must be called;
1458
1461
* note that it also must be called when the scan cannot finish due to
1459
1462
* any error unless this callback returned a negative error code.
1463
+ * The callback can sleep.
1460
1464
*
1461
1465
* @sw_scan_start: Notifier function that is called just before a software scan
1462
1466
* is started. Can be NULL, if the driver doesn't need this notification.
1467
+ * The callback can sleep.
1463
1468
*
1464
- * @sw_scan_complete: Notifier function that is called just after a software scan
1465
- * finished. Can be NULL, if the driver doesn't need this notification.
1469
+ * @sw_scan_complete: Notifier function that is called just after a
1470
+ * software scan finished. Can be NULL, if the driver doesn't need
1471
+ * this notification.
1472
+ * The callback can sleep.
1466
1473
*
1467
1474
* @get_stats: Return low-level statistics.
1468
1475
* Returns zero if statistics are available.
1476
+ * The callback can sleep.
1469
1477
*
1470
1478
* @get_tkip_seq: If your device implements TKIP encryption in hardware this
1471
1479
* callback should be provided to read the TKIP transmit IVs (both IV32
1472
1480
* and IV16) for the given key from hardware.
1481
+ * The callback must be atomic.
1473
1482
*
1474
1483
* @set_rts_threshold: Configuration of RTS threshold (if device needs it)
1484
+ * The callback can sleep.
1475
1485
*
1476
1486
* @sta_notify: Notifies low level driver about addition, removal or power
1477
1487
* state transition of an associated station, AP, IBSS/WDS/mesh peer etc.
@@ -1480,30 +1490,36 @@ enum ieee80211_ampdu_mlme_action {
1480
1490
* @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
1481
1491
* bursting) for a hardware TX queue.
1482
1492
* Returns a negative error code on failure.
1493
+ * The callback can sleep.
1483
1494
*
1484
1495
* @get_tx_stats: Get statistics of the current TX queue status. This is used
1485
1496
* to get number of currently queued packets (queue length), maximum queue
1486
1497
* size (limit), and total number of packets sent using each TX queue
1487
1498
* (count). The 'stats' pointer points to an array that has hw->queues
1488
1499
* items.
1500
+ * The callback must be atomic.
1489
1501
*
1490
1502
* @get_tsf: Get the current TSF timer value from firmware/hardware. Currently,
1491
1503
* this is only used for IBSS mode BSSID merging and debugging. Is not a
1492
1504
* required function.
1505
+ * The callback can sleep.
1493
1506
*
1494
1507
* @set_tsf: Set the TSF timer to the specified value in the firmware/hardware.
1495
1508
* Currently, this is only used for IBSS mode debugging. Is not a
1496
1509
* required function.
1510
+ * The callback can sleep.
1497
1511
*
1498
1512
* @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize
1499
1513
* with other STAs in the IBSS. This is only used in IBSS mode. This
1500
1514
* function is optional if the firmware/hardware takes full care of
1501
1515
* TSF synchronization.
1516
+ * The callback can sleep.
1502
1517
*
1503
1518
* @tx_last_beacon: Determine whether the last IBSS beacon was sent by us.
1504
1519
* This is needed only for IBSS mode and the result of this function is
1505
1520
* used to determine whether to reply to Probe Requests.
1506
1521
* Returns non-zero if this device sent the last beacon.
1522
+ * The callback can sleep.
1507
1523
*
1508
1524
* @ampdu_action: Perform a certain A-MPDU action
1509
1525
* The RA/TID combination determines the destination and TID we want
@@ -1512,16 +1528,19 @@ enum ieee80211_ampdu_mlme_action {
1512
1528
* is the first frame we expect to perform the action on. Notice
1513
1529
* that TX/RX_STOP can pass NULL for this parameter.
1514
1530
* Returns a negative error code on failure.
1531
+ * The callback must be atomic.
1515
1532
*
1516
1533
* @rfkill_poll: Poll rfkill hardware state. If you need this, you also
1517
1534
* need to set wiphy->rfkill_poll to %true before registration,
1518
1535
* and need to call wiphy_rfkill_set_hw_state() in the callback.
1536
+ * The callback can sleep.
1519
1537
*
1520
1538
* @testmode_cmd: Implement a cfg80211 test mode command.
1539
+ * The callback can sleep.
1521
1540
*
1522
1541
* @flush: Flush all pending frames from the hardware queue, making sure
1523
1542
* that the hardware queues are empty. If the parameter @drop is set
1524
- * to %true, pending frames may be dropped.
1543
+ * to %true, pending frames may be dropped. The callback can sleep.
1525
1544
*/
1526
1545
struct ieee80211_ops {
1527
1546
int (* tx )(struct ieee80211_hw * hw , struct sk_buff * skb );
0 commit comments