* About the .start function in ieee80211_ops.
@ 2012-03-20 6:02 Matt Chen
2012-03-20 6:19 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Matt Chen @ 2012-03-20 6:02 UTC (permalink / raw)
To: users, linux-wireless
Hi all,
I have a issue recently for rt2800pci, the way to duplicate this is
1. Press function key to set rfkill hard blocked, it would cause
driver to power off.
2. reboot
3. find when load the driver (rt2800pci), it would stop in "Registered
led device: rt2800pci-phy0::quality".
Here you would find the rfkill_poll function is not started to work,
also the rt2x00mac_start() registered in rt2800pci_mac80211_ops
structure is not yet be executed.
My question is when or what condition the rt2x00mac_start() would be
running, because if it is not yet executed, then it would not be able
to load the firmware in rt2x00lib_start().
In drivers/net/wireless/rt2x00/rt2800pci.c:
static const struct ieee80211_ops rt2800pci_mac80211_ops = {
...
.start = rt2x00mac_start,
.stop = rt2x00mac_stop,
...
...
};
in drivers/net/wireless/rt2x00/rt2x00mac.c:
int rt2x00mac_start(struct ieee80211_hw *hw)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
return 0;
return rt2x00lib_start(rt2x00dev);
}
--
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About the .start function in ieee80211_ops.
2012-03-20 6:02 About the .start function in ieee80211_ops Matt Chen
@ 2012-03-20 6:19 ` Johannes Berg
2012-03-20 12:29 ` Matt Chen
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-03-20 6:19 UTC (permalink / raw)
To: Matt Chen; +Cc: users, linux-wireless
On Tue, 2012-03-20 at 14:02 +0800, Matt Chen wrote:
> Hi all,
> I have a issue recently for rt2800pci, the way to duplicate this is
> 1. Press function key to set rfkill hard blocked, it would cause
> driver to power off.
> 2. reboot
> 3. find when load the driver (rt2800pci), it would stop in "Registered
> led device: rt2800pci-phy0::quality".
>
> Here you would find the rfkill_poll function is not started to work,
> also the rt2x00mac_start() registered in rt2800pci_mac80211_ops
> structure is not yet be executed.
> My question is when or what condition the rt2x00mac_start() would be
> running, because if it is not yet executed, then it would not be able
> to load the firmware in rt2x00lib_start().
That's a bug in the driver then -- it should probably start the rfkill
stuff without mac80211's start() command. start() is only called when
the first interface comes up, but that will never happen if it's in
rfkill block.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About the .start function in ieee80211_ops.
2012-03-20 6:19 ` Johannes Berg
@ 2012-03-20 12:29 ` Matt Chen
2012-03-20 12:31 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Matt Chen @ 2012-03-20 12:29 UTC (permalink / raw)
To: Johannes Berg; +Cc: users, linux-wireless
Hi Johannes,
2012/3/20 Johannes Berg <johannes@sipsolutions.net>:
> On Tue, 2012-03-20 at 14:02 +0800, Matt Chen wrote:
>> Hi all,
>> I have a issue recently for rt2800pci, the way to duplicate this is
>> 1. Press function key to set rfkill hard blocked, it would cause
>> driver to power off.
>> 2. reboot
>> 3. find when load the driver (rt2800pci), it would stop in "Registered
>> led device: rt2800pci-phy0::quality".
>>
>> Here you would find the rfkill_poll function is not started to work,
>> also the rt2x00mac_start() registered in rt2800pci_mac80211_ops
>> structure is not yet be executed.
>> My question is when or what condition the rt2x00mac_start() would be
>> running, because if it is not yet executed, then it would not be able
>> to load the firmware in rt2x00lib_start().
>
> That's a bug in the driver then -- it should probably start the rfkill
> stuff without mac80211's start() command. start() is only called when
> the first interface comes up, but that will never happen if it's in
> rfkill block.
Do you have any idea which part of code would make the first interface
comes up ? :)
Would that be in cfg80211 ?
Thanks.
> johannes
>
> .
--
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About the .start function in ieee80211_ops.
2012-03-20 12:29 ` Matt Chen
@ 2012-03-20 12:31 ` Johannes Berg
2012-03-21 6:57 ` Matt Chen
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-03-20 12:31 UTC (permalink / raw)
To: Matt Chen; +Cc: users, linux-wireless
On Tue, 2012-03-20 at 20:29 +0800, Matt Chen wrote:
> Hi Johannes,
>
> 2012/3/20 Johannes Berg <johannes@sipsolutions.net>:
> > On Tue, 2012-03-20 at 14:02 +0800, Matt Chen wrote:
> >> Hi all,
> >> I have a issue recently for rt2800pci, the way to duplicate this is
> >> 1. Press function key to set rfkill hard blocked, it would cause
> >> driver to power off.
> >> 2. reboot
> >> 3. find when load the driver (rt2800pci), it would stop in "Registered
> >> led device: rt2800pci-phy0::quality".
> >>
> >> Here you would find the rfkill_poll function is not started to work,
> >> also the rt2x00mac_start() registered in rt2800pci_mac80211_ops
> >> structure is not yet be executed.
> >> My question is when or what condition the rt2x00mac_start() would be
> >> running, because if it is not yet executed, then it would not be able
> >> to load the firmware in rt2x00lib_start().
> >
> > That's a bug in the driver then -- it should probably start the rfkill
> > stuff without mac80211's start() command. start() is only called when
> > the first interface comes up, but that will never happen if it's in
> > rfkill block.
> Do you have any idea which part of code would make the first interface
> comes up ? :)
> Would that be in cfg80211 ?
No code? You, as the user, running "ip link set wlan0 up" or
network-manager doing something similar etc.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About the .start function in ieee80211_ops.
2012-03-20 12:31 ` Johannes Berg
@ 2012-03-21 6:57 ` Matt Chen
2012-03-21 7:41 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Matt Chen @ 2012-03-21 6:57 UTC (permalink / raw)
To: Johannes Berg; +Cc: users, linux-wireless
Hi Johannes,
2012/3/20 Johannes Berg <johannes@sipsolutions.net>:
> On Tue, 2012-03-20 at 20:29 +0800, Matt Chen wrote:
>> Hi Johannes,
>>
>> 2012/3/20 Johannes Berg <johannes@sipsolutions.net>:
>> > On Tue, 2012-03-20 at 14:02 +0800, Matt Chen wrote:
>> >> Hi all,
>> >> I have a issue recently for rt2800pci, the way to duplicate this is
>> >> 1. Press function key to set rfkill hard blocked, it would cause
>> >> driver to power off.
>> >> 2. reboot
>> >> 3. find when load the driver (rt2800pci), it would stop in "Registered
>> >> led device: rt2800pci-phy0::quality".
>> >>
>> >> Here you would find the rfkill_poll function is not started to work,
>> >> also the rt2x00mac_start() registered in rt2800pci_mac80211_ops
>> >> structure is not yet be executed.
>> >> My question is when or what condition the rt2x00mac_start() would be
>> >> running, because if it is not yet executed, then it would not be able
>> >> to load the firmware in rt2x00lib_start().
>> >
>> > That's a bug in the driver then -- it should probably start the rfkill
>> > stuff without mac80211's start() command. start() is only called when
>> > the first interface comes up, but that will never happen if it's in
>> > rfkill block.
>> Do you have any idea which part of code would make the first interface
>> comes up ? :)
>> Would that be in cfg80211 ?
>
> No code? You, as the user, running "ip link set wlan0 up" or
> network-manager doing something similar etc.
Big thank you for the information. :)
For rt2x00, is this the only way to make the driver executing the .run
function in ieee80211_ops structure definition ?
> johannes
>
--
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About the .start function in ieee80211_ops.
2012-03-21 6:57 ` Matt Chen
@ 2012-03-21 7:41 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2012-03-21 7:41 UTC (permalink / raw)
To: Matt Chen; +Cc: users, linux-wireless
On Wed, 2012-03-21 at 14:57 +0800, Matt Chen wrote:
> >> > That's a bug in the driver then -- it should probably start the rfkill
> >> > stuff without mac80211's start() command. start() is only called when
> >> > the first interface comes up, but that will never happen if it's in
> >> > rfkill block.
> >> Do you have any idea which part of code would make the first interface
> >> comes up ? :)
> >> Would that be in cfg80211 ?
> >
> > No code? You, as the user, running "ip link set wlan0 up" or
> > network-manager doing something similar etc.
> Big thank you for the information. :)
> For rt2x00, is this the only way to make the driver executing the .run
> function in ieee80211_ops structure definition ?
You mean .start, and yes :)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-21 7:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 6:02 About the .start function in ieee80211_ops Matt Chen
2012-03-20 6:19 ` Johannes Berg
2012-03-20 12:29 ` Matt Chen
2012-03-20 12:31 ` Johannes Berg
2012-03-21 6:57 ` Matt Chen
2012-03-21 7:41 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).