summaryrefslogtreecommitdiff
path: root/qcwcn/wifi_hal/wifi_hal.cpp
diff options
context:
space:
mode:
authorvamsi krishna <vamsin@codeaurora.org>2019-02-28 21:09:11 +0530
committerAhmed ElArabawy <arabawy@google.com>2019-03-18 14:26:59 -0700
commit55d0309c07fc62ee43d00e740cece70541bcc82e (patch)
treecd044ac17a63ab780535ddebab9074914fe1f524 /qcwcn/wifi_hal/wifi_hal.cpp
parent74064d74227d7e64e962c82d79c491578acf714e (diff)
downloadwlan-55d0309c07fc62ee43d00e740cece70541bcc82e.tar.gz
Wifi: Add ether type to sending offloaded packet
In current implementation, the ether type used for offloaded packets is always hardcoded to IPv4 in lower layers. This commit adds support to specify ether type of offloaded packets from user space. Bug: 122487582 Test: Manual Change-Id: Ib3a5dcb92aa6b193eabbcff32cd5a1138dcd04d0 CRs-Fixed: 2398213
Diffstat (limited to 'qcwcn/wifi_hal/wifi_hal.cpp')
-rw-r--r--qcwcn/wifi_hal/wifi_hal.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qcwcn/wifi_hal/wifi_hal.cpp b/qcwcn/wifi_hal/wifi_hal.cpp
index 8e8367c..8834bba 100644
--- a/qcwcn/wifi_hal/wifi_hal.cpp
+++ b/qcwcn/wifi_hal/wifi_hal.cpp
@@ -1348,6 +1348,7 @@ cleanup:
wifi_error wifi_start_sending_offloaded_packet(wifi_request_id id,
wifi_interface_handle iface,
+ u16 ether_type,
u8 *ip_packet,
u16 ip_packet_len,
u8 *src_mac_addr,
@@ -1366,6 +1367,7 @@ wifi_error wifi_start_sending_offloaded_packet(wifi_request_id id,
return ret;
}
+ ALOGV("ether type 0x%04x\n", ether_type);
ALOGV("ip packet length : %u\nIP Packet:", ip_packet_len);
hexdump(ip_packet, ip_packet_len);
ALOGV("Src Mac Address: " MAC_ADDR_STR "\nDst Mac Address: " MAC_ADDR_STR
@@ -1389,6 +1391,12 @@ wifi_error wifi_start_sending_offloaded_packet(wifi_request_id id,
if (ret != WIFI_SUCCESS)
goto cleanup;
+ ret = vCommand->put_u16(
+ QCA_WLAN_VENDOR_ATTR_OFFLOADED_PACKETS_ETHER_PROTO_TYPE,
+ ether_type);
+ if (ret != WIFI_SUCCESS)
+ goto cleanup;
+
ret = vCommand->put_bytes(
QCA_WLAN_VENDOR_ATTR_OFFLOADED_PACKETS_IP_PACKET_DATA,
(const char *)ip_packet, ip_packet_len);