- /* Get the hardware address */
- if(iw_in_ether(bufp, sap) < 0)
- {
- fprintf(stderr, "Invalid hardware address %s\n", bufp);
- return(-1);
- }
+ {
+ /* Check if we have valid mac address type */
+ if(iw_check_mac_addr_type(skfd, ifname) < 0)
+ {
+ fprintf(stderr, "%-8.8s Interface doesn't support MAC addresses\n", ifname);
+ return(-1);
+ }
+
+ /* Get the hardware address */
+ if(iw_in_ether(bufp, sap) < 0)
+ {
+ fprintf(stderr, "Invalid hardware address %s\n", bufp);
+ return(-1);
+ }
+ }