diff options
Diffstat (limited to 'bcmdhd/wifi_hal/cpp_bindings.h')
-rw-r--r-- | bcmdhd/wifi_hal/cpp_bindings.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bcmdhd/wifi_hal/cpp_bindings.h b/bcmdhd/wifi_hal/cpp_bindings.h index 491c398..250976e 100644 --- a/bcmdhd/wifi_hal/cpp_bindings.h +++ b/bcmdhd/wifi_hal/cpp_bindings.h @@ -213,6 +213,7 @@ private: class WifiCommand { protected: + const char *mType; hal_info *mInfo; WifiRequest mMsg; Condition mCondition; @@ -220,16 +221,17 @@ protected: interface_info *mIfaceInfo; int mRefs; public: - WifiCommand(wifi_handle handle, wifi_request_id id) - : mMsg(getHalInfo(handle)->nl80211_family_id), mId(id), mRefs(1) + WifiCommand(const char *type, wifi_handle handle, wifi_request_id id) + : mType(type), mMsg(getHalInfo(handle)->nl80211_family_id), mId(id), mRefs(1) { mIfaceInfo = NULL; mInfo = getHalInfo(handle); // ALOGD("WifiCommand %p created, mInfo = %p, mIfaceInfo = %p", this, mInfo, mIfaceInfo); } - WifiCommand(wifi_interface_handle iface, wifi_request_id id) - : mMsg(getHalInfo(iface)->nl80211_family_id, getIfaceInfo(iface)->id), mId(id), mRefs(1) + WifiCommand(const char *type, wifi_interface_handle iface, wifi_request_id id) + : mType(type), mMsg(getHalInfo(iface)->nl80211_family_id, getIfaceInfo(iface)->id), + mId(id), mRefs(1) { mIfaceInfo = getIfaceInfo(iface); mInfo = getHalInfo(iface); @@ -244,6 +246,10 @@ public: return mId; } + const char *getType() { + return mType; + } + virtual void addRef() { int refs = __sync_add_and_fetch(&mRefs, 1); // ALOGD("addRef: WifiCommand %p has %d references", this, refs); |