for (int i = 0; i < info->num_cmd; i++) {
if (info->cmd[i].cmd == cmd) {
- int id = info->cmd[i].id;
memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info));
info->num_cmd--;
//ALOGI("Successfully removed command %d: %p from %d", id, cmd, i);
-
#include <stdint.h>
#include <stddef.h>
#include <fcntl.h>
return NL_SKIP;
}
- int id = reply.get_vendor_id();
- int subcmd = reply.get_vendor_subcmd();
-
void *data = reply.get_vendor_data();
int len = reply.get_vendor_data_len();
return NL_SKIP;
}
- int id = reply.get_vendor_id();
- int subcmd = reply.get_vendor_subcmd();
int num_channels_to_copy = 0;
nlattr *vendor_data = reply.get_attribute(NL80211_ATTR_VENDOR_DATA);
/* helper functions */
+/*
static int parseScanResults(wifi_scan_result *results, int num, nlattr *attr)
{
memset(results, 0, sizeof(wifi_scan_result) * num);
int i = 0;
for (nl_iterator it(attr); it.has_next() && i < num; it.next(), i++) {
- int index = it.get_type();
nlattr *sc_data = (nlattr *) it.get_data();
wifi_scan_result *result = results + i;
return i;
}
+*/
int createFeatureRequest(WifiRequest& request, int subcmd) {
wifi_scan_cmd_params *mParams;
wifi_scan_result_handler mHandler;
static unsigned mGlobalFullScanBuckets;
- bool mLocalFullScanBuckets;
public:
ScanCommand(wifi_interface_handle iface, int id, wifi_scan_cmd_params *params,
wifi_scan_result_handler handler)
- : WifiCommand(iface, id), mParams(params), mHandler(handler),
- mLocalFullScanBuckets(0)
+ : WifiCommand(iface, id), mParams(params), mHandler(handler)
{ }
int createSetupRequest(WifiRequest& request) {
if(id == -1) {
wifi_scan_result_handler handler;
wifi_scan_cmd_params dummy_params;
- wifi_handle handle = getWifiHandle(iface);
memset(&handler, 0, sizeof(handler));
ScanCommand *cmd = new ScanCommand(iface, id, &dummy_params, handler);
return NL_SKIP;
}
- int id = reply.get_vendor_id();
- int subcmd = reply.get_vendor_subcmd();
-
nlattr *vendor_data = reply.get_attribute(NL80211_ATTR_VENDOR_DATA);
int len = reply.get_vendor_data_len();
num = min((int)MAX_AP_CACHE_PER_SCAN, num);
memcpy(mScanResults + mNextScanResult, it2.get_data(),
sizeof(wifi_scan_result) * num);
- wifi_scan_result *results = (wifi_scan_result *)it2.get_data();
/*
+ wifi_scan_result *results = (wifi_scan_result *)it2.get_data();
for (int i = 0; i < num; i++) {
wifi_scan_result *result = results + i;
ALOGD("%02d %-32s %02x:%02x:%02x:%02x:%02x:%02x %04d", i,
}
virtual int handleEvent(WifiEvent& event) {
- int event_id = event.get_vendor_subcmd();
// event.log();
nlattr *vendor_data = event.get_attribute(NL80211_ATTR_VENDOR_DATA);
return NL_SKIP;
}
int id = reply.get_vendor_id();
- int subcmd = reply.get_vendor_subcmd();
u8 *data = (u8 *)reply.get_vendor_data();
- int len = reply.get_vendor_data_len();
int num_radios = 0, i = 0;
num_radios = data[0];
data += sizeof(data[0]);
wifi_error ret;\r
int requestId;\r
wifi_bssid_params bssid_params;\r
- wifi_handle wifiHandle = getWifiHandle(iface);\r
\r
if (!roaming_config) {\r
ALOGE("%s: Invalid Buffer provided. Exit", __FUNCTION__);\r
#define ATTR_NODFS_VALUE 3
#define ATTR_COUNTRY_CODE 4
-static void internal_event_handler(wifi_handle handle, int events);
static int internal_no_seq_check(nl_msg *msg, void *arg);
static int internal_valid_message_handler(nl_msg *msg, void *arg);
static int wifi_get_multicast_id(wifi_handle handle, const char *name, const char *group);
protected:
virtual int handleResponse(WifiEvent& reply) {
- int id = reply.get_vendor_id();
- int subcmd = reply.get_vendor_subcmd();
-
if (reply.get_cmd() != NL80211_CMD_VENDOR) {
ALOGD("Ignore reply; cmd = %d", reply.get_cmd());
return NL_SKIP;
if(id == -1) {
wifi_rssi_event_handler handler;
- wifi_handle handle = getWifiHandle(iface);
memset(&handler, 0, sizeof(handler));
SetRSSIMonitorCommand *cmd = new SetRSSIMonitorCommand(id, iface,
0, 0, handler);
case GET_FEATURE:\r
{\r
void *data = reply.get_vendor_data();\r
- int len = reply.get_vendor_data_len();\r
\r
- ALOGD("len = %d, expected len = %d", len, sizeof(unsigned int));\r
+ ALOGD("len = %d, expected len = %lu", reply.get_vendor_data_len(), (unsigned long)sizeof(unsigned int));\r
memcpy(mSupport, data, sizeof(unsigned int));\r
break;\r
}\r
}\r
\r
virtual int handleEvent(WifiEvent& event) {\r
- wifi_ring_buffer_id ring_id;\r
char *buffer = NULL;\r
int buffer_size = 0;\r
\r
for (nl_iterator it(vendor_data); it.has_next(); it.next()) {\r
if (it.get_type() == ENHANCE_LOGGER_ATTRIBUTE_PKT_FATE_NUM) {\r
*mNoProvidedFates = it.get_u32();\r
- ALOGI("No: of pkt fates provided is %d\n", *mNoProvidedFates);\r
+ ALOGI("No: of pkt fates provided is %zu\n", *mNoProvidedFates);\r
} else {\r
ALOGE("Ignoring invalid attribute type = %d, size = %d\n",\r
it.get_type(), it.get_len());\r
it.get_type(), it.get_len());\r
}\r
}\r
+ case GET_FW_VER:\r
+ case GET_DRV_VER:\r
+ case GET_RING_DATA:\r
+ case GET_RING_STATUS:\r
+ case GET_FEATURE:\r
+ case START_RING_LOG:\r
+ default:\r
+ {\r
+ ALOGW("Ignoring GetCmdType %d \n", mType);\r
+ }\r
}\r
return NL_OK;\r
}\r