Re: [RFC v2 4/4] Bluetooth: 6lowpan: Enable stateful compression in bluetooth_6lowpan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2015 at 01:50:33PM +0200, Lukasz Duda wrote:
> Allocating context table for stateful compression when interface is set
> up. Removing context table when interface is being unregistered.
> 
> Signed-off-by: Lukasz Duda <lukasz.duda@xxxxxxxxxxxxx>
> Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@xxxxxxxxxxxxx>
> ---
>  net/bluetooth/6lowpan.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> index 2fb7b30..60c7e80 100644
> --- a/net/bluetooth/6lowpan.c
> +++ b/net/bluetooth/6lowpan.c
> @@ -871,6 +871,9 @@ static int setup_netdev(struct l2cap_chan *chan, struct lowpan_dev **dev)
>  	       &chan->src, chan->src_type);
>  	set_bit(__LINK_STATE_PRESENT, &netdev->state);
>  
> +	/* Allocate context table for stateful compression. */
> +	lowpan_context_table_alloc(netdev);
> +
>  	*dev = netdev_priv(netdev);
>  	(*dev)->netdev = netdev;
>  	(*dev)->hdev = chan->conn->hcon->hdev;
> @@ -1415,6 +1418,7 @@ static int device_event(struct notifier_block *unused,
>  			if (entry->netdev == netdev) {
>  				BT_DBG("Unregistered netdev %s %p",
>  				       netdev->name, netdev);
> +				lowpan_context_table_free(netdev);
>  				list_del(&entry->list);
>  				break;
>  			}

Don't we need similar allocation in net/ieee802154/6lowpan/core.c ?

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux