]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/nl802154.h
ieee802154: rework wpan_phy index assignment
[mirror_ubuntu-bionic-kernel.git] / include / net / nl802154.h
CommitLineData
2c21d115
SL
1/*
2 * nl802154.h
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
2c21d115
SL
15 */
16
17#ifndef IEEE802154_NL_H
18#define IEEE802154_NL_H
19
20struct net_device;
ae531b94 21struct ieee802154_addr;
2c21d115 22
878fa89f
DS
23/**
24 * ieee802154_nl_assoc_indic - Notify userland of an association request.
25 * @dev: The network device on which this association request was
26 * received.
27 * @addr: The address of the device requesting association.
28 * @cap: The capability information field from the device.
29 *
30 * This informs a userland coordinator of a device requesting to
31 * associate with the PAN controlled by the coordinator.
32 *
33 * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document.
34 */
2c21d115 35int ieee802154_nl_assoc_indic(struct net_device *dev,
ae531b94 36 struct ieee802154_addr *addr, u8 cap);
878fa89f
DS
37
38/**
39 * ieee802154_nl_assoc_confirm - Notify userland of association.
40 * @dev: The device which has completed association.
41 * @short_addr: The short address assigned to the device.
42 * @status: The status of the association.
43 *
44 * Inform userland of the result of an association request. If the
45 * association request included asking the coordinator to allocate
46 * a short address then it is returned in @short_addr.
47 *
48 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document.
49 */
2c21d115 50int ieee802154_nl_assoc_confirm(struct net_device *dev,
b70ab2e8 51 __le16 short_addr, u8 status);
878fa89f
DS
52
53/**
54 * ieee802154_nl_disassoc_indic - Notify userland of disassociation.
55 * @dev: The device on which disassociation was indicated.
56 * @addr: The device which is disassociating.
57 * @reason: The reason for the disassociation.
58 *
59 * Inform userland that a device has disassociated from the network.
60 *
61 * Note: This is in section 7.3.3 of the IEEE 802.15.4 document.
62 */
2c21d115 63int ieee802154_nl_disassoc_indic(struct net_device *dev,
ae531b94 64 struct ieee802154_addr *addr, u8 reason);
878fa89f
DS
65
66/**
67 * ieee802154_nl_disassoc_confirm - Notify userland of disassociation
68 * completion.
69 * @dev: The device on which disassociation was ordered.
70 * @status: The result of the disassociation.
71 *
72 * Inform userland of the result of requesting that a device
73 * disassociate, or the result of requesting that we disassociate from
74 * a PAN managed by another coordinator.
75 *
76 * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document.
77 */
2c21d115
SL
78int ieee802154_nl_disassoc_confirm(struct net_device *dev,
79 u8 status);
878fa89f
DS
80
81/**
82 * ieee802154_nl_scan_confirm - Notify userland of completion of scan.
83 * @dev: The device which was instructed to scan.
84 * @status: The status of the scan operation.
85 * @scan_type: What type of scan was performed.
86 * @unscanned: Any channels that the device was unable to scan.
87 * @edl: The energy levels (if a passive scan).
88 *
89 *
90 * Note: This is in section 7.1.11 of the IEEE 802.15.4 document.
91 * Note: This API does not permit the return of an active scan result.
92 */
2c21d115 93int ieee802154_nl_scan_confirm(struct net_device *dev,
16eea493 94 u8 status, u8 scan_type, u32 unscanned, u8 page,
2c21d115 95 u8 *edl/*, struct list_head *pan_desc_list */);
878fa89f
DS
96
97/**
98 * ieee802154_nl_beacon_indic - Notify userland of a received beacon.
99 * @dev: The device on which a beacon was received.
100 * @panid: The PAN of the coordinator.
101 * @coord_addr: The short address of the coordinator on that PAN.
102 *
103 * Note: This is in section 7.1.5 of the IEEE 802.15.4 document.
104 * Note: This API does not provide extended information such as what
105 * channel the PAN is on or what the LQI of the beacon frame was on
106 * receipt.
107 * Note: This API cannot indicate a beacon frame for a coordinator
108 * operating in long addressing mode.
109 */
b70ab2e8
PB
110int ieee802154_nl_beacon_indic(struct net_device *dev, __le16 panid,
111 __le16 coord_addr);
2c21d115 112
acb8aacd
DES
113/**
114 * ieee802154_nl_start_confirm - Notify userland of completion of start.
115 * @dev: The device which was instructed to scan.
116 * @status: The status of the scan operation.
117 *
118 * Note: This is in section 7.1.14 of the IEEE 802.15.4 document.
119 */
120int ieee802154_nl_start_confirm(struct net_device *dev, u8 status);
121
2c21d115 122#endif