summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-11-09 22:52:40 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-11-09 22:52:40 +0000
commit0792c0b319112503dd5129f05536f3c6ae4c746c (patch)
treeee687f76e39c8632a4a129e52417c6ffd31d2f46 /src
parent213febe584cdd8c7b5fd2defc2d56f0c84677e51 (diff)
Add hci_set_afh_classification() function
Diffstat (limited to 'src')
-rw-r--r--src/hci.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hci.c b/src/hci.c
index ee8dce2f..19ee3c4c 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -1439,6 +1439,34 @@ int hci_write_afh_mode(int dd, uint8_t mode, int to)
return 0;
}
+int hci_set_afh_classification(int dd, uint8_t *map, int to)
+{
+ set_afh_classification_cp cp;
+ set_afh_classification_rp rp;
+ struct hci_request rq;
+
+ memset(&cp, 0, sizeof(cp));
+ memcpy(cp.map, map, 10);
+
+ memset(&rq, 0, sizeof(rq));
+ rq.ogf = OGF_HOST_CTL;
+ rq.ocf = OCF_SET_AFH_CLASSIFICATION;
+ rq.cparam = &cp;
+ rq.clen = SET_AFH_CLASSIFICATION_CP_SIZE;
+ rq.rparam = &rp;
+ rq.rlen = SET_AFH_CLASSIFICATION_RP_SIZE;
+
+ if (hci_send_req(dd, &rq, to) < 0)
+ return -1;
+
+ if (rp.status) {
+ errno = EIO;
+ return -1;
+ }
+
+ return 0;
+}
+
int hci_read_afh_map(int dd, uint16_t handle, uint8_t *mode, uint8_t *map, int to)
{
read_afh_map_rp rp;