Home
last modified time | relevance | path

Searched refs:mac (Results 1 - 25 of 57) sorted by relevance

123

/drivers/peripheral/wlan/wpa/interfaces/hdi_service/service_common/
H A Dwpa_hdi_util.c29 int ConvertMacToStr(const unsigned char *mac, int macSize, char *macStr, int strLen) in ConvertMacToStr() argument
31 if (mac == NULL || macStr == NULL || macSize != MAC_UINT_SIZE || strLen <= MAC_STRING_SIZE) { in ConvertMacToStr()
40 if (snprintf_s(macStr, strLen, strLen - 1, "%02x:%02x:%02x:%02x:%02x:%02x", mac[posZero], mac[posOne], mac[posTwo], in ConvertMacToStr()
41 mac[posThree], mac[posFour], mac[posFive]) < 0) { in ConvertMacToStr()
61 int ConvertMacToArray(const char *macStr, unsigned char *mac, int macSize) in ConvertMacToArray() argument
63 if (macStr == NULL || mac in ConvertMacToArray()
[all...]
H A Dwpa_hdi_util.h24 * @Description Convert [a,b,c,d,e,f] mac address to string type [xx:xx:xx:xx:xx:xx]
26 * @param mac - mac address
27 * @param macSize - mac size, must be equal to 6
28 * @param macStr - output mac string, type: [xx:xx:xx:xx:xx:xx]
29 * @param strLen - mac string len, must bigger than 17
32 int ConvertMacToStr(const unsigned char *mac, int macSize, char *macStr, int strLen);
35 * @Description Convert mac string type [xx:xx:xx:xx:xx:xx] to array type
37 * @param macStr - input mac address, string type like xx:xx:xx:xx:xx:xx
38 * @param mac
[all...]
/drivers/peripheral/wlan/hal/src/
H A Dwifi_hal_base_feature.c47 static int32_t SetMacAddressInner(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len) in SetMacAddressInner() argument
49 if (baseFeature == NULL || mac == NULL || len != WIFI_MAC_ADDR_LENGTH) { in SetMacAddressInner()
53 return HalCmdSetMacAddr(baseFeature->ifName, mac, len); in SetMacAddressInner()
56 static int32_t GetDeviceMacAddressInner(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len) in GetDeviceMacAddressInner() argument
58 if (baseFeature == NULL || mac == NULL || len != WIFI_MAC_ADDR_LENGTH) { in GetDeviceMacAddressInner()
62 return HalCmdGetDevMacAddr(baseFeature->ifName, baseFeature->type, mac, len); in GetDeviceMacAddressInner()
118 static int32_t SetMacAddress(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len) in SetMacAddress() argument
121 int32_t ret = SetMacAddressInner(baseFeature, mac, len); in SetMacAddress()
126 static int32_t GetDeviceMacAddress(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len) in GetDeviceMacAddress() argument
129 int32_t ret = GetDeviceMacAddressInner(baseFeature, mac, le in GetDeviceMacAddress()
[all...]
H A Dwifi_hal_cmd.c116 int32_t HalCmdGetDevMacAddr(const char *ifName, int32_t type, unsigned char *mac, uint8_t len) in HalCmdGetDevMacAddr() argument
120 ret = GetDevMacAddr(ifName, type, (uint8_t *)mac, len); in HalCmdGetDevMacAddr()
127 int32_t HalCmdSetMacAddr(const char *ifName, unsigned char *mac, uint8_t len) in HalCmdSetMacAddr() argument
131 ret = SetMacAddr(ifName, mac, len); in HalCmdSetMacAddr()
345 unsigned char mac[ETH_ADDR_LEN] = {0}; in HalCmdResetToFactoryMacAddress() local
346 ret = HalCmdGetDevMacAddr(ifName, ifeature->type, mac, ETH_ADDR_LEN); in HalCmdResetToFactoryMacAddress()
352 ret = HalCmdSetMacAddr(ifName, mac, ETH_ADDR_LEN); in HalCmdResetToFactoryMacAddress()
354 HDF_LOGE("%s: hal cmd set mac addr failed, code=%d", __FUNCTION__, ret); in HalCmdResetToFactoryMacAddress()
/drivers/peripheral/wlan/chip/hdi_service/
H A Diface_util.cpp28 bool IfaceUtil::SetMacAddress(const std::string& ifaceName, const std::string& mac) in SetMacAddress() argument
30 bool success = ifaceTool_.lock()->SetMacAddress(ifaceName.c_str(), mac.c_str()); in SetMacAddress()
H A Diface_tool.h36 virtual bool SetMacAddress(const char* ifName, const char* mac);
H A Diface_util.h34 virtual bool SetMacAddress(const std::string& ifaceName, const std::string& mac);
H A Diface_tool.cpp107 bool IfaceTool::SetMacAddress(const char* ifName, const char* mac) in SetMacAddress() argument
112 if (sscanf_s(mac, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", in SetMacAddress()
/drivers/hdf_core/adapter/khdf/linux/model/network/wifi/vendor/hi3881/
H A DMakefile31 MAC_PATH := $(HDF_WIFI_VENDOR_ROOT)/$(WIFI_DRIVER_DIR)/mac/common/
32 HMAC_PATH := $(HDF_WIFI_VENDOR_ROOT)/$(WIFI_DRIVER_DIR)/mac/hmac/
111 mac-objs := mac_data.o mac_device.o mac_frame.o mac_ie.o mac_user.o mac_vap.o mac_mib.o mac_resource.o mac_regdomain.o mac_pm_driver.o
112 mac-objs := $(addprefix $(MAC_PATH),$(mac-objs))
117 wifi-objs += $(mac-objs) $(hmac-objs) $(wal-objs) $(hcc-objs)
/drivers/peripheral/wlan/test/fuzztest/
H A Dhostapd_common_fuzzer.cpp180 const char *mac = reinterpret_cast<const char *>(rawData); in FuzzHostapdInterfaceSetMacFilter() local
183 interface->SetMacFilter(interface, ifName, mac, id); in FuzzHostapdInterfaceSetMacFilter()
190 const char *mac = reinterpret_cast<const char *>(rawData); in FuzzHostapdInterfaceDelMacFilter() local
193 interface->DelMacFilter(interface, ifName, mac, id); in FuzzHostapdInterfaceDelMacFilter()
212 const char *mac = reinterpret_cast<const char *>(rawData); in FuzzHostapdInterfaceDisassociateSta() local
215 interface->DisassociateSta(interface, ifName, mac, id); in FuzzHostapdInterfaceDisassociateSta()
H A Dwlan_common_fuzzer.cpp88 uint8_t mac[ETH_ADDR_LEN] = {0}; in FuzzGetDeviceMacAddress() local
94 interface->GetDeviceMacAddress(interface, &feature, mac, &macLen, in FuzzGetDeviceMacAddress()
141 const uint8_t *mac = rawData; in FuzzSetMacAddress() local
144 interface->SetMacAddress(interface, &feature, mac, macLen); in FuzzSetMacAddress()
246 const uint8_t *mac = rawData; in FuzzGetStaInfo() local
249 interface->GetStaInfo(interface, ifName, &info, mac, macLen); in FuzzGetStaInfo()
/drivers/peripheral/wlan/interfaces/include/
H A Dwifi_hal_base_feature.h133 * @param mac Indicates the pointer to the MAC address.
141 int32_t (*setMacAddress)(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len);
147 * @param mac Indicates the pointer to the MAC address.
155 int32_t (*getDeviceMacAddress)(const struct IWiFiBaseFeature *baseFeature, unsigned char *mac, uint8_t len);
215 * @brief reset to factory mac address(permanent hardware address).
H A Dwifi_hal_ap_feature.h57 unsigned char mac[WIFI_MAC_ADDR_LENGTH]; /**< MAC address of the STA */ member
/drivers/peripheral/wlan/hostapd/interfaces/hdi_service/service_common/
H A Dhdi_hostapd_hal.h108 int (*addBlocklist)(const char *mac, int id);
109 int (*delBlocklist)(const char *mac, int id);
113 int (*disConnectedDev)(const char *mac, int id);
H A Dhostapd_common_cmd.h73 const char *ifName, const char *mac, int32_t id);
76 const char *ifName, const char *mac, int32_t id);
85 const char *ifName, const char *mac, int32_t id);
H A Dhdi_hostapd_hal.c717 static int ModBlockList(const char *mac, int id) in ModBlockList() argument
719 if (mac == NULL) { in ModBlockList()
720 HDF_LOGD("ModBlockList mac is null"); in ModBlockList()
735 if (fprintf(fp, "%s\n", mac) < 0) { in ModBlockList()
752 static int AddBlocklist(const char *mac, int id) in AddBlocklist() argument
754 if (mac == NULL) { in AddBlocklist()
755 HDF_LOGE("AddBlocklist mac is null"); in AddBlocklist()
761 if (snprintf_s(cmd, sizeof(cmd), sizeof(cmd) - 1, "IFNAME=%s DENY_ACL ADD_MAC %s", g_apIfaceName, mac) < 0) { in AddBlocklist()
774 return ModBlockList(mac, id); in AddBlocklist()
779 static int DelBlocklist(const char *mac, in argument
899 DisConnectedDev(const char *mac, int id) DisConnectedDev() argument
[all...]
H A Dhostapd_common_cmd.c471 const char *mac, int32_t id) in HostapdInterfaceSetMacFilter()
475 if (ifName == NULL || mac == NULL) { in HostapdInterfaceSetMacFilter()
485 if (hostapdHalDevice->addBlocklist(mac, id) != 0) { in HostapdInterfaceSetMacFilter()
493 const char *mac, int32_t id) in HostapdInterfaceDelMacFilter()
497 if (ifName == NULL || mac == NULL) { in HostapdInterfaceDelMacFilter()
507 if (hostapdHalDevice->delBlocklist(mac, id) != 0) { in HostapdInterfaceDelMacFilter()
539 const char *mac, int32_t id) in HostapdInterfaceDisassociateSta()
543 if (ifName == NULL || mac == NULL) { in HostapdInterfaceDisassociateSta()
553 if (hostapdHalDevice->disConnectedDev(mac, id) != 0) { in HostapdInterfaceDisassociateSta()
470 HostapdInterfaceSetMacFilter(struct IHostapdInterface *self, const char *ifName, const char *mac, int32_t id) HostapdInterfaceSetMacFilter() argument
492 HostapdInterfaceDelMacFilter(struct IHostapdInterface *self, const char *ifName, const char *mac, int32_t id) HostapdInterfaceDelMacFilter() argument
538 HostapdInterfaceDisassociateSta(struct IHostapdInterface *self, const char *ifName, const char *mac, int32_t id) HostapdInterfaceDisassociateSta() argument
/drivers/hdf_core/framework/include/wifi/
H A Dwifi_mac80211_ops.h391 const uint8_t *mac; /**< MAC address of the station with which the connection is to be canceled */ member
403 uint8_t mac[IEEE80211_MAC_ADDR_LEN]; /**< MAC address. For details about its length, see {@link member
538 * @param mac Indicates the pointer to the MAC address.
546 int32_t (*GetDeviceMacAddr)(NetDevice *netDev, int32_t type, uint8_t *mac, uint8_t len);
552 * @param mac Indicates the pointer to the MAC address.
560 int32_t (*SetMacAddr)(NetDevice *netDev, uint8_t *mac, uint8_t len);
682 * @param mac Indicates the mac address of station.
683 * @param param Indicates the length of mac address.
690 int32_t (*GetStationInfo)(struct NetDevice *netDev, StationInfo *info, const uint8_t *mac, uint32_
[all...]
/drivers/peripheral/wlan/hal/include/
H A Dwifi_hal_cmd.h33 int32_t HalCmdGetDevMacAddr(const char *ifName, int32_t type, unsigned char *mac, uint8_t len);
34 int32_t HalCmdSetMacAddr(const char *ifName, unsigned char *mac, uint8_t len);
/drivers/peripheral/wlan/hdi_service/service_common/
H A Dwlan_common_cmd.h28 uint8_t *mac, uint32_t *macLen, uint8_t len);
49 const uint8_t *mac, uint32_t macLen);
61 const uint8_t *mac, uint32_t macLen);
/drivers/peripheral/wlan/test/hdi_service/
H A Dwlan_hdi_direct_test.cpp212 * @tc.desc: Wifi hdi get device mac addr function test on STA feature
219 uint8_t mac[ETH_ADDR_LEN] = {0}; in HWTEST_F() local
224 int32_t rc = g_wlanObj->GetDeviceMacAddress(g_wlanObj, nullptr, mac, &macLen, ETH_ADDR_LEN); in HWTEST_F()
227 rc = g_wlanObj->GetDeviceMacAddress(g_wlanObj, &ifeature, mac, &macLen, ETH_ADDR_LEN); in HWTEST_F()
232 rc = g_wlanObj->GetDeviceMacAddress(g_wlanObj, &ifeature, mac, nullptr, ETH_ADDR_LEN); in HWTEST_F()
234 rc = g_wlanObj->GetDeviceMacAddress(g_wlanObj, &ifeature, mac, &macLen, ETH_ADDR_LEN); in HWTEST_F()
463 * @tc.desc: Wifi hdi set mac addr function test on STA feature
469 uint8_t mac[ETH_ADDR_LEN] = {0x12, 0x34, 0x56, 0x78, 0xab, 0xcd}; in HWTEST_F() local
475 int32_t rc = g_wlanObj->SetMacAddress(g_wlanObj, nullptr, mac, macLen); in HWTEST_F()
478 rc = g_wlanObj->SetMacAddress(g_wlanObj, &ifeature, mac, macLe in HWTEST_F()
635 uint8_t mac[ETH_ADDR_LEN] = {0}; HWTEST_F() local
[all...]
/drivers/peripheral/location/agnss/hdi_service/
H A Dagnss_interface_impl.cpp191 loc.u.mac.mac[i] = refInfo.mac.mac[i]; in SetAgnssRefInfo()
193 loc.u.mac.size = MAC_LEN; in SetAgnssRefInfo()
/drivers/peripheral/huks/hdi_service/
H A Dhuks_sa_hdi_struct.h157 * @brief Calculate mac header
161 * @param mac output mac value
165 const struct HksBlob *srcData, struct HksBlob *mac);
254 * @param srcData data needs to mac
255 * @param mac mac value
259 const struct HksBlob *srcData, struct HksBlob *mac);
/drivers/peripheral/wlan/test/fuzztest/ap_fuzzer/
H A Dap_fuzzer.cpp42 const char *mac = reinterpret_cast<const char *>(rawData); in FuzzSetCountryCode() local
48 interface->SetCountryCode(interface, &feature, mac, macLen); in FuzzSetCountryCode()
/drivers/peripheral/wlan/test/performance/common/
H A Dhdf_wlan_performance_test.cpp168 unsigned char mac[ETH_ADDR_LEN] = {0}; in HWTEST_F() local
178 ret = apFeature->baseFeature.getDeviceMacAddress((struct IWiFiBaseFeature *)apFeature, mac, ETH_ADDR_LEN - 1); in HWTEST_F()
181 ret = apFeature->baseFeature.getDeviceMacAddress((struct IWiFiBaseFeature *)apFeature, mac, ETH_ADDR_LEN); in HWTEST_F()
203 unsigned char mac[ETH_ADDR_LEN] = {0}; in HWTEST_F() local
213 ret = staFeature->baseFeature.getDeviceMacAddress((struct IWiFiBaseFeature *)staFeature, mac, ETH_ADDR_LEN - 1); in HWTEST_F()
216 ret = staFeature->baseFeature.getDeviceMacAddress((struct IWiFiBaseFeature *)staFeature, mac, ETH_ADDR_LEN); in HWTEST_F()

Completed in 13 milliseconds

123