MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_wlan_get_mac

Function rt_wlan_get_mac

components/drivers/wlan/dev_wlan_mgnt.c:1158–1178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156}
1157
1158rt_err_t rt_wlan_get_mac(rt_uint8_t mac[6])
1159{
1160 rt_err_t err = RT_EOK;
1161
1162 if (_sta_is_null())
1163 {
1164 return -RT_EIO;
1165 }
1166 MGNT_LOCK();
1167 err = rt_wlan_dev_get_mac(STA_DEVICE(), mac);
1168 if (err != RT_EOK)
1169 {
1170 RT_WLAN_LOG_E("get sta mac addr fail");
1171 MGNT_UNLOCK();
1172 return err;
1173 }
1174 RT_WLAN_LOG_D("%s is run mac: %02x:%02x:%02x:%02x:%02x:%02x",
1175 __FUNCTION__, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
1176 MGNT_UNLOCK();
1177 return err;
1178}
1179
1180rt_err_t rt_wlan_get_info(struct rt_wlan_info *info)
1181{

Callers

nothing calls this directly

Calls 2

_sta_is_nullFunction · 0.85
rt_wlan_dev_get_macFunction · 0.85

Tested by

no test coverage detected