linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* requesting information on null frame send during scan in mac80211 - linux 3_1_4 code base
@ 2012-03-02 18:39 vivekanandah
  2012-03-06 15:50 ` Mohammed Shafi
  0 siblings, 1 reply; 3+ messages in thread
From: vivekanandah @ 2012-03-02 18:39 UTC (permalink / raw)
  To: linux-wireless, Johannes Berg

hi,


i am new to the linux system and i am hoping that this is the right 
list to mail for my query.

I am presently working on linux kernel 3.1.4 and i was looking into the 
mac80211 code and the scan implementation on the same.

when the scan process is started, the station is supposed to send a 
null frame with PM bit set, so that AP can buffer frames to the station.

However, it is seen in code that when scan is initiated (software 
scan),
the ieee80211_offchannel_enable_all_ps(local, false); function is 
called, since the flag is set to false, the NULL frame will not be sent 
out. also, when the scan state changes to leaving operating channel, the 
vifs interface is blocked. even here, i see that the flag setting is 
false for offchannel Power save and the null frame is not sent out.

the comment however just prior to the vifs stop function call indicates 
that offchannel settings are already completed at the start of scan 
process. the code snippet is shown below:

/*PS will already be in off-channel mode, we do that once at the 
beginning of scanning.*/
ieee80211_offchannel_stop_vifs(local, false);

i just would like to know why the flag is FALSE in both cases, so we 
never send out a null frame to the AP at the start. is this a bug or 
there is some deficiency in my current understanding?

i would be very thankful for any help or guidance

thanks in advance
vivek

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: requesting information on null frame send during scan in mac80211 - linux 3_1_4 code base
  2012-03-02 18:39 requesting information on null frame send during scan in mac80211 - linux 3_1_4 code base vivekanandah
@ 2012-03-06 15:50 ` Mohammed Shafi
  2012-03-07  4:15   ` Vivekananda Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi @ 2012-03-06 15:50 UTC (permalink / raw)
  To: vivekanandah; +Cc: linux-wireless, Johannes Berg

On Sat, Mar 3, 2012 at 12:09 AM,  <vivekanandah@posedge.com> wrote:
> hi,

hi vivekanandah,

>
> i am new to the linux system and i am hoping that this is the right list to
> mail for my query.
>
> I am presently working on linux kernel 3.1.4 and i was looking into the
> mac80211 code and the scan implementation on the same.

the present wireless-testing scan state machine is simplified by the
johannes's patch
http://comments.gmane.org/gmane.linux.kernel.wireless.general/80287
and easy to understand

>
> when the scan process is started, the station is supposed to send a null
> frame with PM bit set, so that AP can buffer frames to the station.
>
> However, it is seen in code that when scan is initiated (software scan),
> the ieee80211_offchannel_enable_all_ps(local, false); function is called,
> since the flag is set to false, the NULL frame will not be sent out. also,
> when the scan state changes to leaving operating channel, the vifs interface
> is blocked. even here, i see that the flag setting is false for offchannel
> Power save and the null frame is not sent out.

the current wireless-testing tree does this. please look at
ieee80211_start_sw_scan
git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git

>
> the comment however just prior to the vifs stop function call indicates that
> offchannel settings are already completed at the start of scan process. the
> code snippet is shown below:
>
> /*PS will already be in off-channel mode, we do that once at the beginning
> of scanning.*/
> ieee80211_offchannel_stop_vifs(local, false);
>
> i just would like to know why the flag is FALSE in both cases, so we never
> send out a null frame to the AP at the start. is this a bug or there is some
> deficiency in my current understanding?

based on my limited understanding of the previous code, my guess we
have in ieee80211_work in work.c and this should send a null func
frame. (both started and tmp_channel will be false and NULL

if (on_oper_chan != on_oper_chan2) {
				if (on_oper_chan2) {
					/* going off oper channel, PS too */
----> 					ieee80211_offchannel_stop_vifs(local,
								       true);
					ieee80211_hw_config(local, 0);
				} else {
					/* going on channel, but leave PS

its best to look at the current wireless-testing tree code, its more simpler.


>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
thanks,
shafi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: requesting information on null frame send during scan in mac80211 - linux 3_1_4 code base
  2012-03-06 15:50 ` Mohammed Shafi
@ 2012-03-07  4:15   ` Vivekananda Holla
  0 siblings, 0 replies; 3+ messages in thread
From: Vivekananda Holla @ 2012-03-07  4:15 UTC (permalink / raw)
  To: Mohammed Shafi; +Cc: linux-wireless, Johannes Berg

hi,

thanks for the reply. yes, i looked into the latest code and understand 
the working now. thanks for the input. it really helped

thanks and regards
vivek



On 03/06/2012 09:20 PM, Mohammed Shafi wrote:
> On Sat, Mar 3, 2012 at 12:09 AM,<vivekanandah@posedge.com>  wrote:
>> hi,
> hi vivekanandah,
>
>> i am new to the linux system and i am hoping that this is the right list to
>> mail for my query.
>>
>> I am presently working on linux kernel 3.1.4 and i was looking into the
>> mac80211 code and the scan implementation on the same.
> the present wireless-testing scan state machine is simplified by the
> johannes's patch
> http://comments.gmane.org/gmane.linux.kernel.wireless.general/80287
> and easy to understand
>
>> when the scan process is started, the station is supposed to send a null
>> frame with PM bit set, so that AP can buffer frames to the station.
>>
>> However, it is seen in code that when scan is initiated (software scan),
>> the ieee80211_offchannel_enable_all_ps(local, false); function is called,
>> since the flag is set to false, the NULL frame will not be sent out. also,
>> when the scan state changes to leaving operating channel, the vifs interface
>> is blocked. even here, i see that the flag setting is false for offchannel
>> Power save and the null frame is not sent out.
> the current wireless-testing tree does this. please look at
> ieee80211_start_sw_scan
> git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
>
>> the comment however just prior to the vifs stop function call indicates that
>> offchannel settings are already completed at the start of scan process. the
>> code snippet is shown below:
>>
>> /*PS will already be in off-channel mode, we do that once at the beginning
>> of scanning.*/
>> ieee80211_offchannel_stop_vifs(local, false);
>>
>> i just would like to know why the flag is FALSE in both cases, so we never
>> send out a null frame to the AP at the start. is this a bug or there is some
>> deficiency in my current understanding?
> based on my limited understanding of the previous code, my guess we
> have in ieee80211_work in work.c and this should send a null func
> frame. (both started and tmp_channel will be false and NULL
>
> if (on_oper_chan != on_oper_chan2) {
> 				if (on_oper_chan2) {
> 					/* going off oper channel, PS too */
> ---->  					ieee80211_offchannel_stop_vifs(local,
> 								       true);
> 					ieee80211_hw_config(local, 0);
> 				} else {
> 					/* going on channel, but leave PS
>
> its best to look at the current wireless-testing tree code, its more simpler.
>
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-07  4:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 18:39 requesting information on null frame send during scan in mac80211 - linux 3_1_4 code base vivekanandah
2012-03-06 15:50 ` Mohammed Shafi
2012-03-07  4:15   ` Vivekananda Holla

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).