Unverified Commit 39820fdf authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6116 wifi: rt2x00: restart beacon queue when hardware reset

parents 3ae62c09 cf3c981a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
	rt2x00link_stop_tuner(rt2x00dev);
	rt2x00queue_stop_queues(rt2x00dev);
	rt2x00queue_flush_queues(rt2x00dev, true);
	rt2x00queue_stop_queue(rt2x00dev->bcn);

	/*
	 * Disable radio.
@@ -1272,6 +1273,7 @@ int rt2x00lib_start(struct rt2x00_dev *rt2x00dev)
	rt2x00dev->intf_ap_count = 0;
	rt2x00dev->intf_sta_count = 0;
	rt2x00dev->intf_associated = 0;
	rt2x00dev->intf_beaconing = 0;

	/* Enable the radio */
	retval = rt2x00lib_enable_radio(rt2x00dev);
@@ -1298,6 +1300,7 @@ void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev)
	rt2x00dev->intf_ap_count = 0;
	rt2x00dev->intf_sta_count = 0;
	rt2x00dev->intf_associated = 0;
	rt2x00dev->intf_beaconing = 0;
}

static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
+11 −0
Original line number Diff line number Diff line
@@ -599,6 +599,17 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
	 */
	if (changes & BSS_CHANGED_BEACON_ENABLED) {
		mutex_lock(&intf->beacon_skb_mutex);

		/*
		 * Clear the 'enable_beacon' flag and clear beacon because
		 * the beacon queue has been stopped after hardware reset.
		 */
		if (test_bit(DEVICE_STATE_RESET, &rt2x00dev->flags) &&
		    intf->enable_beacon) {
			intf->enable_beacon = false;
			rt2x00queue_clear_beacon(rt2x00dev, vif);
		}

		if (!bss_conf->enable_beacon && intf->enable_beacon) {
			rt2x00dev->intf_beaconing--;
			intf->enable_beacon = false;