aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/main.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-01-02 09:22:36 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 15:16:55 -0500
commitb180b10056e204fa1f65f0494215d73eb8253c87 (patch)
treeb0f6983671e281be9605947388f85edc2380e8d2 /drivers/net/wireless/brcm80211/brcmsmac/main.c
parent66578c0a8cb8c34ef284acf34e05f2d8e7416ee1 (diff)
brcmsmac: allow user-space setting of interface address
The interface address of the wireless device is determined by the permanent address stored in the device. This patch allows it to be overridden from user-space. Reported-by: Maximilian Engelhardt <maxi@daemonizer.de> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/main.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 5f0f444f85a3..c26992a60e6c 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -2473,6 +2473,7 @@ static void brcms_b_tx_fifo_resume(struct brcms_hardware *wlc_hw,
2473static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx) 2473static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2474{ 2474{
2475 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; 2475 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
2476 u8 *ethaddr = wlc_hw->wlc->pub->cur_etheraddr;
2476 2477
2477 if (mute_tx) { 2478 if (mute_tx) {
2478 /* suspend tx fifos */ 2479 /* suspend tx fifos */
@@ -2482,8 +2483,7 @@ static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2482 brcms_b_tx_fifo_suspend(wlc_hw, TX_AC_VI_FIFO); 2483 brcms_b_tx_fifo_suspend(wlc_hw, TX_AC_VI_FIFO);
2483 2484
2484 /* zero the address match register so we do not send ACKs */ 2485 /* zero the address match register so we do not send ACKs */
2485 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, 2486 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, null_ether_addr);
2486 null_ether_addr);
2487 } else { 2487 } else {
2488 /* resume tx fifos */ 2488 /* resume tx fifos */
2489 brcms_b_tx_fifo_resume(wlc_hw, TX_DATA_FIFO); 2489 brcms_b_tx_fifo_resume(wlc_hw, TX_DATA_FIFO);
@@ -2492,8 +2492,7 @@ static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2492 brcms_b_tx_fifo_resume(wlc_hw, TX_AC_VI_FIFO); 2492 brcms_b_tx_fifo_resume(wlc_hw, TX_AC_VI_FIFO);
2493 2493
2494 /* Restore address */ 2494 /* Restore address */
2495 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, 2495 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, ethaddr);
2496 wlc_hw->etheraddr);
2497 } 2496 }
2498 2497
2499 wlc_phy_mute_upd(wlc_hw->band->pi, mute_tx, 0); 2498 wlc_phy_mute_upd(wlc_hw->band->pi, mute_tx, 0);