linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: Properly use unlikely check macro
@ 2010-11-29 15:27 Mohammed Shafi Shajakhan
  2010-12-02 20:21 ` John W. Linville
  0 siblings, 1 reply; 6+ messages in thread
From: Mohammed Shafi Shajakhan @ 2010-11-29 15:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, lrodriguez, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>

AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
macro should be used only to check whether auto-sleep feature is enabled

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 262c815..751ee1b 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 		}
 
 		spin_lock_irqsave(&sc->sc_pm_lock, flags);
-		if (unlikely(ath9k_check_auto_sleep(sc) ||
-			     (sc->ps_flags & (PS_WAIT_FOR_BEACON |
+		if ((sc->ps_flags & (PS_WAIT_FOR_BEACON |
 					      PS_WAIT_FOR_CAB |
-					      PS_WAIT_FOR_PSPOLL_DATA))))
+					      PS_WAIT_FOR_PSPOLL_DATA)) ||
+				unlikely(ath9k_hw_check_auto_sleep(sc)))
 			ath_rx_ps(sc, skb);
 		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
 
-- 
1.7.0.4


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

* Re: [PATCH] ath9k: Properly use unlikely check macro
  2010-11-29 15:27 [PATCH] ath9k: Properly use unlikely check macro Mohammed Shafi Shajakhan
@ 2010-12-02 20:21 ` John W. Linville
  2010-12-03  4:44   ` Mohammed Shafi
  0 siblings, 1 reply; 6+ messages in thread
From: John W. Linville @ 2010-12-02 20:21 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan; +Cc: linux-wireless, lrodriguez

On Mon, Nov 29, 2010 at 08:57:57PM +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
> 
> AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
> macro should be used only to check whether auto-sleep feature is enabled
> 
> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
> ---
>  drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index 262c815..751ee1b 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>  		}
>  
>  		spin_lock_irqsave(&sc->sc_pm_lock, flags);
> -		if (unlikely(ath9k_check_auto_sleep(sc) ||
> -			     (sc->ps_flags & (PS_WAIT_FOR_BEACON |
> +		if ((sc->ps_flags & (PS_WAIT_FOR_BEACON |
>  					      PS_WAIT_FOR_CAB |
> -					      PS_WAIT_FOR_PSPOLL_DATA))))
> +					      PS_WAIT_FOR_PSPOLL_DATA)) ||
> +				unlikely(ath9k_hw_check_auto_sleep(sc)))
>  			ath_rx_ps(sc, skb);
>  		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);

What tree is this against?

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] ath9k: Properly use unlikely check macro
  2010-12-02 20:21 ` John W. Linville
@ 2010-12-03  4:44   ` Mohammed Shafi
  2010-12-03 14:59     ` John W. Linville
  0 siblings, 1 reply; 6+ messages in thread
From: Mohammed Shafi @ 2010-12-03  4:44 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless@vger.kernel.org

On Friday 03 December 2010 01:51 AM, John W. Linville wrote:
> On Mon, Nov 29, 2010 at 08:57:57PM +0530, Mohammed Shafi Shajakhan wrote:
>    
>> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>
>> AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
>> macro should be used only to check whether auto-sleep feature is enabled
>>
>> Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>> ---
>>   drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
>>   1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index 262c815..751ee1b 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>>   		}
>>
>>   		spin_lock_irqsave(&sc->sc_pm_lock, flags);
>> -		if (unlikely(ath9k_check_auto_sleep(sc) ||
>> -			     (sc->ps_flags&  (PS_WAIT_FOR_BEACON |
>> +		if ((sc->ps_flags&  (PS_WAIT_FOR_BEACON |
>>   					      PS_WAIT_FOR_CAB |
>> -					      PS_WAIT_FOR_PSPOLL_DATA))))
>> +					      PS_WAIT_FOR_PSPOLL_DATA)) ||
>> +				unlikely(ath9k_hw_check_auto_sleep(sc)))
>>   			ath_rx_ps(sc, skb);
>>   		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
>>      
> What tree is this against?
>    
2.6.37-rc4 ..Any problems in applying.Do I have to resend it based on 
the latest pull ?
thanks,
shafi

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

* Re: [PATCH] ath9k: Properly use unlikely check macro
  2010-12-03  4:44   ` Mohammed Shafi
@ 2010-12-03 14:59     ` John W. Linville
  2010-12-03 15:08       ` Mohammed Shafi
  2010-12-03 15:24       ` Mohammed Shafi
  0 siblings, 2 replies; 6+ messages in thread
From: John W. Linville @ 2010-12-03 14:59 UTC (permalink / raw)
  To: Mohammed Shafi; +Cc: linux-wireless@vger.kernel.org

On Fri, Dec 03, 2010 at 10:14:07AM +0530, Mohammed Shafi wrote:
> On Friday 03 December 2010 01:51 AM, John W. Linville wrote:
> >On Mon, Nov 29, 2010 at 08:57:57PM +0530, Mohammed Shafi Shajakhan wrote:
> >>From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
> >>
> >>AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
> >>macro should be used only to check whether auto-sleep feature is enabled
> >>
> >>Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
> >>---
> >>  drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
> >>  1 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> >>index 262c815..751ee1b 100644
> >>--- a/drivers/net/wireless/ath/ath9k/recv.c
> >>+++ b/drivers/net/wireless/ath/ath9k/recv.c
> >>@@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
> >>  		}
> >>
> >>  		spin_lock_irqsave(&sc->sc_pm_lock, flags);
> >>-		if (unlikely(ath9k_check_auto_sleep(sc) ||
> >>-			     (sc->ps_flags&  (PS_WAIT_FOR_BEACON |
> >>+		if ((sc->ps_flags&  (PS_WAIT_FOR_BEACON |
> >>  					      PS_WAIT_FOR_CAB |
> >>-					      PS_WAIT_FOR_PSPOLL_DATA))))
> >>+					      PS_WAIT_FOR_PSPOLL_DATA)) ||
> >>+				unlikely(ath9k_hw_check_auto_sleep(sc)))
> >>  			ath_rx_ps(sc, skb);
> >>  		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
> >What tree is this against?
> 2.6.37-rc4 ..Any problems in applying.Do I have to resend it based
> on the latest pull ?

Did you compile it?

/home/linville/git/linux-2.6
[linville-8530p.local]:> git describe
v2.6.37-rc4

/home/linville/git/linux-2.6
[linville-8530p.local]:> grep ath9k_hw_check_auto_sleep drivers/net/wireless/ath/ath9k/*

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] ath9k: Properly use unlikely check macro
  2010-12-03 14:59     ` John W. Linville
@ 2010-12-03 15:08       ` Mohammed Shafi
  2010-12-03 15:24       ` Mohammed Shafi
  1 sibling, 0 replies; 6+ messages in thread
From: Mohammed Shafi @ 2010-12-03 15:08 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless@vger.kernel.org

On Friday 03 December 2010 08:29 PM, John W. Linville wrote:
> On Fri, Dec 03, 2010 at 10:14:07AM +0530, Mohammed Shafi wrote:
>    
>> On Friday 03 December 2010 01:51 AM, John W. Linville wrote:
>>      
>>> On Mon, Nov 29, 2010 at 08:57:57PM +0530, Mohammed Shafi Shajakhan wrote:
>>>        
>>>> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>>
>>>> AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
>>>> macro should be used only to check whether auto-sleep feature is enabled
>>>>
>>>> Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>> ---
>>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
>>>>   1 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>>>> index 262c815..751ee1b 100644
>>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>>> @@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>>>>   		}
>>>>
>>>>   		spin_lock_irqsave(&sc->sc_pm_lock, flags);
>>>> -		if (unlikely(ath9k_check_auto_sleep(sc) ||
>>>> -			     (sc->ps_flags&   (PS_WAIT_FOR_BEACON |
>>>> +		if ((sc->ps_flags&   (PS_WAIT_FOR_BEACON |
>>>>   					      PS_WAIT_FOR_CAB |
>>>> -					      PS_WAIT_FOR_PSPOLL_DATA))))
>>>> +					      PS_WAIT_FOR_PSPOLL_DATA)) ||
>>>> +				unlikely(ath9k_hw_check_auto_sleep(sc)))
>>>>   			ath_rx_ps(sc, skb);
>>>>   		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
>>>>          
>>> What tree is this against?
>>>        
>> 2.6.37-rc4 ..Any problems in applying.Do I have to resend it based
>> on the latest pull ?
>>      
> Did you compile it?
>
> /home/linville/git/linux-2.6
> [linville-8530p.local]:>  git describe
> v2.6.37-rc4
>
> /home/linville/git/linux-2.6
> [linville-8530p.local]:>  grep ath9k_hw_check_auto_sleep drivers/net/wireless/ath/ath9k/*
>    
Sorry for the trouble John  please ignore that patch.I apologize for not 
compiling it.I will send a v2 patch  over the latest pull.

> John
>    

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

* Re: [PATCH] ath9k: Properly use unlikely check macro
  2010-12-03 14:59     ` John W. Linville
  2010-12-03 15:08       ` Mohammed Shafi
@ 2010-12-03 15:24       ` Mohammed Shafi
  1 sibling, 0 replies; 6+ messages in thread
From: Mohammed Shafi @ 2010-12-03 15:24 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless@vger.kernel.org

On Friday 03 December 2010 08:29 PM, John W. Linville wrote:
> On Fri, Dec 03, 2010 at 10:14:07AM +0530, Mohammed Shafi wrote:
>    
>> On Friday 03 December 2010 01:51 AM, John W. Linville wrote:
>>      
>>> On Mon, Nov 29, 2010 at 08:57:57PM +0530, Mohammed Shafi Shajakhan wrote:
>>>        
>>>> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>>
>>>> AUTOSLEEP feature is enabled only AR9003 and later chips.So unlikely
>>>> macro should be used only to check whether auto-sleep feature is enabled
>>>>
>>>> Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>> ---
>>>>   drivers/net/wireless/ath/ath9k/recv.c |    6 +++---
>>>>   1 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>>>> index 262c815..751ee1b 100644
>>>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>>>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>>>> @@ -1743,10 +1743,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>>>>   		}
>>>>
>>>>   		spin_lock_irqsave(&sc->sc_pm_lock, flags);
>>>> -		if (unlikely(ath9k_check_auto_sleep(sc) ||
>>>> -			     (sc->ps_flags&   (PS_WAIT_FOR_BEACON |
>>>> +		if ((sc->ps_flags&   (PS_WAIT_FOR_BEACON |
>>>>   					      PS_WAIT_FOR_CAB |
>>>> -					      PS_WAIT_FOR_PSPOLL_DATA))))
>>>> +					      PS_WAIT_FOR_PSPOLL_DATA)) ||
>>>> +				unlikely(ath9k_hw_check_auto_sleep(sc)))
>>>>          
The  function is 'ath9k_check_auto_sleep' not 
'ath9k_hw_check_auto_sleep'.Sorry for the trouble.
>>>>   			ath_rx_ps(sc, skb);
>>>>   		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
>>>>          
>>> What tree is this against?
>>>        
>> 2.6.37-rc4 ..Any problems in applying.Do I have to resend it based
>> on the latest pull ?
>>      
> Did you compile it?
>
> /home/linville/git/linux-2.6
> [linville-8530p.local]:>  git describe
> v2.6.37-rc4
>
> /home/linville/git/linux-2.6
> [linville-8530p.local]:>  grep ath9k_hw_check_auto_sleep drivers/net/wireless/ath/ath9k/*
>
> John
>    

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

end of thread, other threads:[~2010-12-03 15:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-29 15:27 [PATCH] ath9k: Properly use unlikely check macro Mohammed Shafi Shajakhan
2010-12-02 20:21 ` John W. Linville
2010-12-03  4:44   ` Mohammed Shafi
2010-12-03 14:59     ` John W. Linville
2010-12-03 15:08       ` Mohammed Shafi
2010-12-03 15:24       ` Mohammed Shafi

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