ca8210.c (b8fa3e3833c14151a47ebebbc5427dcfe94bb407) ca8210.c (25fd0550d9b9c92288a17fb7d605cdcdb4a65a64)
1/*
2 * http://www.cascoda.com/products/ca-821x/
3 * Copyright (c) 2016, Cascoda, Ltd.
4 * All rights reserved.
5 *
6 * This code is dual-licensed under both GPLv2 and 3-clause BSD. What follows is
7 * the license notice for both respectively.
8 *

--- 1899 unchanged lines hidden (view full) ---

1908 unsigned int mac_len;
1909
1910 dev_dbg(&priv->spi->dev, "%s called\n", __func__);
1911
1912 /* Get addressing info from skb - ieee802154 layer creates a full
1913 * packet
1914 */
1915 mac_len = ieee802154_hdr_peek_addrs(skb, &header);
1/*
2 * http://www.cascoda.com/products/ca-821x/
3 * Copyright (c) 2016, Cascoda, Ltd.
4 * All rights reserved.
5 *
6 * This code is dual-licensed under both GPLv2 and 3-clause BSD. What follows is
7 * the license notice for both respectively.
8 *

--- 1899 unchanged lines hidden (view full) ---

1908 unsigned int mac_len;
1909
1910 dev_dbg(&priv->spi->dev, "%s called\n", __func__);
1911
1912 /* Get addressing info from skb - ieee802154 layer creates a full
1913 * packet
1914 */
1915 mac_len = ieee802154_hdr_peek_addrs(skb, &header);
1916 if (mac_len < 0)
1917 return mac_len;
1918
1919 secspec.security_level = header.sec.level;
1920 secspec.key_id_mode = header.sec.key_id_mode;
1921 if (secspec.key_id_mode == 2)
1922 memcpy(secspec.key_source, &header.sec.short_src, 4);
1923 else if (secspec.key_id_mode == 3)
1924 memcpy(secspec.key_source, &header.sec.extended_src, 8);
1925 secspec.key_index = header.sec.key_id;

--- 1038 unchanged lines hidden (view full) ---

2964 struct ca8210_test *test = &priv->test;
2965 char node_name[32];
2966
2967 snprintf(
2968 node_name,
2969 sizeof(node_name),
2970 "ca8210@%d_%d",
2971 priv->spi->master->bus_num,
1916
1917 secspec.security_level = header.sec.level;
1918 secspec.key_id_mode = header.sec.key_id_mode;
1919 if (secspec.key_id_mode == 2)
1920 memcpy(secspec.key_source, &header.sec.short_src, 4);
1921 else if (secspec.key_id_mode == 3)
1922 memcpy(secspec.key_source, &header.sec.extended_src, 8);
1923 secspec.key_index = header.sec.key_id;

--- 1038 unchanged lines hidden (view full) ---

2962 struct ca8210_test *test = &priv->test;
2963 char node_name[32];
2964
2965 snprintf(
2966 node_name,
2967 sizeof(node_name),
2968 "ca8210@%d_%d",
2969 priv->spi->master->bus_num,
2972 priv->spi->chip_select
2970 spi_get_chipselect(priv->spi, 0)
2973 );
2974
2975 test->ca8210_dfs_spi_int = debugfs_create_file(
2976 node_name,
2977 0600, /* S_IRUSR | S_IWUSR */
2978 NULL,
2979 priv,
2980 &test_int_fops

--- 214 unchanged lines hidden ---
2971 );
2972
2973 test->ca8210_dfs_spi_int = debugfs_create_file(
2974 node_name,
2975 0600, /* S_IRUSR | S_IWUSR */
2976 NULL,
2977 priv,
2978 &test_int_fops

--- 214 unchanged lines hidden ---