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

Commit 69b307a4 authored by John W. Linville's avatar John W. Linville
Browse files
parents 24de851b 2dea632f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -43,7 +43,7 @@ static ssize_t btmrvl_hscfgcmd_write(struct file *file,
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
		return -EFAULT;
		return -EFAULT;


	ret = strict_strtol(buf, 10, &result);
	ret = kstrtol(buf, 10, &result);
	if (ret)
	if (ret)
		return ret;
		return ret;


@@ -89,7 +89,7 @@ static ssize_t btmrvl_pscmd_write(struct file *file, const char __user *ubuf,
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
		return -EFAULT;
		return -EFAULT;


	ret = strict_strtol(buf, 10, &result);
	ret = kstrtol(buf, 10, &result);
	if (ret)
	if (ret)
		return ret;
		return ret;


@@ -135,7 +135,7 @@ static ssize_t btmrvl_hscmd_write(struct file *file, const char __user *ubuf,
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
		return -EFAULT;
		return -EFAULT;


	ret = strict_strtol(buf, 10, &result);
	ret = kstrtol(buf, 10, &result);
	if (ret)
	if (ret)
		return ret;
		return ret;


+2 −2
Original line number Original line Diff line number Diff line
@@ -486,7 +486,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
			if (firmwarelen - offset < txlen)
			if (firmwarelen - offset < txlen)
				txlen = firmwarelen - offset;
				txlen = firmwarelen - offset;


			tx_blocks = (txlen + blksz_dl - 1) / blksz_dl;
			tx_blocks = DIV_ROUND_UP(txlen, blksz_dl);


			memcpy(fwbuf, &firmware[offset], txlen);
			memcpy(fwbuf, &firmware[offset], txlen);
		}
		}
@@ -873,7 +873,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv,
	}
	}


	blksz = SDIO_BLOCK_SIZE;
	blksz = SDIO_BLOCK_SIZE;
	buf_block_len = (nb + blksz - 1) / blksz;
	buf_block_len = DIV_ROUND_UP(nb, blksz);


	sdio_claim_host(card->func);
	sdio_claim_host(card->func);


+8 −0
Original line number Original line Diff line number Diff line
@@ -107,6 +107,14 @@ struct bt_power {
 */
 */
#define BT_CHANNEL_POLICY_AMP_PREFERRED		2
#define BT_CHANNEL_POLICY_AMP_PREFERRED		2


#define BT_VOICE		11
struct bt_voice {
	__u16 setting;
};

#define BT_VOICE_TRANSPARENT			0x0003
#define BT_VOICE_CVSD_16BIT			0x0060

__printf(1, 2)
__printf(1, 2)
int bt_info(const char *fmt, ...);
int bt_info(const char *fmt, ...);
__printf(1, 2)
__printf(1, 2)
+7 −0
Original line number Original line Diff line number Diff line
@@ -238,6 +238,7 @@ enum {
#define LMP_CVSD	0x01
#define LMP_CVSD	0x01
#define LMP_PSCHEME	0x02
#define LMP_PSCHEME	0x02
#define LMP_PCONTROL	0x04
#define LMP_PCONTROL	0x04
#define LMP_TRANSPARENT	0x08


#define LMP_RSSI_INQ	0x40
#define LMP_RSSI_INQ	0x40
#define LMP_ESCO	0x80
#define LMP_ESCO	0x80
@@ -296,6 +297,12 @@ enum {
#define HCI_AT_GENERAL_BONDING		0x04
#define HCI_AT_GENERAL_BONDING		0x04
#define HCI_AT_GENERAL_BONDING_MITM	0x05
#define HCI_AT_GENERAL_BONDING_MITM	0x05


/* I/O capabilities */
#define HCI_IO_DISPLAY_ONLY	0x00
#define HCI_IO_DISPLAY_YESNO	0x01
#define HCI_IO_KEYBOARD_ONLY	0x02
#define HCI_IO_NO_INPUT_OUTPUT	0x03

/* Link Key types */
/* Link Key types */
#define HCI_LK_COMBINATION		0x00
#define HCI_LK_COMBINATION		0x00
#define HCI_LK_LOCAL_UNIT		0x01
#define HCI_LK_LOCAL_UNIT		0x01
+9 −1
Original line number Original line Diff line number Diff line
@@ -320,6 +320,7 @@ struct hci_conn {
	__u32		passkey_notify;
	__u32		passkey_notify;
	__u8		passkey_entered;
	__u8		passkey_entered;
	__u16		disc_timeout;
	__u16		disc_timeout;
	__u16		setting;
	unsigned long	flags;
	unsigned long	flags;


	__u8		remote_cap;
	__u8		remote_cap;
@@ -569,7 +570,7 @@ static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
}
}


void hci_disconnect(struct hci_conn *conn, __u8 reason);
void hci_disconnect(struct hci_conn *conn, __u8 reason);
void hci_setup_sync(struct hci_conn *conn, __u16 handle);
bool hci_setup_sync(struct hci_conn *conn, __u16 handle);
void hci_sco_setup(struct hci_conn *conn, __u8 status);
void hci_sco_setup(struct hci_conn *conn, __u8 status);


struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst);
struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst);
@@ -584,6 +585,8 @@ struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle);


struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
			     __u8 dst_type, __u8 sec_level, __u8 auth_type);
			     __u8 dst_type, __u8 sec_level, __u8 auth_type);
struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,
				 __u16 setting);
int hci_conn_check_link_mode(struct hci_conn *conn);
int hci_conn_check_link_mode(struct hci_conn *conn);
int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
@@ -797,6 +800,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define lmp_lsto_capable(dev)      ((dev)->features[0][7] & LMP_LSTO)
#define lmp_lsto_capable(dev)      ((dev)->features[0][7] & LMP_LSTO)
#define lmp_inq_tx_pwr_capable(dev) ((dev)->features[0][7] & LMP_INQ_TX_PWR)
#define lmp_inq_tx_pwr_capable(dev) ((dev)->features[0][7] & LMP_INQ_TX_PWR)
#define lmp_ext_feat_capable(dev)  ((dev)->features[0][7] & LMP_EXTFEATURES)
#define lmp_ext_feat_capable(dev)  ((dev)->features[0][7] & LMP_EXTFEATURES)
#define lmp_transp_capable(dev)    ((dev)->features[0][2] & LMP_TRANSPARENT)


/* ----- Extended LMP capabilities ----- */
/* ----- Extended LMP capabilities ----- */
#define lmp_host_ssp_capable(dev)  ((dev)->features[1][0] & LMP_HOST_SSP)
#define lmp_host_ssp_capable(dev)  ((dev)->features[1][0] & LMP_HOST_SSP)
@@ -1213,4 +1217,8 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],


u8 bdaddr_to_le(u8 bdaddr_type);
u8 bdaddr_to_le(u8 bdaddr_type);


#define SCO_AIRMODE_MASK       0x0003
#define SCO_AIRMODE_CVSD       0x0000
#define SCO_AIRMODE_TRANSP     0x0003

#endif /* __HCI_CORE_H */
#endif /* __HCI_CORE_H */
Loading