"Monitor"
};
-static int hex2num_i(char c)
-{
- if (c >= '0' && c <= '9')
- return c - '0';
- if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
- if (c >= 'A' && c <= 'F')
- return c - 'A' + 10;
- return -1;
-}
-
/**
* hwaddr_aton - Convert ASCII string to MAC address
* @txt: MAC address as a string (e.g., "00:11:22:33:44:55")
for (i = 0; i < 6; i++) {
int a, b;
- a = hex2num_i(*txt++);
+ a = hex_to_bin(*txt++);
if (a < 0)
return -1;
- b = hex2num_i(*txt++);
+ b = hex_to_bin(*txt++);
if (b < 0)
return -1;
*addr++ = (a << 4) | b;
135) : ((short_GI) ? 72 : 65);
max_rate *= 2; /* Mbps/2 */
wrqu->bitrate.value = max_rate * 500000;
+ } else {
+ wrqu->bitrate.value = max_rate * 500000;
}
} else
return -1;
irqL);
return -EINVAL;
}
- printk(KERN_INFO "r8712u: BSSID:" MACSTR "\n",
- MAC2STR(bssid));
+ printk(KERN_INFO "r8712u: BSSID:%pM\n", bssid);
if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
/* BSSID match, then check if supporting wpa/wpa2 */
pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],