History log of /include/net/mac802154.h
Revision Date Author Comments
640985ec2ffd2a81f34dc5004f0951d2c6cb3d5e 03-Jul-2014 Alexander Aring <alex.aring@gmail.com> mac802154: at86rf230: add hw flags and merge ops

This patch adds new mac802154 hw flags for transmit power, csma and
listen before transmit (lbt). These flags indicates that the transceiver
supports these features. If the flags are set and the driver doesn't
implement the necessary functions, then ieee802154_register_device
returns -ENOSYS "Function not implemented".

This patch merges also all at86rf230 operations into one operations structure
and set the right hw flags for the at86rf230 transceivers.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
94b4f6c21cf54029377a0645675a9d81b6cf890d 14-Mar-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add header structs with endiannes and operations

This patch provides a set of structures to represent 802.15.4 MAC
headers, and a set of operations to push/pull/peek these structs from
skbs. We cannot simply pointer-cast the skb MAC header pointer to these
structs, because 802.15.4 headers are wildly variable - depending on the
first three bytes, virtually all other fields of the header may be
present or not, and be present with different lengths.

The new header creation/parsing routines also support 802.15.4 security
headers, which are currently not supported by the mac802154
implementation of the protocol.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
b70ab2e87f17176d18f67ef331064441a032b5f3 14-Mar-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: enforce consistent endianness in the 802.15.4 stack

Enable sparse warnings about endianness, replace the remaining fields
regarding network operations without explicit endianness annotations
with such that are annotated, and propagate this through the entire
stack.

Uses of ieee802154_addr_sa are not changed yet, this patch is only
concerned with all other fields (such as address filters, operation
parameters and the likes).

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
4244db1b0b7bc9ab7b67d8c1c38de6cf15bc87a8 17-Feb-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add netlink APIs for smartMAC configuration

Introduce new netlink attributes for SET_PHY_ATTRS:
* CSMA minimal backoff exponent
* CSMA maximal backoff exponent
* CSMA retry limit
* frame retransmission limit

The CSMA attributes shall correspond to minBE, maxBE and maxCSMABackoffs of
802.15.4, respectively. The frame retransmission shall correspond to
maxFrameRetries of 802.15.4, unless given as -1: then the old behaviour
of the stack shall apply. For RF2xy, the old behaviour is to not do
channel sensing at all and simply send *right now*, which is not
intended behaviour for most applications and actually prohibited for
some channel/page combinations.

For all values except frame retransmission limit, the defaults of
802.15.4 apply. Frame retransmission limits are set to -1 to indicate
backward-compatible behaviour.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
6ca001978dce0d50ebac01a38d6287f241a520c6 17-Feb-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add support for setting CCA energy detection levels

Since three of the four clear channel assesment modes make use of energy
detection, provide an API to set the energy detection threshold.
Driver support for this is available in at86rf230 for the RF212 chips.
Since for these chips the minimal energy detection threshold depends on
page and channel used, add a field to struct at86rf230_local that stores
the minimal threshold. Actual ED thresholds are configured as offsets
from this value.

For RF212, setting the ED threshold will not work before a channel/page
has been set due to the dependency of energy detection in the chip and
the actual channel/page selected.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
ba08fea53a43e02b590d89224afdad976dece841 17-Feb-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add support for CCA mode in wpan phys

The standard describes four modes of clear channel assesment: "energy
above threshold", "carrier found", and the logical and/or of these two.
Support for CCA mode setting is included in the at86rf230 driver,
predicated for RF212 chips.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
84dda3c648fd55898064d76366b14f964cdc9d16 17-Feb-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add support for listen-before-talk in wpan_phy

Listen-before-talk is an alternative to CSMA in uncoordinated networks
and prescribed by european regulations if one wants to have a device
with radio duty cycles above 10% (or less in some bands). Add a phy
property to enable/disable LBT in the phy, including support in the
at86rf230 driver for RF212 chips.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9b2777d6089bcd7fb035847f907280560fe233c8 17-Feb-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154: add TX power control to wpan_phy

Replace the current u8 transmit_power in wpan_phy with s8 transmit_power.
The u8 field contained the actual tx power and a tolerance field,
which no physical radio every used. Adjust sysfs entries to keep
compatibility with userspace, give tolerances of +-1dB statically there.

This patch only adds support for this in the at86rf230 driver and the
RF212 chip. Configuration calculation for RF212 is also somewhat basic,
but does the job - the RF212 datasheet gives a large table with
suggested values for combinations of TX power and page/channel, if this
does not work well, we might have to copy the whole table.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
7e4d8a193f2f1b551dc8d10acca6aea4356f3b86 21-Oct-2013 Alexandre Belloni <alexandre.belloni@free-electrons.com> mac802154: correct a typo in ieee802154_alloc_device() prototype

This has no other impact than a cosmetic one.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
32bad7e30f113a8a5cebe4704bf6519ab4383e1b 26-Jun-2012 alex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com> mac802154: add wpan device-class support

Every real 802.15.4 transceiver, which works with software MAC layer,
can be classified as a wpan device in this stack. So the wpan device
implementation provides missing link in datapath between the device
drivers and the Linux network queue.

According to the IEEE 802.15.4 standard each packet can be one of the
following types:
- beacon
- MAC layer command
- ACK
- data

This patch adds support for the data packet-type only, but this is
enough to perform data transmission and receiving over radio.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1cd829c83eab8b899b85d597c767fcf8b4cf8fd6 15-May-2012 alex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com> mac802154: RX data path

Main RX data path implementation between physical and mac layers.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1010f540181b00c7013eeb04d1bf8aedd5a56835 15-May-2012 alex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com> mac802154: allocation of ieee802154 device

An interface to allocate and register ieee802154 compatible device.
The allocated device has the following representation in memory:

+-----------------------+
| struct wpan_phy |
+-----------------------+
| struct mac802154_priv |
+-----------------------+
| driver's private data |
+-----------------------+

Used by device drivers to register new instance in the stack.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
0afd7ad9de6b85c0f7ad9edf787de854c8e2fbb5 15-May-2012 alex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com> mac802154: basic ieee802.15.4 device structures

The IEEE 802.15.4 Working Group focuses on the standardization of the
bottom two layers of ISO/OSI protocol stack: Physical (PHY) and MAC.
The MAC layer provides access control to a shared channel and reliable
data delivery. The main functions performed by the MAC sublayer are:
association and disassociation, security control, optional star
network topology functions, such as beacon generation and Guaranteed
Time Slots (GTSs) management, generation of ACK frames (if used), and,
finally, application support for the two possible network topologies
described in the standard.

This is an initial commit which describes main data structures needed
for ieee802.15.4 compatible devices representation in the MAC layer.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>