Search Linux Wireless

Re: [PATCH v9 2/4] ath9k: always call ath_reset from workqueue context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-08-30 4:20 PM, Rajkumar Manoharan wrote:
On Tue, Aug 30, 2011 at 10:30:45AM +0200, Felix Fietkau wrote:
 This makes it much easier to add further rework to avoid race conditions
 between reset and other work items.
 Move other functions to make ath_reset static.

 Signed-off-by: Felix Fietkau<nbd@xxxxxxxxxxx>
 ---
 diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
 index 49b93c2..2b2a975 100644
 --- a/drivers/net/wireless/ath/ath9k/xmit.c
 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
 @@ -581,8 +581,10 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,

  	rcu_read_unlock();

 -	if (needreset)
 -		ath_reset(sc, false);
 +	if (needreset) {
 +		sc->sc_flags |= SC_OP_HW_RESET;
 +		ieee80211_queue_work(sc->hw,&sc->hw_reset_work);
 +	}
  }

Still ath_txq_schedule can be scheduled. Return a error code from
ath_tx_complete_aggr to abort tx process intead of SC_OP_HW_RESET.
That looks much more generic and simple.
I added this to make sure that there won't be any subsequent attempts at processing the tx queue until the reset (e.g. if there was a tx status IRQ in the mean time).

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux