]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac802154: add hardware address filter flag
authorAlexander Aring <alex.aring@gmail.com>
Wed, 29 Oct 2014 20:34:31 +0000 (21:34 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 29 Oct 2014 22:07:44 +0000 (23:07 +0100)
Overdue introduction for address filtering hardware flag. Furthermore we
will check and set address filtering on interface up. This patch
prepares that we can check if an transceiver supports address filtering
option. Currently all mainline driver supports hardware address filtering.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Cc: Alan Ott <alan@signal11.us>
Cc: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/cc2520.c
drivers/net/ieee802154/mrf24j40.c
include/net/mac802154.h

index 005458821c5d7ebbadf42ac4c27b14842430d3c8..622c1b6f7fec5a234caced85298453f5e03dce95 100644 (file)
@@ -1387,7 +1387,8 @@ at86rf230_detect_device(struct at86rf230_local *lp)
 
        lp->hw->extra_tx_headroom = 0;
        lp->hw->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK |
-                       IEEE802154_HW_TXPOWER | IEEE802154_HW_ARET;
+                       IEEE802154_HW_TXPOWER | IEEE802154_HW_ARET |
+                       IEEE802154_HW_AFILT;
 
        switch (part) {
        case 2:
index c56d10c7ccfa5e9ad516cc5578f6093dc129136c..340671b747b1ae57704fd2edda226027254a08ff 100644 (file)
@@ -654,7 +654,8 @@ static int cc2520_register(struct cc2520_private *priv)
 
        /* We do support only 2.4 Ghz */
        priv->hw->phy->channels_supported[0] = 0x7FFF800;
-       priv->hw->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK;
+       priv->hw->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK |
+                         IEEE802154_HW_AFILT;
 
        dev_vdbg(&priv->spi->dev, "registered cc2520\n");
        ret = ieee802154_register_hw(priv->hw);
index 52b3d3116755ee89ac6b0efa8c7d645f4351e89c..a200fa16beae406757095f0f7090999b7a596b9c 100644 (file)
@@ -751,7 +751,8 @@ static int mrf24j40_probe(struct spi_device *spi)
        devrec->hw->priv = devrec;
        devrec->hw->parent = &devrec->spi->dev;
        devrec->hw->phy->channels_supported[0] = CHANNEL_MASK;
-       devrec->hw->flags = IEEE802154_HW_OMIT_CKSUM|IEEE802154_HW_AACK;
+       devrec->hw->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK |
+                           IEEE802154_HW_AFILT;
 
        dev_dbg(printdev(devrec), "registered mrf24j40\n");
        ret = ieee802154_register_hw(devrec->hw);
index c5d79384847a35e86f98c6100dc0cccfbf204980..2f523fc1bf805dc1100d2aa4cfd1f5f13bdd66db 100644 (file)
@@ -90,6 +90,8 @@ struct ieee802154_hw {
 #define IEEE802154_HW_CSMA_PARAMS      0x00000040
 /* Indicates that transceiver will support ARET frame retries setting. */
 #define IEEE802154_HW_FRAME_RETRIES    0x00000080
+/* Indicates that transceiver will support hardware address filter setting. */
+#define IEEE802154_HW_AFILT            0x00000100
 
 /* This groups the most common CSMA support fields into one. */
 #define IEEE802154_HW_CSMA             (IEEE802154_HW_CCA_MODE | \