forked from luck/tmp_suning_uos_patched
[PATCH] rtl8187: ensure priv->hwaddr is always valid
conf->mac_addr is not guaranteed to be set. This ensures priv->hwaddr is always set to a valid mac address. Thanks to Johannes Berg <johannes@sipsolutions.net> for finding this problem. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
313b0d3d86
commit
c43bff43e0
@ -466,7 +466,7 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
priv->hwaddr = conf->mac_addr;
|
||||
priv->hwaddr = conf->mac_addr ? conf->mac_addr : dev->wiphy->perm_addr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user