diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-11-09 02:36:56 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-09 13:50:29 -0500 |
commit | b03c9cccfa808f1b314097b162a36c3937cb818e (patch) | |
tree | 6843ec083549c77ea68ff16d4be22bfd34025bb6 /net | |
parent | 4b96aea0fcdbba18287f6cca87c8d796f33157b6 (diff) |
mac820154: don't set monitor dev_addr
This patch removes the setting of dev_addr on a monitor device. This
address should be zero. A monitor should only sniff and send raw frames
out. The address should be never used by upper layers and receiving
frame parsing.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac802154/iface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c index 4630ceb25ad2..d635f367b03f 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c | |||
@@ -416,12 +416,14 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata, int type) | |||
416 | /* for compatibility, actual default is 3 */ | 416 | /* for compatibility, actual default is 3 */ |
417 | wpan_dev->frame_retries = -1; | 417 | wpan_dev->frame_retries = -1; |
418 | 418 | ||
419 | ieee802154_be64_to_le64(&wpan_dev->extended_addr, sdata->dev->dev_addr); | ||
420 | wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST); | 419 | wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST); |
421 | wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST); | 420 | wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST); |
422 | 421 | ||
423 | switch (type) { | 422 | switch (type) { |
424 | case IEEE802154_DEV_WPAN: | 423 | case IEEE802154_DEV_WPAN: |
424 | ieee802154_be64_to_le64(&wpan_dev->extended_addr, | ||
425 | sdata->dev->dev_addr); | ||
426 | |||
425 | sdata->dev->header_ops = &mac802154_header_ops; | 427 | sdata->dev->header_ops = &mac802154_header_ops; |
426 | sdata->dev->destructor = mac802154_wpan_free; | 428 | sdata->dev->destructor = mac802154_wpan_free; |
427 | sdata->dev->netdev_ops = &mac802154_wpan_ops; | 429 | sdata->dev->netdev_ops = &mac802154_wpan_ops; |