[APR-2987]wlbt: HAL changes for COMMS TTL test scenarios
[GitHub/MotorolaMobilityLLC/hardware-samsung_slsi-scsc_wifibt-wifi_hal.git] / wifi_nan.cpp
index 5e1ac12989f5622c60f365e1181c5413a5d738c3..8ef1ebf68830467a42f735ff71dc6ac2842f822e 100755 (executable)
@@ -368,9 +368,10 @@ class NanCommand : public WifiCommand {
 
     int processPublishTerminatedEvent(WifiEvent &event) {
         NanPublishTerminatedInd ind;
+        nlattr *vendor_data = event.get_attribute(NL80211_ATTR_VENDOR_DATA);
         memset(&ind,0,sizeof(ind));
 
-        for(nl_iterator nl_itr((struct nlattr *)event.get_vendor_data()); nl_itr.has_next(); nl_itr.next()) {
+        for(nl_iterator nl_itr(vendor_data); nl_itr.has_next(); nl_itr.next()) {
             switch(nl_itr.get_type()) {
             case NAN_EVT_ATTR_PUBLISH_ID:
                 ind.publish_id = nl_itr.get_u16();
@@ -378,6 +379,8 @@ class NanCommand : public WifiCommand {
             case NAN_EVT_ATTR_PUBLISH_REASON:
                 ind.reason = (NanStatusType)nl_itr.get_u32();
                 break;
+            case NAN_EVT_ATTR_STATUS:
+                break;
             default :
                 ALOGE("processPublishTerminatedEvent: unknown attribute(%d)", nl_itr.get_type());
                 return NL_SKIP;
@@ -393,9 +396,10 @@ class NanCommand : public WifiCommand {
 
     int processSubscribeTerminatedEvent(WifiEvent &event) {
         NanSubscribeTerminatedInd ind;
+        nlattr *vendor_data = event.get_attribute(NL80211_ATTR_VENDOR_DATA);
         memset(&ind,0,sizeof(ind));
 
-        for(nl_iterator nl_itr((struct nlattr *)event.get_vendor_data()); nl_itr.has_next(); nl_itr.next()) {
+        for(nl_iterator nl_itr(vendor_data); nl_itr.has_next(); nl_itr.next()) {
             switch(nl_itr.get_type()) {
             case NAN_EVT_ATTR_SUBSCRIBE_ID:
                 ind.subscribe_id = nl_itr.get_u16();
@@ -403,6 +407,8 @@ class NanCommand : public WifiCommand {
             case NAN_EVT_ATTR_SUBSCRIBE_REASON:
                 ind.reason = (NanStatusType)nl_itr.get_u32();
                 break;
+            case NAN_EVT_ATTR_STATUS:
+                break;
             default :
                 ALOGE("processSubscribeTerminatedEvent: unknown attribute(%d)", nl_itr.get_type());
                 return NL_SKIP;