diff options
author | Subhani Shaik <subhanis@codeaurora.org> | 2015-10-27 18:51:43 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2016-01-05 15:40:56 -0800 |
commit | a3c2c8f1bfcddd50047c8ad29e535a54e99acf62 (patch) | |
tree | c100331634c8deab85a759a7ae4cdfd4b4be909a /qcwcn/wifi_hal/nancommand.h | |
parent | 7f2959f5a4565e5163d770b375e953a061440fa1 (diff) | |
download | wlan-a3c2c8f1bfcddd50047c8ad29e535a54e99acf62.tar.gz |
Wifi-Hal: NAN feature enhancements
Changes related to NAN APIs and structures.
1) Remove NanHeader
2) Replace wifi_handle with wifi_interface_handle in NAN APIs
3) Add publish/subscribe id
4) Remove match_handle and name it as requestor_instance_id
5) Add NanPublishResponse/NanSubscribeResponse structures
6) Remove user_context
7) Add appropriate enums
8) Remove unused structures
9) Removed references for NAN_2.0
10) Sync up with the latest FW changes wrt TLVs.
11) Add support to TransmitFollowUp error relay
mechanism to user space.
12) Replace wifi_request_id with transaction_id to have a
common interface across all layers.
13) Create new nanCommand instance for NAN request APIs
Bug: 26216681
Change-Id: Ieaccdf94f6a84d86f3d9278e2d2e8825c4648ed9
Diffstat (limited to 'qcwcn/wifi_hal/nancommand.h')
-rw-r--r--[-rwxr-xr-x] | qcwcn/wifi_hal/nancommand.h | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/qcwcn/wifi_hal/nancommand.h b/qcwcn/wifi_hal/nancommand.h index 096fc71..2530c3e 100755..100644 --- a/qcwcn/wifi_hal/nancommand.h +++ b/qcwcn/wifi_hal/nancommand.h @@ -19,7 +19,7 @@ #include "common.h" #include "cpp_bindings.h" -#include "nan.h" +#include "wifi_hal.h" class NanCommand : public WifiVendorCommand { @@ -28,7 +28,6 @@ private: char *mNanVendorEvent; u32 mNanDataLen; NanStaParameter *mStaParam; - void *mUserData; //Function to check the initial few bytes of data to //determine whether NanResponse or NanEvent @@ -37,8 +36,7 @@ private: int handleNanResponse(); //Function which will parse the mVendorData and gets // the rsp_data appropriately. - int getNanResponse(NanResponseMsg *pRsp); - + int getNanResponse(transaction_id *id, NanResponseMsg *pRsp); //Function which will return the Nan Indication type based on //the initial few bytes of mVendorData NanIndicationType getIndicationType(); @@ -46,7 +44,6 @@ private: //based on the indication type int handleNanIndication(); //Various Functions to get the appropriate indications - int getNanPublishReplied(NanPublishRepliedInd *event); int getNanPublishTerminated(NanPublishTerminatedInd *event); int getNanMatch(NanMatchInd *event); int getNanUnMatch(NanUnmatchInd *event); @@ -56,9 +53,8 @@ private: int getNanDisabled(NanDisabledInd *event); int getNanTca(NanTCAInd *event); int getNanBeaconSdfPayload(NanBeaconSdfPayloadInd *event); - - //Making the constructor private since this class is a singleton - NanCommand(wifi_handle handle, int id, u32 vendor_id, u32 subcmd); + //Internal cleanup function + void cleanup(); static NanCommand *mNanCommandInstance; @@ -87,9 +83,14 @@ private: NanReceivePostDiscovery *pRxDisc); int getNanFurtherAvailabilityMap(const u8 *pInValue, u32 length, - NanFurtherAvailabilityMap *pFam); + u8* num_chans, + NanFurtherAvailabilityChannel *pFac); + void handleNanStatsResponse(NanStatsType stats_type, + char* rspBuf, + NanStatsResponse *pRsp); public: + NanCommand(wifi_handle handle, int id, u32 vendor_id, u32 subcmd); static NanCommand* instance(wifi_handle handle); virtual ~NanCommand(); @@ -99,26 +100,22 @@ public: virtual int requestEvent(); virtual int handleResponse(WifiEvent reply); virtual int handleEvent(WifiEvent &event); - int setCallbackHandler(NanCallbackHandler nHandler, - void *pUserData); + int setCallbackHandler(NanCallbackHandler nHandler); //Functions to fill the vendor data appropriately - int putNanEnable(const NanEnableRequest *pReq); - int putNanDisable(const NanDisableRequest *pReq); - int putNanPublish(const NanPublishRequest *pReq); - int putNanPublishCancel(const NanPublishCancelRequest *pReq); - int putNanSubscribe(const NanSubscribeRequest *pReq); - int putNanSubscribeCancel(const NanSubscribeCancelRequest *pReq); - int putNanTransmitFollowup(const NanTransmitFollowupRequest *pReq); - int putNanStats(const NanStatsRequest *pReq); - int putNanConfig(const NanConfigRequest *pReq); - int putNanTCA(const NanTCARequest *pReq); - int putNanBeaconSdfPayload(const NanBeaconSdfPayloadRequest *pReq); - int getNanStaParameter(NanStaParameter *pRsp); - - //Set the Id of the request - void setId(int nId); + int putNanEnable(transaction_id id, const NanEnableRequest *pReq); + int putNanDisable(transaction_id id); + int putNanPublish(transaction_id id, const NanPublishRequest *pReq); + int putNanPublishCancel(transaction_id id, const NanPublishCancelRequest *pReq); + int putNanSubscribe(transaction_id id, const NanSubscribeRequest *pReq); + int putNanSubscribeCancel(transaction_id id, const NanSubscribeCancelRequest *pReq); + int putNanTransmitFollowup(transaction_id id, const NanTransmitFollowupRequest *pReq); + int putNanStats(transaction_id id, const NanStatsRequest *pReq); + int putNanConfig(transaction_id id, const NanConfigRequest *pReq); + int putNanTCA(transaction_id id, const NanTCARequest *pReq); + int putNanBeaconSdfPayload(transaction_id id, const NanBeaconSdfPayloadRequest *pReq); + int getNanStaParameter(wifi_interface_handle iface, NanStaParameter *pRsp); }; #endif /* __WIFH_HAL_NAN_COMMAND_H__ */ |