diff options
author | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
commit | 97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch) | |
tree | 54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /usr.sbin/bluetooth | |
parent | 5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff) | |
parent | 086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff) | |
download | FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz |
sync from head
Diffstat (limited to 'usr.sbin/bluetooth')
-rw-r--r-- | usr.sbin/bluetooth/ath3kfw/ath3kfw.c | 18 | ||||
-rw-r--r-- | usr.sbin/bluetooth/l2ping/l2ping.8 | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.c b/usr.sbin/bluetooth/ath3kfw/ath3kfw.c index 02d4501..37191d1 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.c +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.c @@ -59,6 +59,9 @@ static int download_firmware (struct libusb20_device *dev, char const *firmware); static void usage (void); +static int vendor_id = ATH3KFW_VENDOR_ID; +static int product_id = ATH3KFW_PRODUCT_ID; + /* * Firmware downloader for Atheros AR3011 based USB Bluetooth devices */ @@ -78,7 +81,7 @@ main(int argc, char **argv) addr = 0; firmware = ATH3KFW_FW; - while ((n = getopt(argc, argv, "d:f:h")) != -1) { + while ((n = getopt(argc, argv, "d:f:hp:v:")) != -1) { switch (n) { case 'd': /* ugen device name */ if (parse_ugen_name(optarg, &bus, &addr) < 0) @@ -88,7 +91,12 @@ main(int argc, char **argv) case 'f': /* firmware file */ firmware = optarg; break; - + case 'p': /* product id */ + product_id = strtol(optarg, NULL, 0); + break; + case 'v': /* vendor id */ + vendor_id = strtol(optarg, NULL, 0); + break; case 'h': default: usage(); @@ -166,8 +174,8 @@ find_device(struct libusb20_backend *be, uint8_t bus, uint8_t addr, if (desc == NULL) continue; - if (desc->idVendor != ATH3KFW_VENDOR_ID || - desc->idProduct != ATH3KFW_PRODUCT_ID) + if (desc->idVendor != vendor_id || + desc->idProduct != product_id) continue; break; @@ -280,6 +288,8 @@ usage(void) "Where:\n" \ "\t-d ugenX.Y ugen device name\n" \ "\t-f firmware image firmware image file name for download\n" \ +"\t-v vendor_id vendor id\n" \ +"\t-p vendor_id product id\n" \ "\t-h display this message\n", ATH3KFW, ATH3KFW); exit(255); diff --git a/usr.sbin/bluetooth/l2ping/l2ping.8 b/usr.sbin/bluetooth/l2ping/l2ping.8 index 703b0bd..73774ec 100644 --- a/usr.sbin/bluetooth/l2ping/l2ping.8 +++ b/usr.sbin/bluetooth/l2ping/l2ping.8 @@ -63,7 +63,7 @@ If this option is not specified, .Nm will operate until interrupted. .It Fl f -Don't wait between sending each packet. +Do not wait between sending each packet. .It Fl h Display usage message and exit. .It Fl i Ar wait |