From: Felix Varghese <felixvarg...@gmail.com> Replaces the existing mib implementation where only some of the attributes are supported with the new MLME-PIB implementation.
Signed-off-by: Felix Varghese <felixvarg...@gmail.com> Signed-off-by: Prajosh Premdas <premdas.praj...@gmail.com> --- net/mac802154/Makefile | 3 ++- net/mac802154/ieee802154_dev.c | 10 ++-------- net/mac802154/mac_cmd.c | 8 ++++++++ net/mac802154/monitor.c | 7 +++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/net/mac802154/Makefile b/net/mac802154/Makefile index ec1bd3f..a3cd602 100644 --- a/net/mac802154/Makefile +++ b/net/mac802154/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_MAC802154) += mac802154.o -mac802154-objs := ieee802154_dev.o rx.o tx.o mac_cmd.o mib.o monitor.o +mac802154-objs := ieee802154_dev.o rx.o tx.o mac_cmd.o +mac802154-objs += monitor.o mib.o mlme_pib.o diff --git a/net/mac802154/ieee802154_dev.c b/net/mac802154/ieee802154_dev.c index cc85410..83fecb3 100644 --- a/net/mac802154/ieee802154_dev.c +++ b/net/mac802154/ieee802154_dev.c @@ -24,6 +24,8 @@ #include <net/mac802154.h> #include <net/wpan-phy.h> +#include <linux/module.h> + #include "mac802154.h" int mac802154_slave_open(struct net_device *dev) @@ -39,14 +41,6 @@ int mac802154_slave_open(struct net_device *dev) goto err; } - if (ipriv->ops->ieee_addr) { - res = ipriv->ops->ieee_addr(&ipriv->hw, dev->dev_addr); - WARN_ON(res); - if (res) - goto err; - mac802154_dev_set_ieee_addr(dev); - } - netif_start_queue(dev); return 0; err: diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c index 941c3e4..7406f5b 100644 --- a/net/mac802154/mac_cmd.c +++ b/net/mac802154/mac_cmd.c @@ -19,6 +19,8 @@ * Written by: * Sergey Lapin <sla...@ossfans.org> * Dmitry Eremin-Solenikov <dbarysh...@gmail.com> + * Felix Varghese <felix.vargh...@atmel.com> + * Prajosh Premdas <prajosh.prem...@atmel.com> */ #include <linux/skbuff.h> @@ -41,3 +43,9 @@ struct wpan_phy *mac802154_get_phy(const struct net_device *dev) struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced = { .get_phy = mac802154_get_phy, }; + +struct ieee802154_mlme_ops mac802154_mlme_device = { + .get_req = mlme_get_req, + .set_req = mlme_set_req, + .get_phy = mac802154_get_phy +}; diff --git a/net/mac802154/monitor.c b/net/mac802154/monitor.c index d76e8d0..78fafc5 100644 --- a/net/mac802154/monitor.c +++ b/net/mac802154/monitor.c @@ -87,7 +87,7 @@ void mac802154_monitors_rx(struct mac802154_priv *priv, struct sk_buff *skb) static const struct net_device_ops mac802154_monitor_ops = { .ndo_open = mac802154_slave_open, .ndo_stop = mac802154_slave_close, - .ndo_start_xmit = mac802154_monitor_xmit, + .ndo_start_xmit = mac802154_monitor_xmit, }; void mac802154_monitor_setup(struct net_device *dev) @@ -97,7 +97,7 @@ void mac802154_monitor_setup(struct net_device *dev) dev->addr_len = 0; dev->hard_header_len = 0; dev->needed_tailroom = 2; /* FCS */ - dev->mtu = IEEE802154_MTU; + dev->mtu = aMaxPHYPacketSize; dev->tx_queue_len = 10; dev->type = ARPHRD_IEEE802154_MONITOR; dev->flags = IFF_NOARP | IFF_BROADCAST; @@ -110,6 +110,5 @@ void mac802154_monitor_setup(struct net_device *dev) priv = netdev_priv(dev); priv->type = IEEE802154_DEV_MONITOR; - priv->chan = MAC802154_CHAN_NONE; /* not initialized */ - priv->page = 0; /* for compat */ + mutex_init(&priv->macPIB_lock); } -- 1.7.4.1 ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel