linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, forest@alittletooquiet.net,
	Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH v2 30/34] staging: vt6655: baseband.c timers replace spin lock
Date: Wed, 29 Oct 2014 17:44:05 +0000	[thread overview]
Message-ID: <1414604649-9105-31-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1414604649-9105-1-git-send-email-tvboxspy@gmail.com>

Use spin_lock_irqsave and spin_unlock_irqrestore

in functions TimerSQ3CallBack and TimerState1CallBack

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/baseband.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 8adeea4..c7ad927 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2786,9 +2786,11 @@ TimerSQ3CallBack(
 )
 {
 	struct vnt_private *pDevice = hDeviceContext;
+	unsigned long flags;
 
 	pr_debug("TimerSQ3CallBack...\n");
-	spin_lock_irq(&pDevice->lock);
+
+	spin_lock_irqsave(&pDevice->lock, flags);
 
 	pr_debug("3.[%08x][%08x], %d\n",
 		 (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
@@ -2803,7 +2805,7 @@ TimerSQ3CallBack(
 	add_timer(&pDevice->TimerSQ3Tmax3);
 	add_timer(&pDevice->TimerSQ3Tmax2);
 
-	spin_unlock_irq(&pDevice->lock);
+	spin_unlock_irqrestore(&pDevice->lock, flags);
 }
 
 /*+
@@ -2830,10 +2832,12 @@ TimerState1CallBack(
 )
 {
 	struct vnt_private *pDevice = hDeviceContext;
+	unsigned long flags;
 
 	pr_debug("TimerState1CallBack...\n");
 
-	spin_lock_irq(&pDevice->lock);
+	spin_lock_irqsave(&pDevice->lock, flags);
+
 	if (pDevice->uDiversityCnt < pDevice->ulDiversityMValue/100) {
 		s_vChangeAntenna(pDevice);
 		pDevice->TimerSQ3Tmax3.expires =  RUN_AT(pDevice->byTMax3 * HZ);
@@ -2864,5 +2868,6 @@ TimerState1CallBack(
 	}
 	pDevice->byAntennaState = 0;
 	BBvClearAntDivSQ3Value(pDevice);
-	spin_unlock_irq(&pDevice->lock);
+
+	spin_unlock_irqrestore(&pDevice->lock, flags);
 }
-- 
2.1.0


  parent reply	other threads:[~2014-10-29 17:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 17:43 [PATCH v2 00/34] staging: vt6655: Conversion to mac80211 Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 01/34] staging: vt6655: mac80211 conversion: add new rx functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 02/34] staging: vt6655: mac80211 conversion: add new key functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 03/34] staging: vt6655: mac8021 conversion: add new tx functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 04/34] staging: vt6655: mac80211 conversion: s_cbFillTxBufHead Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 05/34] staging: vt6655: dead code remove s_vFillFragParameter Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 06/34] staging: vt6655: mac80211 conversion: s_vFillRTSHead convert to using struct ieee80211_hdr Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 07/34] staging: vt6655: mac80211 conversion: s_uFillDataHead add power saving poll Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 08/34] staging: vt6655: mac80211 conversion add main mac80211 functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 09/34] staging: vt6655: mac80211 conversion add channel bands Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 10/34] staging: vt6655: mac80211 conversion replace suspend resume functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 11/34] staging: vt6655: mac80211 conversion: device_print_info remove netdevice Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 12/34] staging: vt6655: mac80211 conversion: changes to device_intr Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 13/34] staging: vt6655: mac80211 conversion: device_tx_srv tx and add report rates Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 14/34] staging: vt6655: mac80211 conversion: changes to set channel Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 15/34] staging: vt6655: mac80211 conversion: enable power saving Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 16/34] staging: vt6655: mac80211 conversion: changes to CARDbSetPhyParameter Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 17/34] staging: vt6655: mac80211 conversion: card.c use basic_rates Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 18/34] staging: vt6655: CARDbSetPhyParameter replace s_vSetRSPINF with CARDvSetRSPINF Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 19/34] staging: vt6655: mac80211 conversion: device_init_registers remove legacy code Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 20/34] staging: vt6655: mac80211 conversion: device_free_info Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 21/34] staging: vt6655: switch driver over to mac80211 Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 22/34] staging: vt6655: phy type same as bb type Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 23/34] staging: vt6655: mac80211 conversion: device_error remove legacy functions Malcolm Priestley
2014-10-29 17:43 ` [PATCH v2 24/34] staging: vt6655: vt6655_probe remove management pointers Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 25/34] staging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211 Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 26/34] staging: vt6655: MACvSetDefaultKeyEntry replace WLAN_WEP104_KEYLEN Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 27/34] staging: vt6655: baseband.c replace BIT0 with BIT(0) Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 28/34] staging: vt6655: s_vGenerateTxParameter remove unused cbMACHdLen Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 29/34] staging: vt6655: device_init_registers replace spin lock Malcolm Priestley
2014-10-29 17:44 ` Malcolm Priestley [this message]
2014-10-29 17:44 ` [PATCH v2 31/34] staging: vt6655: fifo & frag control remove big endian values Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 32/34] staging: vt6655: vnt_rx_data: uCurrRSSI should have the value of *rssi Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 33/34] staging: vt6655: don't update bUpdateBBVGA when off channel Malcolm Priestley
2014-10-29 17:44 ` [PATCH v2 34/34] staging: vt6655: reset tsf on dissociation Malcolm Priestley
2014-10-29 20:32 ` [PATCH v2 00/34] staging: vt6655: Conversion to mac80211 Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414604649-9105-31-git-send-email-tvboxspy@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).