05 Jan, 2016

1 commit


30 Sep, 2015

1 commit

  • This patch adds support for accessing mac802154 llsec implementation
    over nl802154. I added for a new Kconfig entry to provide this
    functionality CONFIG_IEEE802154_NL802154_EXPERIMENTAL. This interface is
    still in development. It provides to change security parameters and
    add/del/dump entries of security tables. Later we can add also a get to
    get an entry by unique identifier.

    Cc: Phoebe Buckheister
    Signed-off-by: Alexander Aring
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

22 Sep, 2015

2 commits

  • The current header_ops callback structure of net device are used mostly
    from 802.15.4 upper-layers. Because this callback structure is a very
    generic one, which is also used by e.g. DGRAM AF_PACKET sockets, we
    can't make this callback structure 802.15.4 specific which is currently
    is.

    I saw the smallest "constraint" for calling this callback with
    dev_hard_header/dev_parse_header by AF_PACKET which assign a 8 byte
    array for address void pointers. Currently 802.15.4 specific protocols
    like af802154 and 6LoWPAN will assign the "struct ieee802154_addr" as
    these parameters which is greater than 8 bytes. The current callback
    implementation for header_ops.create assumes always a complete
    "struct ieee802154_addr" which AF_PACKET can't never handled and is
    greater than 8 bytes.

    For that reason we introduce now a "generic" create/parse header_ops
    callback which allows handling with intra-pan extended addresses only.
    This allows a small use-case with AF_PACKET to send "somehow" a valid
    dataframe over DGRAM.

    To keeping the current dev_hard_header behaviour we introduce a similar
    callback structure "wpan_dev_header_ops" which contains 802.15.4 specific
    upper-layer header creation functionality, which can be called by
    wpan_dev_hard_header.

    Signed-off-by: Alexander Aring
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     
  • Sometimes upper-layer protocols wants to generate a new mac header by
    filling "struct ieee802154_hdr" only. These upper-layers sets for the
    address settings the source and dest fields, but not the fc fields for
    indicate the source and dest address mode. This patch changes the
    "ieee802154_hdr_push" function so the fc address fields are set
    according the source and dest fields of "struct ieee802154_hdr".

    Signed-off-by: Alexander Aring
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

12 Jun, 2015

1 commit


27 May, 2015

1 commit


23 May, 2015

2 commits

  • This patch removes the mib lock. The new locking mechanism is to protect
    the mib values with the rtnl lock. Note that this isn't always necessary
    if we have an interface up the most mib values are readonly (e.g.
    address settings). With this behaviour we can remove locking in
    hotpath like frame parsing completely. It depends on context if we need
    to hold the rtnl lock or not, this makes the callbacks of
    ieee802154_mlme_ops unnecessary because these callbacks hols always the
    locks.

    Signed-off-by: Alexander Aring
    Reviewed-by: Stefan Schmidt
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     
  • This patch will use atomic operations for sequence number incrementation
    while MAC header generation. Upper layers like af_802154 or 6LoWPAN
    could call this function in a parallel context while generating 802.15.4
    MAC header before queuing into wpan interfaces transmit queue.

    Signed-off-by: Alexander Aring
    Reviewed-by: Stefan Schmidt
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

19 Dec, 2014

1 commit

  • The current cca setting handle is a driver specific call. We need to
    introduce some 802.15.4 specific layer and mapping 802.15.4 cca modes to
    driver specific ones inside the 802.15.4 driver. This patch will add
    such 802.15.4 layer and mapping the cca settings to driver specific ones.

    Signed-off-by: Alexander Aring
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

06 Nov, 2014

1 commit

  • This patch removes the get_phy callback from mlme ops structure. Instead
    we doing a dereference via ieee802154_ptr dev pointer. For backwards
    compatibility we need to run get_device after dereference wpan_phy via
    ieee802154_ptr.

    Signed-off-by: Alexander Aring
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

26 Oct, 2014

1 commit

  • This patch moves the ieee802154 header into include/linux instead
    include/net. Similar like wireless which have the ieee80211 header
    inside of include/linux.

    Signed-off-by: Alexander Aring
    Cc: Alan Ott
    Signed-off-by: Marcel Holtmann

    Alexander Aring
     

25 Oct, 2014

1 commit


17 May, 2014

4 commits

  • The 802.15.4-2011 standard states that for each key, a list of devices
    that use this key shall be kept. Previous patches have only considered
    two options:

    * a device "uses" (or may use) all keys, rendering the list useless
    * a device is restricted to a certain set of keys

    Another option would be that a device *may* use all keys, but need not
    do so, and we are interested in the actual set of keys the device uses.
    Recording keys used by any given device may have a noticable performance
    impact and might not be needed as often. The common case, in which a
    device will not switch keys too often, should still perform well.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • The added structures match 802.15.4-2011 link-layer security PIBs as
    closely as is reasonable. Some lists required by the standard were
    modeled as bitmaps (frame_types and command_frame_ids in *llsec_key,
    802.15.4-2011 7.5/Table 61), since using lists for those seems a bit
    excessive and not particularly useful. The DeviceDescriptorHandleList
    was inverted and is here a per-device list, since operations on this
    list are likely to have both a key and a device at hand, and per-device
    lists of keys are shorter than per-key lists of devices.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     

16 May, 2014

2 commits

  • The current mac_cb handling of ieee802154 is rather awkward and limited.
    Decompose the single flags field into multiple fields with the meanings
    of each subfield of the flags field to make future extensions (for
    example, link-layer security) easier. Also don't set the frame sequence
    number in upper layers, since that's a thing the MAC is supposed to set
    on frame transmit - we set it on header creation, but assuming that
    upper layers do not blindly duplicate our headers, this is fine.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • When dealing with 802.15.4, one often has to know the maximum payload
    size for a given packet. This depends on many factors, one of which is
    whether or not a security header is present in the frame. These
    definitions and functions provide an easy way for any upper layer to
    calculate the maximum payload size for a packet. The first obvious user
    for this is 6lowpan, which duplicates this calculation and gets it
    partially wrong because it ignores security headers.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     

02 Apr, 2014

1 commit

  • Commit 9b2777d6089bcd (ieee802154: add TX power control to wpan_phy)
    and following erroneously added CSMA and CCA parameters for 802.15.4
    devices as PHY parameters, while they are actually MAC parameters and
    can differ for any two WPAN instances. Since it is now sensible to have
    multiple WPAN devices with differing CSMA/CCA parameters, make these
    parameters MAC parameters instead.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     

15 Mar, 2014

7 commits

  • Fragmentation and reassembly information for 6lowpan is independent from
    the 802.15.4 stack and used only by the 6lowpan reassembly process. Move
    the ieee802154_frag_info struct to a private are, it needn't be in the
    802.15.4 skb control block.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • Change all internal uses of ieee802154_addr_sa to ieee802154_addr,
    except for those instances that communicate directly with userspace.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • Use the operations on 802.15.4 header structs introduced in a previous
    patch to create and parse all headers in the mac802154 stack. This patch
    reduces code duplication between different parts of the mac802154 stack
    that needed information from headers, and also fixes a few bugs that
    seem to have gone unnoticed until now:

    * 802.15.4 dgram sockets would return a slightly incorrect value for
    the SIOCINQ ioctl
    * mac802154 would not drop frames with the "security enabled" bit set,
    even though it does not support security, in violation of the
    standard

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • 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
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • 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
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • Add a replacement ieee802154_addr struct with proper endianness on
    fields. Short address fields are stored as __le16 as on the network,
    extended (EUI64) addresses are __le64 as opposed to the u8[8] format
    used previously. This disconnect with the netdev address, which is
    stored as big-endian u8[8], is intentional.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     
  • The struct as currently defined uses host byte order for some fields,
    and most big endian/EUI display byte order for other fields. Inside the
    stack, endianness should ideally match network byte order where possible
    to minimize the number of byteswaps done in critical paths, but this
    patch does not address this; it is only preparatory.

    Signed-off-by: Phoebe Buckheister
    Signed-off-by: David S. Miller

    Phoebe Buckheister
     

01 Mar, 2014

1 commit


09 Apr, 2013

2 commits

  • Check for NULL before calling the following operations from "struct
    ieee802154_mlme_ops": assoc_req, assoc_resp, disassoc_req, start_req,
    and scan_req.

    This fixes a current oops where those functions are called but not
    implemented. It also updates the documentation to clarify that they
    are now optional by design. If a call to an unimplemented function
    is attempted, the kernel returns EOPNOTSUPP via netlink.

    The following operations are still required: get_phy, get_pan_id,
    get_short_addr, and get_dsn.

    Note that the places where this patch changes the initialization
    of "ret" should not affect the rest of the code since "ret" was
    always set (again) before returning its value.

    Signed-off-by: Werner Almesberger
    Signed-off-by: David S. Miller

    Werner Almesberger
     
  • It served no purpose: we never call it from anywhere in the stack
    and the only driver that did implement it (fakehard) merely provided
    a dummy value.

    There is also considerable doubt whether it would make sense to
    even attempt beacon processing at this level in the Linux kernel.

    Signed-off-by: Werner Almesberger
    Signed-off-by: David S. Miller

    Werner Almesberger
     

17 May, 2012

2 commits


06 Nov, 2009

2 commits


20 Aug, 2009

1 commit


23 Jul, 2009

1 commit