[APR-2987]wlbt: NAN transaction Id
[GitHub/LineageOS/android_hardware_samsung_slsi_scsc_wifibt_wifi_hal.git] / nan_data.h
CommitLineData
c2afddcb
JPS
1#ifndef NAN_DATA_H
2#define NAN_DATA_H
3
4#include <netlink/netlink.h>
5
6#define SLSI_NAN_MAX_NDP 5
7
8class NanDataCommand {
9
10 int m_ndp_count;
11 u32 m_ndp_instance_id[SLSI_NAN_MAX_NDP];
12 int m_max_ndp_sessions;
13 int m_data_iface_count;
14 char m_ifaceName[SLSI_NAN_MAX_NDP][IFNAMSIZ+1];
c2afddcb
JPS
15
16 nlattr *newNlVendorMsg(int subcmd, WifiRequest &request);
17
18 void dataInterfaceCreated(char *ifaceName);
19 void dataInterfaceDeleted(char *ifaceName);
20 void dataRequestInitiateSuccess(NanDataPathInitiatorRequest *msg);
21 void dataIndicationResponseSuccess(NanDataPathIndicationResponse *msg);
22 void dataEndSuccess(NanDataPathEndRequest *msg);
23
1eccec64
JPS
24 int dataInterfaceCreateDelete(u16 id, char *ifaceName, int subcmd, WifiRequest &request);
25 int dataRequestInitiate(u16 id, NanDataPathInitiatorRequest *msg, WifiRequest &request);
26 int dataIndicationResponse(u16 id, NanDataPathIndicationResponse *msg, WifiRequest &request);
27 int dataEnd(u16 id, NanDataPathEndRequest *msg, WifiRequest &request);
c2afddcb
JPS
28
29 void processNdpChannelInfo(nlattr *nl_data, NanChannelInfo &channel_info);
30 int processNdpReqEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler);
31 int processNdpCfmEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler);
32 int processNdpEndEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler);
33
34public:
35 NanDataCommand();
36 int processResponse(WifiEvent &reply, NanResponseMsg *response);
37 void requestSuccess(u16 id, void *data, int subcmd);
082f0000 38 int getDataPathNLMsg(u16 id, void *data, int subcmd, WifiRequest &request);
c2afddcb
JPS
39 void setMaxNdpSessions(int max_ndp);
40 int handleEvent(WifiEvent &event, NanCallbackHandler &callbackEventHandler);
c2afddcb
JPS
41 static int putSecurityInfo(u32 cipher, NanSecurityKeyInfo *key_info, u32 scid_len,
42 u8 *scid, WifiRequest *request);
4d2d047a 43 static const u8 *getCmdName(int cmd);
c2afddcb
JPS
44};
45#endif