* [PATCH bluetooth-next 0/8] ieee802154: pending patches
@ 2015-08-10 19:15 Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field Alexander Aring
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
Hi Marcel,
these are currently the pending patches for ieee802154 subsystem.
There is one patch which was send before ~ 5 months ago and I dropped
it again because the there was something wrong in the complete patch series
and then I forget that fix. Nevertheless it seems that the RIOT people hit it,
see:
https://github.com/RIOT-OS/RIOT/issues/3588#issuecomment-129509141
I hope the issue is fixed by PATCH "ieee802154: 6lowpan: fix error frag
handling".
One fix from Lukasz Duda which fixes the traffic class decompression
in 6LoWPAN code. There is indeed something wrong but I think the code needs
a complete reqwork.
The other patches changes the aret handling in ieee802154 by removing
the max_frame_retries "-1" value and do the ack handling per frame.
To set the ackrequest bit for 802.15.4 6LoWPAN frames we introcued
the ackrequest bit default handling which can set by nl802154.
Note:
There is another pending patch:
"cc2520: set the default fifo pin value from platform data"
but Varka didn't ack it yet, can you please apply this patch when Varka acked
it, otherwise we will include them for the next "pending patches" series.
- Alex
Alexander Aring (7):
ieee802154: 6lowpan: remove multiple lowpan per wpan support
mac802154: fix wpan mac setting while lowpan is there
mac802154: cfg: remove test and set checks
mac802154: change frame_retries behaviour
at86rf230: use STATE_TX_ARET mode only
ieee802154: add ack request default handling
ieee802154: 6lowpan: fix error frag handling
Lukasz Duda (1):
6lowpan: Fix extraction of flow label field
drivers/net/ieee802154/at86rf230.c | 52 ++++++++---------------------
include/net/cfg802154.h | 8 +++++
include/net/nl802154.h | 4 +++
net/6lowpan/iphc.c | 2 +-
net/ieee802154/6lowpan/6lowpan_i.h | 8 -----
net/ieee802154/6lowpan/core.c | 67 +++++++++++---------------------------
net/ieee802154/6lowpan/rx.c | 38 +++++----------------
net/ieee802154/6lowpan/tx.c | 4 +--
net/ieee802154/nl802154.c | 33 +++++++++++++++++++
net/ieee802154/rdev-ops.h | 13 ++++++++
net/ieee802154/trace.h | 19 +++++++++++
net/mac802154/cfg.c | 27 +++++++--------
net/mac802154/iface.c | 18 ++++++++--
net/mac802154/main.c | 9 ++---
14 files changed, 151 insertions(+), 151 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 2/8] ieee802154: 6lowpan: remove multiple lowpan per wpan support Alexander Aring
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Lukasz Duda, Glenn Ruben Bakke, Alexander Aring
From: Lukasz Duda <lukasz.duda@nordicsemi.no>
The lowpan_fetch_skb function is used to fetch the first byte,
which also increments the data pointer in skb structure,
making subsequent array lookup of byte 0 actually being byte 1.
To decompress the first byte of the Flow Label when the TF flag is
set to 0x01, the second half of the first byte is needed.
The patch fixes the extraction of the Flow Label field.
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/6lowpan/iphc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
index 9055d7b..74e56d7 100644
--- a/net/6lowpan/iphc.c
+++ b/net/6lowpan/iphc.c
@@ -284,7 +284,7 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,
if (lowpan_fetch_skb(skb, &tmp, sizeof(tmp)))
return -EINVAL;
- hdr.flow_lbl[0] = (skb->data[0] & 0x0F) | ((tmp >> 2) & 0x30);
+ hdr.flow_lbl[0] = (tmp & 0x0F) | ((tmp >> 2) & 0x30);
memcpy(&hdr.flow_lbl[1], &skb->data[0], 2);
skb_pull(skb, 2);
break;
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 2/8] ieee802154: 6lowpan: remove multiple lowpan per wpan support
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 3/8] mac802154: fix wpan mac setting while lowpan is there Alexander Aring
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
We currently supports multiple lowpan interfaces per wpan interface. I
never saw any use case into such functionality. We drop this feature now
because it's much easier do deal with address changes inside the under
laying wpan interface.
This patch removes the multiple lowpan interface and adds a lowpan_dev
netdev pointer into the wpan_dev, if this pointer isn't null the wpan
interface belongs to the assigned lowpan interface.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Tested-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
include/net/cfg802154.h | 3 ++
net/ieee802154/6lowpan/6lowpan_i.h | 8 -----
net/ieee802154/6lowpan/core.c | 67 +++++++++++---------------------------
net/ieee802154/6lowpan/rx.c | 38 +++++----------------
4 files changed, 30 insertions(+), 86 deletions(-)
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 382f94b..e53b6bf 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -173,6 +173,9 @@ struct wpan_dev {
struct list_head list;
struct net_device *netdev;
+ /* lowpan interface, set when the wpan_dev belongs to one lowpan_dev */
+ struct net_device *lowpan_dev;
+
u32 identifier;
/* MAC PIB */
diff --git a/net/ieee802154/6lowpan/6lowpan_i.h b/net/ieee802154/6lowpan/6lowpan_i.h
index e50f69d..923b680 100644
--- a/net/ieee802154/6lowpan/6lowpan_i.h
+++ b/net/ieee802154/6lowpan/6lowpan_i.h
@@ -37,15 +37,9 @@ static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a)
}
}
-struct lowpan_dev_record {
- struct net_device *ldev;
- struct list_head list;
-};
-
/* private device info */
struct lowpan_dev_info {
struct net_device *real_dev; /* real WPAN device ptr */
- struct mutex dev_list_mtx; /* mutex for list ops */
u16 fragment_tag;
};
@@ -55,8 +49,6 @@ lowpan_dev_info *lowpan_dev_info(const struct net_device *dev)
return netdev_priv(dev);
}
-extern struct list_head lowpan_devices;
-
int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type);
void lowpan_net_frag_exit(void);
int lowpan_net_frag_init(void);
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index f20a387..a4edee8 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -52,9 +52,6 @@
#include "6lowpan_i.h"
-LIST_HEAD(lowpan_devices);
-static int lowpan_open_count;
-
static struct header_ops lowpan_header_ops = {
.create = lowpan_header_create,
};
@@ -114,7 +111,6 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[])
{
struct net_device *real_dev;
- struct lowpan_dev_record *entry;
int ret;
ASSERT_RTNL();
@@ -133,31 +129,19 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
return -EINVAL;
}
- lowpan_dev_info(dev)->real_dev = real_dev;
- mutex_init(&lowpan_dev_info(dev)->dev_list_mtx);
-
- entry = kzalloc(sizeof(*entry), GFP_KERNEL);
- if (!entry) {
+ if (real_dev->ieee802154_ptr->lowpan_dev) {
dev_put(real_dev);
- lowpan_dev_info(dev)->real_dev = NULL;
- return -ENOMEM;
+ return -EBUSY;
}
- entry->ldev = dev;
-
+ lowpan_dev_info(dev)->real_dev = real_dev;
/* Set the lowpan hardware address to the wpan hardware address. */
memcpy(dev->dev_addr, real_dev->dev_addr, IEEE802154_ADDR_LEN);
- mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
- INIT_LIST_HEAD(&entry->list);
- list_add_tail(&entry->list, &lowpan_devices);
- mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx);
-
ret = register_netdevice(dev);
if (ret >= 0) {
- if (!lowpan_open_count)
- lowpan_rx_init();
- lowpan_open_count++;
+ real_dev->ieee802154_ptr->lowpan_dev = dev;
+ lowpan_rx_init();
}
return ret;
@@ -167,27 +151,12 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
{
struct lowpan_dev_info *lowpan_dev = lowpan_dev_info(dev);
struct net_device *real_dev = lowpan_dev->real_dev;
- struct lowpan_dev_record *entry, *tmp;
ASSERT_RTNL();
- lowpan_open_count--;
- if (!lowpan_open_count)
- lowpan_rx_exit();
-
- mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
- list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
- if (entry->ldev == dev) {
- list_del(&entry->list);
- kfree(entry);
- }
- }
- mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx);
-
- mutex_destroy(&lowpan_dev_info(dev)->dev_list_mtx);
-
- unregister_netdevice_queue(dev, head);
-
+ lowpan_rx_exit();
+ real_dev->ieee802154_ptr->lowpan_dev = NULL;
+ unregister_netdevice(dev);
dev_put(real_dev);
}
@@ -214,19 +183,21 @@ static int lowpan_device_event(struct notifier_block *unused,
unsigned long event, void *ptr)
{
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
- LIST_HEAD(del_list);
- struct lowpan_dev_record *entry, *tmp;
if (dev->type != ARPHRD_IEEE802154)
goto out;
- if (event == NETDEV_UNREGISTER) {
- list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
- if (lowpan_dev_info(entry->ldev)->real_dev == dev)
- lowpan_dellink(entry->ldev, &del_list);
- }
-
- unregister_netdevice_many(&del_list);
+ switch (event) {
+ case NETDEV_UNREGISTER:
+ /* Check if wpan interface is unregistered that we
+ * also delete possible lowpan interfaces which belongs
+ * to the wpan interface.
+ */
+ if (dev->ieee802154_ptr && dev->ieee802154_ptr->lowpan_dev)
+ lowpan_dellink(dev->ieee802154_ptr->lowpan_dev, NULL);
+ break;
+ default:
+ break;
}
out:
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c
index 4be1d28..d6f5e8e 100644
--- a/net/ieee802154/6lowpan/rx.c
+++ b/net/ieee802154/6lowpan/rx.c
@@ -15,36 +15,14 @@
#include "6lowpan_i.h"
-static int lowpan_give_skb_to_devices(struct sk_buff *skb,
- struct net_device *dev)
+static int lowpan_give_skb_to_device(struct sk_buff *skb,
+ struct net_device *dev)
{
- struct lowpan_dev_record *entry;
- struct sk_buff *skb_cp;
- int stat = NET_RX_SUCCESS;
-
+ skb->dev = dev->ieee802154_ptr->lowpan_dev;
skb->protocol = htons(ETH_P_IPV6);
skb->pkt_type = PACKET_HOST;
- rcu_read_lock();
- list_for_each_entry_rcu(entry, &lowpan_devices, list)
- if (lowpan_dev_info(entry->ldev)->real_dev == skb->dev) {
- skb_cp = skb_copy(skb, GFP_ATOMIC);
- if (!skb_cp) {
- kfree_skb(skb);
- rcu_read_unlock();
- return NET_RX_DROP;
- }
-
- skb_cp->dev = entry->ldev;
- stat = netif_rx(skb_cp);
- if (stat == NET_RX_DROP)
- break;
- }
- rcu_read_unlock();
-
- consume_skb(skb);
-
- return stat;
+ return netif_rx(skb);
}
static int
@@ -109,7 +87,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
if (skb->data[0] == LOWPAN_DISPATCH_IPV6) {
/* Pull off the 1-byte of 6lowpan header. */
skb_pull(skb, 1);
- return lowpan_give_skb_to_devices(skb, NULL);
+ return lowpan_give_skb_to_device(skb, dev);
} else {
switch (skb->data[0] & 0xe0) {
case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */
@@ -117,7 +95,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
if (ret < 0)
goto drop_skb;
- return lowpan_give_skb_to_devices(skb, NULL);
+ return lowpan_give_skb_to_device(skb, dev);
case LOWPAN_DISPATCH_FRAG1: /* first fragment header */
ret = lowpan_frag_rcv(skb, LOWPAN_DISPATCH_FRAG1);
if (ret == 1) {
@@ -125,7 +103,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
if (ret < 0)
goto drop_skb;
- return lowpan_give_skb_to_devices(skb, NULL);
+ return lowpan_give_skb_to_device(skb, dev);
} else if (ret == -1) {
return NET_RX_DROP;
} else {
@@ -138,7 +116,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
if (ret < 0)
goto drop_skb;
- return lowpan_give_skb_to_devices(skb, NULL);
+ return lowpan_give_skb_to_device(skb, dev);
} else if (ret == -1) {
return NET_RX_DROP;
} else {
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 3/8] mac802154: fix wpan mac setting while lowpan is there
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 2/8] ieee802154: 6lowpan: remove multiple lowpan per wpan support Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 4/8] mac802154: cfg: remove test and set checks Alexander Aring
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
If we currently change the mac address inside the wpan interface while
we have a lowpan interface on top of the wpan interface, the mac address
setting doesn't reach the lowpan interface. The effect would be that the
IPv6 lowpan interface has the old SLAAC address and isn't working
anymore because the lowpan interface use in internal mechanism sometimes
dev->addr which is the old mac address of the wpan interface.
This patch checks if a wpan interface belongs to lowpan interface, if
yes then we need to check if the lowpan interface is down and change the
mac address also at the lowpan interface. When the lowpan interface will
be set up afterwards, it will use the correct SLAAC address which based
on the updated mac address setting.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Tested-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/iface.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 416de90..ff99055 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -125,6 +125,14 @@ static int mac802154_wpan_mac_addr(struct net_device *dev, void *p)
if (netif_running(dev))
return -EBUSY;
+ /* lowpan need to be down for update
+ * SLAAC address after ifup
+ */
+ if (sdata->wpan_dev.lowpan_dev) {
+ if (netif_running(sdata->wpan_dev.lowpan_dev))
+ return -EBUSY;
+ }
+
ieee802154_be64_to_le64(&extended_addr, addr->sa_data);
if (!ieee802154_is_valid_extended_unicast_addr(extended_addr))
return -EINVAL;
@@ -132,6 +140,13 @@ static int mac802154_wpan_mac_addr(struct net_device *dev, void *p)
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
sdata->wpan_dev.extended_addr = extended_addr;
+ /* update lowpan interface mac address when
+ * wpan mac has been changed
+ */
+ if (sdata->wpan_dev.lowpan_dev)
+ memcpy(sdata->wpan_dev.lowpan_dev->dev_addr, dev->dev_addr,
+ dev->addr_len);
+
return mac802154_wpan_update_llsec(dev);
}
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 4/8] mac802154: cfg: remove test and set checks
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (2 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 3/8] mac802154: fix wpan mac setting while lowpan is there Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 5/8] mac802154: change frame_retries behaviour Alexander Aring
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch removes several checks if a value is really changed. This
makes only sense if we have another layer call e.g. calling the
driver_ops which is done by callbacks like "set_channel".
For MAC settings which need to be set by phy registers (if the phy
supports that handling) this is set by doing an interface up currently
and are not direct driver_ops calls, so we remove the checks from these
configuration callbacks.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Suggested-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/cfg.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index f7ba51e..cecfcda 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -209,10 +209,6 @@ ieee802154_set_backoff_exponent(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();
- if (wpan_dev->min_be == min_be &&
- wpan_dev->max_be == max_be)
- return 0;
-
wpan_dev->min_be = min_be;
wpan_dev->max_be = max_be;
return 0;
@@ -224,9 +220,6 @@ ieee802154_set_short_addr(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
{
ASSERT_RTNL();
- if (wpan_dev->short_addr == short_addr)
- return 0;
-
wpan_dev->short_addr = short_addr;
return 0;
}
@@ -238,9 +231,6 @@ ieee802154_set_max_csma_backoffs(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();
- if (wpan_dev->csma_retries == max_csma_backoffs)
- return 0;
-
wpan_dev->csma_retries = max_csma_backoffs;
return 0;
}
@@ -252,9 +242,6 @@ ieee802154_set_max_frame_retries(struct wpan_phy *wpan_phy,
{
ASSERT_RTNL();
- if (wpan_dev->frame_retries == max_frame_retries)
- return 0;
-
wpan_dev->frame_retries = max_frame_retries;
return 0;
}
@@ -265,9 +252,6 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
{
ASSERT_RTNL();
- if (wpan_dev->lbt == mode)
- return 0;
-
wpan_dev->lbt = mode;
return 0;
}
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 5/8] mac802154: change frame_retries behaviour
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (3 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 4/8] mac802154: cfg: remove test and set checks Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 6/8] at86rf230: use STATE_TX_ARET mode only Alexander Aring
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch changes the default minimum value of frame_retries to 0 and
changes the frame_retries default value to 3 which is also 802.15.4
default.
We don't use the frame_retries "-1" value as indicator for no-aret mode
anymore, instead we checking on the ack request bit inside the 802.15.4
frame control field. This allows a acknowledge handling per frame. This
checking is done by transceiver or inside xmit callback of driver layer.
If a transceiver doesn't support ARET handling the transmit
functionality ignores ack frames then, which isn't well but should not
effect anything of current functionality.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/iface.c | 3 +--
net/mac802154/main.c | 9 +++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index ff99055..ed26952 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -498,8 +498,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
wpan_dev->min_be = 3;
wpan_dev->max_be = 5;
wpan_dev->csma_retries = 4;
- /* for compatibility, actual default is 3 */
- wpan_dev->frame_retries = -1;
+ wpan_dev->frame_retries = 3;
wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST);
wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST);
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 9e55431..e8cab5b 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -111,7 +111,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
phy->supported.max_minbe = 8;
phy->supported.min_maxbe = 3;
phy->supported.max_maxbe = 8;
- phy->supported.min_frame_retries = -1;
+ phy->supported.min_frame_retries = 0;
phy->supported.max_frame_retries = 7;
phy->supported.max_csma_backoffs = 5;
phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE;
@@ -177,11 +177,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
}
if (!(hw->flags & IEEE802154_HW_FRAME_RETRIES)) {
- /* TODO should be 3, but our default value is -1 which means
- * no ARET handling.
- */
- local->phy->supported.min_frame_retries = -1;
- local->phy->supported.max_frame_retries = -1;
+ local->phy->supported.min_frame_retries = 3;
+ local->phy->supported.max_frame_retries = 3;
}
if (hw->flags & IEEE802154_HW_PROMISCUOUS)
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 6/8] at86rf230: use STATE_TX_ARET mode only
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (4 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 5/8] mac802154: change frame_retries behaviour Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 7/8] ieee802154: add ack request default handling Alexander Aring
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch changes the state change behaviour of at86rf230 to always
TX_ARET mode. According the at86rf2xx datasheets TX_ARET mode doesn't
mean to be always waiting for ack frames after transmit. The transceiver
will automatically wait for ack frames or not if the acknowledge request
bit is set. See section "TX_ARET_ON – Transmit with Automatic Frame
Retransmission and CSMA-CA Retry".
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
drivers/net/ieee802154/at86rf230.c | 52 ++++++++++----------------------------
1 file changed, 14 insertions(+), 38 deletions(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index d0d5bf6..6422caa 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -97,9 +97,7 @@ struct at86rf230_local {
struct at86rf230_state_change irq;
- bool tx_aret;
unsigned long cal_timeout;
- s8 max_frame_retries;
bool is_tx;
bool is_tx_from_off;
u8 tx_retry;
@@ -651,7 +649,7 @@ at86rf230_tx_complete(void *context)
enable_irq(ctx->irq);
- ieee802154_xmit_complete(lp->hw, lp->tx_skb, !lp->tx_aret);
+ ieee802154_xmit_complete(lp->hw, lp->tx_skb, false);
}
static void
@@ -760,17 +758,10 @@ at86rf230_irq_trx_end(struct at86rf230_local *lp)
{
if (lp->is_tx) {
lp->is_tx = 0;
-
- if (lp->tx_aret)
- at86rf230_async_state_change(lp, &lp->irq,
- STATE_FORCE_TX_ON,
- at86rf230_tx_trac_status,
- true);
- else
- at86rf230_async_state_change(lp, &lp->irq,
- STATE_RX_AACK_ON,
- at86rf230_tx_complete,
- true);
+ at86rf230_async_state_change(lp, &lp->irq,
+ STATE_FORCE_TX_ON,
+ at86rf230_tx_trac_status,
+ true);
} else {
at86rf230_async_read_reg(lp, RG_TRX_STATE, &lp->irq,
at86rf230_rx_trac_check, true);
@@ -876,24 +867,16 @@ at86rf230_xmit_start(void *context)
struct at86rf230_state_change *ctx = context;
struct at86rf230_local *lp = ctx->lp;
- /* In ARET mode we need to go into STATE_TX_ARET_ON after we
- * are in STATE_TX_ON. The pfad differs here, so we change
- * the complete handler.
- */
- if (lp->tx_aret) {
- if (lp->is_tx_from_off) {
- lp->is_tx_from_off = false;
- at86rf230_async_state_change(lp, ctx, STATE_TX_ARET_ON,
- at86rf230_write_frame,
- false);
- } else {
- at86rf230_async_state_change(lp, ctx, STATE_TX_ON,
- at86rf230_xmit_tx_on,
- false);
- }
+ /* check if we change from off state */
+ if (lp->is_tx_from_off) {
+ lp->is_tx_from_off = false;
+ at86rf230_async_state_change(lp, ctx, STATE_TX_ARET_ON,
+ at86rf230_write_frame,
+ false);
} else {
at86rf230_async_state_change(lp, ctx, STATE_TX_ON,
- at86rf230_write_frame, false);
+ at86rf230_xmit_tx_on,
+ false);
}
}
@@ -1267,15 +1250,8 @@ static int
at86rf230_set_frame_retries(struct ieee802154_hw *hw, s8 retries)
{
struct at86rf230_local *lp = hw->priv;
- int rc = 0;
-
- lp->tx_aret = retries >= 0;
- lp->max_frame_retries = retries;
- if (retries >= 0)
- rc = at86rf230_write_subreg(lp, SR_MAX_FRAME_RETRIES, retries);
-
- return rc;
+ return at86rf230_write_subreg(lp, SR_MAX_FRAME_RETRIES, retries);
}
static int
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 7/8] ieee802154: add ack request default handling
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (5 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 6/8] at86rf230: use STATE_TX_ARET mode only Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 8/8] ieee802154: 6lowpan: fix error frag handling Alexander Aring
2015-08-10 19:30 ` [PATCH bluetooth-next 0/8] ieee802154: pending patches Marcel Holtmann
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch introduce a new mib entry which isn't part of 802.15.4 but
useful as default behaviour to set the ack request bit or not if we
don't know if the ack request bit should set. This is currently used for
stacks like IEEE 802.15.4 6LoWPAN.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
include/net/cfg802154.h | 5 +++++
include/net/nl802154.h | 4 ++++
net/ieee802154/6lowpan/tx.c | 2 +-
net/ieee802154/nl802154.c | 33 +++++++++++++++++++++++++++++++++
net/ieee802154/rdev-ops.h | 13 +++++++++++++
net/ieee802154/trace.h | 19 +++++++++++++++++++
net/mac802154/cfg.c | 11 +++++++++++
7 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index e53b6bf..76b1ffa 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -63,6 +63,8 @@ struct cfg802154_ops {
s8 max_frame_retries);
int (*set_lbt_mode)(struct wpan_phy *wpan_phy,
struct wpan_dev *wpan_dev, bool mode);
+ int (*set_ackreq_default)(struct wpan_phy *wpan_phy,
+ struct wpan_dev *wpan_dev, bool ackreq);
};
static inline bool
@@ -196,6 +198,9 @@ struct wpan_dev {
bool lbt;
bool promiscuous_mode;
+
+ /* fallback for acknowledgment bit setting */
+ bool ackreq;
};
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
diff --git a/include/net/nl802154.h b/include/net/nl802154.h
index b0ab530..cf2713d 100644
--- a/include/net/nl802154.h
+++ b/include/net/nl802154.h
@@ -52,6 +52,8 @@ enum nl802154_commands {
NL802154_CMD_SET_LBT_MODE,
+ NL802154_CMD_SET_ACKREQ_DEFAULT,
+
/* add new commands above here */
/* used to define NL802154_CMD_MAX below */
@@ -104,6 +106,8 @@ enum nl802154_attrs {
NL802154_ATTR_SUPPORTED_COMMANDS,
+ NL802154_ATTR_ACKREQ_DEFAULT,
+
/* add attributes here, update the policy in nl802154.c */
__NL802154_ATTR_AFTER_LAST,
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c
index 2597abb..1bf4a30 100644
--- a/net/ieee802154/6lowpan/tx.c
+++ b/net/ieee802154/6lowpan/tx.c
@@ -224,7 +224,7 @@ static int lowpan_header(struct sk_buff *skb, struct net_device *dev)
} else {
da.mode = IEEE802154_ADDR_LONG;
da.extended_addr = ieee802154_devaddr_from_raw(daddr);
- cb->ackreq = wpan_dev->frame_retries >= 0;
+ cb->ackreq = wpan_dev->ackreq;
}
return dev_hard_header(skb, lowpan_dev_info(dev)->real_dev,
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 68f2401..1b00a14 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -230,6 +230,8 @@ static const struct nla_policy nl802154_policy[NL802154_ATTR_MAX+1] = {
[NL802154_ATTR_WPAN_PHY_CAPS] = { .type = NLA_NESTED },
[NL802154_ATTR_SUPPORTED_COMMANDS] = { .type = NLA_NESTED },
+
+ [NL802154_ATTR_ACKREQ_DEFAULT] = { .type = NLA_U8 },
};
/* message building helper */
@@ -458,6 +460,7 @@ static int nl802154_send_wpan_phy(struct cfg802154_registered_device *rdev,
CMD(set_max_csma_backoffs, SET_MAX_CSMA_BACKOFFS);
CMD(set_max_frame_retries, SET_MAX_FRAME_RETRIES);
CMD(set_lbt_mode, SET_LBT_MODE);
+ CMD(set_ackreq_default, SET_ACKREQ_DEFAULT);
if (rdev->wpan_phy.flags & WPAN_PHY_FLAG_TXPOWER)
CMD(set_tx_power, SET_TX_POWER);
@@ -656,6 +659,10 @@ nl802154_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flags,
if (nla_put_u8(msg, NL802154_ATTR_LBT_MODE, wpan_dev->lbt))
goto nla_put_failure;
+ /* ackreq default behaviour */
+ if (nla_put_u8(msg, NL802154_ATTR_ACKREQ_DEFAULT, wpan_dev->ackreq))
+ goto nla_put_failure;
+
genlmsg_end(msg, hdr);
return 0;
@@ -1042,6 +1049,24 @@ static int nl802154_set_lbt_mode(struct sk_buff *skb, struct genl_info *info)
return rdev_set_lbt_mode(rdev, wpan_dev, mode);
}
+static int
+nl802154_set_ackreq_default(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg802154_registered_device *rdev = info->user_ptr[0];
+ struct net_device *dev = info->user_ptr[1];
+ struct wpan_dev *wpan_dev = dev->ieee802154_ptr;
+ bool ackreq;
+
+ if (netif_running(dev))
+ return -EBUSY;
+
+ if (!info->attrs[NL802154_ATTR_ACKREQ_DEFAULT])
+ return -EINVAL;
+
+ ackreq = !!nla_get_u8(info->attrs[NL802154_ATTR_ACKREQ_DEFAULT]);
+ return rdev_set_ackreq_default(rdev, wpan_dev, ackreq);
+}
+
#define NL802154_FLAG_NEED_WPAN_PHY 0x01
#define NL802154_FLAG_NEED_NETDEV 0x02
#define NL802154_FLAG_NEED_RTNL 0x04
@@ -1248,6 +1273,14 @@ static const struct genl_ops nl802154_ops[] = {
.internal_flags = NL802154_FLAG_NEED_NETDEV |
NL802154_FLAG_NEED_RTNL,
},
+ {
+ .cmd = NL802154_CMD_SET_ACKREQ_DEFAULT,
+ .doit = nl802154_set_ackreq_default,
+ .policy = nl802154_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL802154_FLAG_NEED_NETDEV |
+ NL802154_FLAG_NEED_RTNL,
+ },
};
/* initialisation/exit functions */
diff --git a/net/ieee802154/rdev-ops.h b/net/ieee802154/rdev-ops.h
index 8d5960a..03b3575 100644
--- a/net/ieee802154/rdev-ops.h
+++ b/net/ieee802154/rdev-ops.h
@@ -195,4 +195,17 @@ rdev_set_lbt_mode(struct cfg802154_registered_device *rdev,
return ret;
}
+static inline int
+rdev_set_ackreq_default(struct cfg802154_registered_device *rdev,
+ struct wpan_dev *wpan_dev, bool ackreq)
+{
+ int ret;
+
+ trace_802154_rdev_set_ackreq_default(&rdev->wpan_phy, wpan_dev,
+ ackreq);
+ ret = rdev->ops->set_ackreq_default(&rdev->wpan_phy, wpan_dev, ackreq);
+ trace_802154_rdev_return_int(&rdev->wpan_phy, ret);
+ return ret;
+}
+
#endif /* __CFG802154_RDEV_OPS */
diff --git a/net/ieee802154/trace.h b/net/ieee802154/trace.h
index 4399b7f..9a471e4 100644
--- a/net/ieee802154/trace.h
+++ b/net/ieee802154/trace.h
@@ -275,6 +275,25 @@ TRACE_EVENT(802154_rdev_set_lbt_mode,
WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->mode))
);
+TRACE_EVENT(802154_rdev_set_ackreq_default,
+ TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
+ bool ackreq),
+ TP_ARGS(wpan_phy, wpan_dev, ackreq),
+ TP_STRUCT__entry(
+ WPAN_PHY_ENTRY
+ WPAN_DEV_ENTRY
+ __field(bool, ackreq)
+ ),
+ TP_fast_assign(
+ WPAN_PHY_ASSIGN;
+ WPAN_DEV_ASSIGN;
+ __entry->ackreq = ackreq;
+ ),
+ TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
+ ", ackreq default: %s", WPAN_PHY_PR_ARG,
+ WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->ackreq))
+);
+
TRACE_EVENT(802154_rdev_return_int,
TP_PROTO(struct wpan_phy *wpan_phy, int ret),
TP_ARGS(wpan_phy, ret),
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index cecfcda..c865ebb 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -256,6 +256,16 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
return 0;
}
+static int
+ieee802154_set_ackreq_default(struct wpan_phy *wpan_phy,
+ struct wpan_dev *wpan_dev, bool ackreq)
+{
+ ASSERT_RTNL();
+
+ wpan_dev->ackreq = ackreq;
+ return 0;
+}
+
const struct cfg802154_ops mac802154_config_ops = {
.add_virtual_intf_deprecated = ieee802154_add_iface_deprecated,
.del_virtual_intf_deprecated = ieee802154_del_iface_deprecated,
@@ -273,4 +283,5 @@ const struct cfg802154_ops mac802154_config_ops = {
.set_max_csma_backoffs = ieee802154_set_max_csma_backoffs,
.set_max_frame_retries = ieee802154_set_max_frame_retries,
.set_lbt_mode = ieee802154_set_lbt_mode,
+ .set_ackreq_default = ieee802154_set_ackreq_default,
};
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH bluetooth-next 8/8] ieee802154: 6lowpan: fix error frag handling
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (6 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 7/8] ieee802154: add ack request default handling Alexander Aring
@ 2015-08-10 19:15 ` Alexander Aring
2015-08-10 19:30 ` [PATCH bluetooth-next 0/8] ieee802154: pending patches Marcel Holtmann
8 siblings, 0 replies; 10+ messages in thread
From: Alexander Aring @ 2015-08-10 19:15 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch fixes the error handling for lowpan_xmit_fragment by replace
"-PTR_ERR" to "PTR_ERR". PTR_ERR returns already a negative errno code.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/ieee802154/6lowpan/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c
index 1bf4a30..f6263fc 100644
--- a/net/ieee802154/6lowpan/tx.c
+++ b/net/ieee802154/6lowpan/tx.c
@@ -112,7 +112,7 @@ lowpan_xmit_fragment(struct sk_buff *skb, const struct ieee802154_hdr *wpan_hdr,
frag = lowpan_alloc_frag(skb, frag_hdrlen + len, wpan_hdr);
if (IS_ERR(frag))
- return -PTR_ERR(frag);
+ return PTR_ERR(frag);
memcpy(skb_put(frag, frag_hdrlen), frag_hdr, frag_hdrlen);
memcpy(skb_put(frag, len), skb_network_header(skb) + offset, len);
--
2.5.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH bluetooth-next 0/8] ieee802154: pending patches
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
` (7 preceding siblings ...)
2015-08-10 19:15 ` [PATCH bluetooth-next 8/8] ieee802154: 6lowpan: fix error frag handling Alexander Aring
@ 2015-08-10 19:30 ` Marcel Holtmann
8 siblings, 0 replies; 10+ messages in thread
From: Marcel Holtmann @ 2015-08-10 19:30 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan, kernel
Hi Alex,
> these are currently the pending patches for ieee802154 subsystem.
>
> There is one patch which was send before ~ 5 months ago and I dropped
> it again because the there was something wrong in the complete patch series
> and then I forget that fix. Nevertheless it seems that the RIOT people hit it,
> see:
>
> https://github.com/RIOT-OS/RIOT/issues/3588#issuecomment-129509141
>
> I hope the issue is fixed by PATCH "ieee802154: 6lowpan: fix error frag
> handling".
>
> One fix from Lukasz Duda which fixes the traffic class decompression
> in 6LoWPAN code. There is indeed something wrong but I think the code needs
> a complete reqwork.
>
> The other patches changes the aret handling in ieee802154 by removing
> the max_frame_retries "-1" value and do the ack handling per frame.
> To set the ackrequest bit for 802.15.4 6LoWPAN frames we introcued
> the ackrequest bit default handling which can set by nl802154.
>
> Note:
>
> There is another pending patch:
>
> "cc2520: set the default fifo pin value from platform data"
>
> but Varka didn't ack it yet, can you please apply this patch when Varka acked
> it, otherwise we will include them for the next "pending patches" series.
>
> - Alex
>
> Alexander Aring (7):
> ieee802154: 6lowpan: remove multiple lowpan per wpan support
> mac802154: fix wpan mac setting while lowpan is there
> mac802154: cfg: remove test and set checks
> mac802154: change frame_retries behaviour
> at86rf230: use STATE_TX_ARET mode only
> ieee802154: add ack request default handling
> ieee802154: 6lowpan: fix error frag handling
>
> Lukasz Duda (1):
> 6lowpan: Fix extraction of flow label field
>
> drivers/net/ieee802154/at86rf230.c | 52 ++++++++---------------------
> include/net/cfg802154.h | 8 +++++
> include/net/nl802154.h | 4 +++
> net/6lowpan/iphc.c | 2 +-
> net/ieee802154/6lowpan/6lowpan_i.h | 8 -----
> net/ieee802154/6lowpan/core.c | 67 +++++++++++---------------------------
> net/ieee802154/6lowpan/rx.c | 38 +++++----------------
> net/ieee802154/6lowpan/tx.c | 4 +--
> net/ieee802154/nl802154.c | 33 +++++++++++++++++++
> net/ieee802154/rdev-ops.h | 13 ++++++++
> net/ieee802154/trace.h | 19 +++++++++++
> net/mac802154/cfg.c | 27 +++++++--------
> net/mac802154/iface.c | 18 ++++++++--
> net/mac802154/main.c | 9 ++---
> 14 files changed, 151 insertions(+), 151 deletions(-)
all 8 patches have been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-08-10 19:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 2/8] ieee802154: 6lowpan: remove multiple lowpan per wpan support Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 3/8] mac802154: fix wpan mac setting while lowpan is there Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 4/8] mac802154: cfg: remove test and set checks Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 5/8] mac802154: change frame_retries behaviour Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 6/8] at86rf230: use STATE_TX_ARET mode only Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 7/8] ieee802154: add ack request default handling Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 8/8] ieee802154: 6lowpan: fix error frag handling Alexander Aring
2015-08-10 19:30 ` [PATCH bluetooth-next 0/8] ieee802154: pending patches Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.