Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 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 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #ifndef IEEE802154_NL_H |
| 22 | #define IEEE802154_NL_H |
| 23 | |
| 24 | struct net_device; |
Phoebe Buckheister | ae531b9 | 2014-03-14 21:24:02 +0100 | [diff] [blame] | 25 | struct ieee802154_addr; |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 26 | |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 27 | /** |
| 28 | * ieee802154_nl_assoc_indic - Notify userland of an association request. |
| 29 | * @dev: The network device on which this association request was |
| 30 | * received. |
| 31 | * @addr: The address of the device requesting association. |
| 32 | * @cap: The capability information field from the device. |
| 33 | * |
| 34 | * This informs a userland coordinator of a device requesting to |
| 35 | * associate with the PAN controlled by the coordinator. |
| 36 | * |
| 37 | * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document. |
| 38 | */ |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 39 | int ieee802154_nl_assoc_indic(struct net_device *dev, |
Phoebe Buckheister | ae531b9 | 2014-03-14 21:24:02 +0100 | [diff] [blame] | 40 | struct ieee802154_addr *addr, u8 cap); |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 41 | |
| 42 | /** |
| 43 | * ieee802154_nl_assoc_confirm - Notify userland of association. |
| 44 | * @dev: The device which has completed association. |
| 45 | * @short_addr: The short address assigned to the device. |
| 46 | * @status: The status of the association. |
| 47 | * |
| 48 | * Inform userland of the result of an association request. If the |
| 49 | * association request included asking the coordinator to allocate |
| 50 | * a short address then it is returned in @short_addr. |
| 51 | * |
| 52 | * Note: This is in section 7.3.2 of the IEEE 802.15.4 document. |
| 53 | */ |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 54 | int ieee802154_nl_assoc_confirm(struct net_device *dev, |
Phoebe Buckheister | b70ab2e | 2014-03-14 21:23:59 +0100 | [diff] [blame] | 55 | __le16 short_addr, u8 status); |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * ieee802154_nl_disassoc_indic - Notify userland of disassociation. |
| 59 | * @dev: The device on which disassociation was indicated. |
| 60 | * @addr: The device which is disassociating. |
| 61 | * @reason: The reason for the disassociation. |
| 62 | * |
| 63 | * Inform userland that a device has disassociated from the network. |
| 64 | * |
| 65 | * Note: This is in section 7.3.3 of the IEEE 802.15.4 document. |
| 66 | */ |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 67 | int ieee802154_nl_disassoc_indic(struct net_device *dev, |
Phoebe Buckheister | ae531b9 | 2014-03-14 21:24:02 +0100 | [diff] [blame] | 68 | struct ieee802154_addr *addr, u8 reason); |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 69 | |
| 70 | /** |
| 71 | * ieee802154_nl_disassoc_confirm - Notify userland of disassociation |
| 72 | * completion. |
| 73 | * @dev: The device on which disassociation was ordered. |
| 74 | * @status: The result of the disassociation. |
| 75 | * |
| 76 | * Inform userland of the result of requesting that a device |
| 77 | * disassociate, or the result of requesting that we disassociate from |
| 78 | * a PAN managed by another coordinator. |
| 79 | * |
| 80 | * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document. |
| 81 | */ |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 82 | int ieee802154_nl_disassoc_confirm(struct net_device *dev, |
| 83 | u8 status); |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 84 | |
| 85 | /** |
| 86 | * ieee802154_nl_scan_confirm - Notify userland of completion of scan. |
| 87 | * @dev: The device which was instructed to scan. |
| 88 | * @status: The status of the scan operation. |
| 89 | * @scan_type: What type of scan was performed. |
| 90 | * @unscanned: Any channels that the device was unable to scan. |
| 91 | * @edl: The energy levels (if a passive scan). |
| 92 | * |
| 93 | * |
| 94 | * Note: This is in section 7.1.11 of the IEEE 802.15.4 document. |
| 95 | * Note: This API does not permit the return of an active scan result. |
| 96 | */ |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 97 | int ieee802154_nl_scan_confirm(struct net_device *dev, |
Dmitry Eremin-Solenikov | 16eea49 | 2009-08-19 19:32:24 +0400 | [diff] [blame] | 98 | u8 status, u8 scan_type, u32 unscanned, u8 page, |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 99 | u8 *edl/*, struct list_head *pan_desc_list */); |
Daniel Silverstone | 878fa89 | 2009-07-22 18:51:24 +0200 | [diff] [blame] | 100 | |
| 101 | /** |
| 102 | * ieee802154_nl_beacon_indic - Notify userland of a received beacon. |
| 103 | * @dev: The device on which a beacon was received. |
| 104 | * @panid: The PAN of the coordinator. |
| 105 | * @coord_addr: The short address of the coordinator on that PAN. |
| 106 | * |
| 107 | * Note: This is in section 7.1.5 of the IEEE 802.15.4 document. |
| 108 | * Note: This API does not provide extended information such as what |
| 109 | * channel the PAN is on or what the LQI of the beacon frame was on |
| 110 | * receipt. |
| 111 | * Note: This API cannot indicate a beacon frame for a coordinator |
| 112 | * operating in long addressing mode. |
| 113 | */ |
Phoebe Buckheister | b70ab2e | 2014-03-14 21:23:59 +0100 | [diff] [blame] | 114 | int ieee802154_nl_beacon_indic(struct net_device *dev, __le16 panid, |
| 115 | __le16 coord_addr); |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 116 | |
Dmitry Baryshkov | acb8aac | 2009-08-07 02:58:44 +0000 | [diff] [blame] | 117 | /** |
| 118 | * ieee802154_nl_start_confirm - Notify userland of completion of start. |
| 119 | * @dev: The device which was instructed to scan. |
| 120 | * @status: The status of the scan operation. |
| 121 | * |
| 122 | * Note: This is in section 7.1.14 of the IEEE 802.15.4 document. |
| 123 | */ |
| 124 | int ieee802154_nl_start_confirm(struct net_device *dev, u8 status); |
| 125 | |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 126 | #endif |