Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18722c24 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Marcel Holtmann
Browse files

Bluetooth: Enable 6LoWPAN support for BT LE devices

This is initial version of
http://tools.ietf.org/html/draft-ietf-6lo-btle-00



By default the 6LoWPAN support is not activated and user
needs to tweak /sys/kernel/debug/bluetooth/hci0/6lowpan
file.

The kernel needs IPv6 support before 6LoWPAN is usable.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e74bccb8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ enum {
	HCI_PERIODIC_INQ,
	HCI_FAST_CONNECTABLE,
	HCI_BREDR_ENABLED,
	HCI_6LOWPAN_ENABLED,
};

/* A mask for the flags that are supposed to remain when a reset happens
+1 −0
Original line number Diff line number Diff line
@@ -448,6 +448,7 @@ enum {
	HCI_CONN_SSP_ENABLED,
	HCI_CONN_POWER_SAVE,
	HCI_CONN_REMOTE_OOB,
	HCI_CONN_6LOWPAN,
};

static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ struct l2cap_conninfo {
#define L2CAP_FC_L2CAP		0x02
#define L2CAP_FC_CONNLESS	0x04
#define L2CAP_FC_A2MP		0x08
#define L2CAP_FC_6LOWPAN        0x3e /* reserved and temporary value */

/* L2CAP Control Field bit masks */
#define L2CAP_CTRL_SAR			0xC000
+886 −0

File added.

Preview size limit exceeded, changes collapsed.

+26 −0
Original line number Diff line number Diff line
/*
   Copyright (c) 2013 Intel Corp.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2 and
   only version 2 as published by the Free Software Foundation.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
*/

#ifndef __6LOWPAN_H
#define __6LOWPAN_H

#include <linux/skbuff.h>
#include <net/bluetooth/l2cap.h>

int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb);
int bt_6lowpan_add_conn(struct l2cap_conn *conn);
int bt_6lowpan_del_conn(struct l2cap_conn *conn);
int bt_6lowpan_init(void);
void bt_6lowpan_cleanup(void);

#endif /* __6LOWPAN_H */
Loading