prism54 regression in current -git
The patch "prism54: set carrier flags correctly" makes my prism54 device in AP mode come up without a carrier, which in causes IPv6 to not add a link-local address, which in turn causes radvd (configured to announce routes on that device) to refuse to start, breaking IPv6 for the entire network.
I didn't check whether a carrier is detected once a client associates, but in any case it seems to me that a device in AP mode should always indicate a carrier.
Quoted 10 lines · Patrick McHardy
The patch "prism54: set carrier flags correctly" makes my prism54 device in AP mode come up without a carrier, which in causes IPv6 to not add a link-local address, which in turn causes radvd (configured to announce routes on that device) to refuse to start, breaking IPv6 for the entire network.
I didn't check whether a carrier is detected once a client associates, but in any case it seems to me that a device in AP mode should always indicate a carrier.
Should always indicate a carrier _when it's configured and up_. If you just go 'iwconfig eth1 mode master' it shouldn't, but if you do:
ifconfig eth1 up
iwconfig eth1 mode master essid foobar
then it should.
Dan
Quoted 12 lines · Dan Williams
Quoted 10 lines · Patrick McHardy
The patch "prism54: set carrier flags correctly" makes my prism54 device in AP mode come up without a carrier, which in causes IPv6 to not add a link-local address, which in turn causes radvd (configured to announce routes on that device) to refuse to start, breaking IPv6 for the entire network.
I didn't check whether a carrier is detected once a client associates, but in any case it seems to me that a device in AP mode should always indicate a carrier.
Quoted 7 lines
Should always indicate a carrier
_whenit's configured andup_. If you just go 'iwconfig eth1 mode master' it shouldn't, but if you do:ifconfig eth1 up
iwconfig eth1 mode master essid foobarthen it should.
Yes, it was up and running of course. No carrier though.
Quoted 20 lines · Patrick McHardy
Quoted 17 lines · Dan Williams
Quoted 11 lines · Patrick McHardy
The patch "prism54: set carrier flags correctly" makes my prism54 device in AP mode come up without a carrier, which in causes IPv6 to not add a link-local address, which in turn causes radvd (configured to announce routes on that device) to refuse to start, breaking IPv6 for the entire network.
I didn't check whether a carrier is detected once a client associates, but in any case it seems to me that a device in AP mode should always indicate a carrier.
Should always indicate a carrier
_whenit's configured andup_. If you just go 'iwconfig eth1 mode master' it shouldn't, but if you do:
Quoted 7 lines
Quoted 5 lines
ifconfig eth1 up
iwconfig eth1 mode master essid foobarthen it should.
Yes, it was up and running of course. No carrier though.
Good catch. The carrier is set upon a firmware trigger so it is possible that when in AP mode we don't hit the trigger in firmware. I left open the possibility for this happening and go figure it happens. Even if we had docs this probably wouldn't be documented :) I'll try to cook up an exception patch now.
Luis
Quoted 27 lines · Luis R. Rodriguez
Quoted 26 lines · Patrick McHardy
Quoted 22 lines · Dan Williams
Quoted 11 lines · Patrick McHardy
The patch "prism54: set carrier flags correctly" makes my prism54 device in AP mode come up without a carrier, which in causes IPv6 to not add a link-local address, which in turn causes radvd (configured to announce routes on that device) to refuse to start, breaking IPv6 for the entire network.
I didn't check whether a carrier is detected once a client associates, but in any case it seems to me that a device in AP mode should always indicate a carrier.
Should always indicate a carrier
_whenit's configured andup_. If you just go 'iwconfig eth1 mode master' it shouldn't, but if you do:ifconfig eth1 up
iwconfig eth1 mode master essid foobarthen it should.
Quoted 7 lines
Quoted 1 line
Yes, it was up and running of course. No carrier though.
Good catch. The carrier is set upon a firmware trigger so it is possible that when in AP mode we don't hit the trigger in firmware. I left open the possibility for this happening and go figure it happens. Even if we had docs this probably wouldn't be documented :) I'll try to cook up an exception patch now.
Let me know if this fixes it.
drivers/net/wireless/prism54/islpci_dev.c +9 -2
@@ -388,8 +388,15 @@ islpci_open(struct net_device *ndev)netif_start_queue (ndev); -/* Turn off carrier unless we know we have associated */ -netif_carrier_off (ndev); +/* Turn off carrier if in STA or Ad-hoc mode. It will be turned on +* once the firmware receives a trap of being associated +* (GEN_OID_LINKSTATE). In other modes (AP or WDS or monitor) we +* should just leave the carrier on as its expected the firmware +* won't send us a trigger. */ +if (priv->iw_mode ==IW_MODE_INFRA || priv->iw_mode ==IW_MODE_ADHOC ) +netif_carrier_off (ndev); +else +netif_carrier_on (ndev);return 0 ; }
Quoted 23 lines · Luis R. Rodriguez
Quoted 5 lines
Good catch. The carrier is set upon a firmware trigger so it is possible that when in AP mode we don't hit the trigger in firmware. I left open the possibility for this happening and go figure it happens. Even if we had docs this probably wouldn't be documented :) I'll try to cook up an exception patch now.
Let me know if this fixes it.
Signed-off-by Luis R. Rodriguez <[email protected]>drivers/net/wireless/prism54/islpci_dev.c +2
-2@@ -388,8 +388,15 @@ islpci_open(struct net_device *ndev)netif_start_queue (ndev); -/* Turn off carrier unless we know we have associated */ -netif_carrier_off (ndev); +/* Turn off carrier if in STA or Ad-hoc mode. It will be turned on +* once the firmware receives a trap of being associated
drivers/net/wireless/prism54/islpci_dev.c islpci_open(struct net_device *ndev) · line 402
Quoted 10 lines
drivers/net/wireless/prism54/islpci_dev.c +7
-0+* (GEN_OID_LINKSTATE). In other modes (AP or WDS or monitor) we +* should just leave the carrier on as its expected the firmware +* won't send us a trigger. */ +if (priv->iw_mode ==IW_MODE_INFRA || priv->iw_mode ==IW_MODE_ADHOC ) +netif_carrier_off (ndev); +else +netif_carrier_on (ndev);return 0 ; }
This will probably fix the error I'm seeing, but if I'm not mistaken the mode can be changed while the device is UP and this case is not handled by your patch.
Quoted 7 lines · Patrick McHardy
Quoted 6 lines · Luis R. Rodriguez
Quoted 5 lines
Good catch. The carrier is set upon a firmware trigger so it is possible that when in AP mode we don't hit the trigger in firmware. I left open the possibility for this happening and go figure it happens. Even if we had docs this probably wouldn't be documented :) I'll try to cook up an exception patch now.
Quoted 6 lines
Quoted 2 lines
Let me know if this fixes it.
[...]This will probably fix the error I'm seeing, but if I'm not mistaken the mode can be changed while the device is UP and this case is not handled by your patch.
I've verified that is fixes the bug if the device is already configured for AP mode when set UP.
It appears to also be working correctly when configuring the device for master mode after bringing it up, but I don't understand why.
Quoted 15 lines · Patrick McHardy
Quoted 7 lines · Patrick McHardy
Quoted 6 lines · Luis R. Rodriguez
Quoted 5 lines
Good catch. The carrier is set upon a firmware trigger so it is possible that when in AP mode we don't hit the trigger in firmware. I left open the possibility for this happening and go figure it happens. Even if we had docs this probably wouldn't be documented :) I'll try to cook up an exception patch now.
Quoted 6 lines
Quoted 2 lines
Let me know if this fixes it.
[...]This will probably fix the error I'm seeing, but if I'm not mistaken the mode can be changed while the device is UP and this case is not handled by your patch.
Quoted 6 lines
I've verified that is fixes the bug if the device is already configured for AP mode when set UP.
It appears to also be working correctly when configuring the device for master mode after bringing it up, but I don't understand why.
Just to make sure this doesn't get lost, this fix hasn't made it to Linus' tree yet and appears to be still needed.