[Raring][PATCH 1/5] UBUNTU: SAUCE: Bluetooth: Add a load_firmware callback to struct hci_dev
Jesse Sung
jesse.sung at canonical.com
Wed Apr 3 08:25:22 UTC 2013
From: Wen-chien Jesse Sung <jesse.sung at canonical.com>
BugLink: https://launchpad.net/bugs/1065400
load_firmware will be called at the end of hci_dev_open() if it
is defined. How, when, and the mutual exclusion for firmware loading
is inplemented in device driver.
Signed-off-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
---
include/net/bluetooth/hci_core.h | 1 +
net/bluetooth/hci_core.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 014a2ea..12dd4e3 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -288,6 +288,7 @@ struct hci_dev {
int (*send)(struct sk_buff *skb);
void (*notify)(struct hci_dev *hdev, unsigned int evt);
int (*ioctl)(struct hci_dev *hdev, unsigned int cmd, unsigned long arg);
+ void (*load_firmware)(struct hci_dev *hdev);
};
#define HCI_PHY_HANDLE(handle) (handle & 0xff)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0f78e34..5ec456e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -777,6 +777,8 @@ int hci_dev_open(__u16 dev)
done:
hci_req_unlock(hdev);
hci_dev_put(hdev);
+ if (!ret && hdev->load_firmware)
+ hdev->load_firmware(hdev);
return ret;
}
--
1.7.10.4
More information about the kernel-team
mailing list