User Tools

Site Tools


en:developers:documentation:mac80211:semantics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:developers:documentation:mac80211:semantics [2015/01/26 09:49] (current)
Line 1: Line 1:
 +
 +
 +===== mac80211 driver-level interface semantics =====
 +
 +One of the huge advantages of mac80211 is that we can improve consistency between drivers. However there is still work needed to define some semantics in order to make all drivers behave similarly. ​
 +
 +
 +==== MAC addresses ====
 +
 +Typically, drivers read a MAC address from EEPROM and write it into a device register. You should read the EEPROM during initial probe and store it in //​wiphy->​perm_addr//​ (use SET_IEEE80211_PERM_ADDR),​ however you should not initially program it into the active device to avoid it acknowledging frames. ​
 +
 +When an interface is added through the <​code>​add_interface</​code>​ callback, look at conf->​mac_addr and program this into your hardware. ​
 +
 +Remember to apply <​code>​remove_interface</​code>​ considerations to MAC address too, i.e. remove the MAC address on the device on <​code>​remove_interface</​code>​. ​
 +
 +
 +==== Firmware ====
 +
 +Firmware should not be loaded during the probe operation, it should be deferred until the first time an interface is added. However, your driver must read the device MAC address during probe and store it in wiphy (the mac address needs to be available before the interface comes up, much of userspace relies on this).((This assumes that you have a mechanism for reading the MAC address before firmware is loaded. This is true for all existing drivers, and will hopefully remain that way for future drivers too)) 
 +
 +You should use the generic firmware loaded in the kernel to request firmware from userspace and if it returns errors pass these errors up as the return value from the <​code>​add_interface</​code>​ callback. ​
 +
 +
 +
 +----
  
en/developers/documentation/mac80211/semantics.txt ยท Last modified: 2015/01/26 09:49 (external edit)