mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
update
This commit is contained in:
parent
9fd9237edc
commit
cfbc69e71a
2 changed files with 2 additions and 1 deletions
|
@ -1115,7 +1115,6 @@ static int add_mac(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
parse_add_mac_to_file(msg);
|
parse_add_mac_to_file(msg);
|
||||||
|
|
||||||
// here we need to send it via the network!
|
// here we need to send it via the network!
|
||||||
// and we have to find some adaptive strategie to realize bad driver beahviour
|
|
||||||
send_blob_attr_via_network(msg, "addmac");
|
send_blob_attr_via_network(msg, "addmac");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -19,6 +19,7 @@ int string_is_greater(uint8_t *str, uint8_t *str_2) {
|
||||||
return length_1 > length_2;
|
return length_1 > length_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// source: https://elixir.bootlin.com/linux/v4.9/source/lib/hexdump.c#L28
|
||||||
int hex_to_bin(char ch) {
|
int hex_to_bin(char ch) {
|
||||||
if ((ch >= '0') && (ch <= '9')) return ch - '0';
|
if ((ch >= '0') && (ch <= '9')) return ch - '0';
|
||||||
ch = tolower(ch);
|
ch = tolower(ch);
|
||||||
|
@ -26,6 +27,7 @@ int hex_to_bin(char ch) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// based on: hostapd src/utils/common.c
|
||||||
int hwaddr_aton(const char *txt, uint8_t *addr) {
|
int hwaddr_aton(const char *txt, uint8_t *addr) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue