--- zzzz-none-000/linux-3.10.107/drivers/net/wireless/hostap/hostap_hw.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/wireless/hostap/hostap_hw.c 2021-02-04 17:41:59.000000000 +0000 @@ -836,30 +836,25 @@ spin_lock_bh(&local->baplock); res = hfa384x_setup_bap(dev, BAP0, rid, 0); - if (res) - goto unlock; - - res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); - if (res) - goto unlock; + if (!res) + res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); if (le16_to_cpu(rec.len) == 0) { /* RID not available */ res = -ENODATA; - goto unlock; } rlen = (le16_to_cpu(rec.len) - 1) * 2; - if (exact_len && rlen != len) { + if (!res && exact_len && rlen != len) { printk(KERN_DEBUG "%s: hfa384x_get_rid - RID len mismatch: " "rid=0x%04x, len=%d (expected %d)\n", dev->name, rid, rlen, len); res = -ENODATA; } - res = hfa384x_from_bap(dev, BAP0, buf, len); + if (!res) + res = hfa384x_from_bap(dev, BAP0, buf, len); -unlock: spin_unlock_bh(&local->baplock); mutex_unlock(&local->rid_bap_mtx); @@ -933,6 +928,7 @@ prism2_hw_reset(dev); } + hostap_restore_power(dev); return res; } @@ -1430,7 +1426,7 @@ } list_for_each(ptr, &local->hostap_interfaces) { iface = list_entry(ptr, struct hostap_interface, list); - memcpy(iface->dev->dev_addr, dev->dev_addr, ETH_ALEN); + eth_hw_addr_inherit(iface->dev, dev); } } else if (local->fw_ap) prism2_check_sta_fw_version(local); @@ -2180,7 +2176,7 @@ struct hostap_tx_callback_info *cb; /* Make sure that frame was from us. */ - if (memcmp(txdesc->addr2, local->dev->dev_addr, ETH_ALEN)) { + if (!ether_addr_equal(txdesc->addr2, local->dev->dev_addr)) { printk(KERN_DEBUG "%s: TX callback - foreign frame\n", local->dev->name); return;