1
0

607-rt2x00-add_platform_data_mac_addr.patch 798 B

1234567891011121314151617181920212223242526
  1. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  2. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  3. @@ -1001,8 +1001,13 @@ static void rt2x00lib_rate(struct ieee80
  4. void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
  5. {
  6. + struct rt2x00_platform_data *pdata;
  7. const char *mac_addr;
  8. + pdata = rt2x00dev->dev->platform_data;
  9. + if (pdata && pdata->mac_address)
  10. + ether_addr_copy(eeprom_mac_addr, pdata->mac_address);
  11. +
  12. mac_addr = of_get_mac_address(rt2x00dev->dev->of_node);
  13. if (mac_addr)
  14. ether_addr_copy(eeprom_mac_addr, mac_addr);
  15. --- a/include/linux/rt2x00_platform.h
  16. +++ b/include/linux/rt2x00_platform.h
  17. @@ -14,6 +14,7 @@
  18. struct rt2x00_platform_data {
  19. char *eeprom_file_name;
  20. + const u8 *mac_address;
  21. int disable_2ghz;
  22. int disable_5ghz;