| 1133 | } |
| 1134 | |
| 1135 | rt_err_t rt_wlan_set_mac(rt_uint8_t mac[6]) |
| 1136 | { |
| 1137 | rt_err_t err = RT_EOK; |
| 1138 | |
| 1139 | if (_sta_is_null()) |
| 1140 | { |
| 1141 | return -RT_EIO; |
| 1142 | } |
| 1143 | RT_WLAN_LOG_D("%s is run mac: %02x:%02x:%02x:%02x:%02x:%02x", |
| 1144 | __FUNCTION__, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); |
| 1145 | |
| 1146 | MGNT_LOCK(); |
| 1147 | err = rt_wlan_dev_set_mac(STA_DEVICE(), mac); |
| 1148 | if (err != RT_EOK) |
| 1149 | { |
| 1150 | RT_WLAN_LOG_E("set sta mac addr fail"); |
| 1151 | MGNT_UNLOCK(); |
| 1152 | return err; |
| 1153 | } |
| 1154 | MGNT_UNLOCK(); |
| 1155 | return err; |
| 1156 | } |
| 1157 | |
| 1158 | rt_err_t rt_wlan_get_mac(rt_uint8_t mac[6]) |
| 1159 | { |
nothing calls this directly
no test coverage detected