ieee802154: 6lowpan: register packet layer while open
ieee802154: 6lowpan: register packet layer while open

This patch moves the open count handling while doing open of a lowpan
interface. We need the packet handler register at first when one lowpan
interface is up. There exists a small case when all lowpan interfaces
are down and the 802154 packet layer is still registered. To reduce some
overhead we will register the packet layer when the first lowpan
interface comes up and unregister when the last interface will become down.

Reviewed-by: Stefan Schmidt <eb0877843acc39f8ef6f7269937dee931c372d23@osg.samsung.com>
Signed-off-by: Alexander Aring <d03dbcdedb9639e397df9b8578e8fc8274f4e6c4@gmail.com>
Signed-off-by: Marcel Holtmann <44592b4eea36663c86b994bb0ea99d15309c1c7d@holtmann.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs