diff options
author | Michael Wu <flamingice@sourmilk.net> | 2007-07-16 02:09:55 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-08-06 21:06:03 +0200 |
commit | c43bff43e0617dd56515b4ea42a8037c699c86f1 (patch) | |
tree | 7d74ae44dca335178ac6dd510e35b52e66da4add /drivers/net/wireless/rtl8187_dev.c | |
parent | [PATCH] remove duplicated ioctl entries in compat_ioctl.c (diff) | |
download | linux-c43bff43e0617dd56515b4ea42a8037c699c86f1.tar.xz linux-c43bff43e0617dd56515b4ea42a8037c699c86f1.zip |
[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>
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r-- | drivers/net/wireless/rtl8187_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index cea85894b7f2..e61c6d5ba1a9 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c @@ -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; } |