Commit 2b8fa9e8 authored by Ondrej Zary's avatar Ondrej Zary Committed by Kalle Valo

airo: Implement netif_carrier_on/off

Add calls to netif_carrier_on and netif_carrier_off
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4a0f2ea7
...@@ -3267,6 +3267,7 @@ static void airo_handle_link(struct airo_info *ai) ...@@ -3267,6 +3267,7 @@ static void airo_handle_link(struct airo_info *ai)
wake_up_interruptible(&ai->thr_wait); wake_up_interruptible(&ai->thr_wait);
} else } else
airo_send_event(ai->dev); airo_send_event(ai->dev);
netif_carrier_on(ai->dev);
} else if (!scan_forceloss) { } else if (!scan_forceloss) {
if (auto_wep && !ai->expires) { if (auto_wep && !ai->expires) {
ai->expires = RUN_AT(3*HZ); ai->expires = RUN_AT(3*HZ);
...@@ -3277,6 +3278,9 @@ static void airo_handle_link(struct airo_info *ai) ...@@ -3277,6 +3278,9 @@ static void airo_handle_link(struct airo_info *ai)
eth_zero_addr(wrqu.ap_addr.sa_data); eth_zero_addr(wrqu.ap_addr.sa_data);
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(ai->dev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(ai->dev, SIOCGIWAP, &wrqu, NULL);
netif_carrier_off(ai->dev);
} else {
netif_carrier_off(ai->dev);
} }
} }
...@@ -3613,6 +3617,7 @@ static void disable_MAC( struct airo_info *ai, int lock ) { ...@@ -3613,6 +3617,7 @@ static void disable_MAC( struct airo_info *ai, int lock ) {
return; return;
if (test_bit(FLAG_ENABLED, &ai->flags)) { if (test_bit(FLAG_ENABLED, &ai->flags)) {
netif_carrier_off(ai->dev);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_DISABLE; // disable in case already enabled cmd.cmd = MAC_DISABLE; // disable in case already enabled
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment