Search Linux Wireless

Re: [PATCH] mac80211: Clean up work-queues on disassociation.

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

 



On 02/20/2013 01:59 AM, Johannes Berg wrote:

In addition, re-order the quiesce code so that timers are
always stopped before work-items are flushed.  This was
not the problem I saw, but I think it may still be more
correct.

I'd prefer this to be a separate patch, and then might not apply that
one for 3.9


@@ -2668,6 +2681,10 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
  			       false, frame_buf);
  	mutex_unlock(&ifmgd->mtx);

+	/* Have to do this outside the ifmgd->mtx lock. */
+	cancel_work_sync(&ifmgd->monitor_work);
+	cancel_work_sync(&ifmgd->beacon_connection_loss_work);

OTOH, you do this many many times, and that doesn't seem necessary...

If the work structs run when we disconnected, that's ok, they just
musn't run after we destroy the interface, so I think it'd be much
better to just put the two lines into ieee80211_mgd_stop() instead of
all the other places.

Ok, that sounds promising to me.  For that matter, could we just call the sta_quiesce
method in mgd_stop?  It would be nice to have all of the final timer and work-queue cleanup
in a single place.

And, maybe add some checks in the work-callback methods to bail early if the station
isn't connected?

Thanks,
Ben


johannes



--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux