Search Linux Wireless

Re: [PATCH 2/5] rtw88: handle and recover when firmware crash

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

 



<tehuang@xxxxxxxxxxx> writes:

> From: Tzu-En Huang <tehuang@xxxxxxxxxxx>
>
> This handles the situation when firmware crashes.
> When firmware crashes, it will send an interrupt, and driver will queue
> a work for recovery.
> In the work, driver will reset it's internal association state, which
> includes removing associated sta's macid, resetting vifs' states
> and removing keys. After resetting the driver's state, driver will call
> rtw_enter_ips() to force the chipset power off to reset the chip.
> Finally, driver calls ieee80211_restart_hw() to inform mac80211 stack
> to restart.
> Since only 8822c firmware supports this feature, the interrupt will only
> be triggered when 8822c chipset is loaded.
>
> Signed-off-by: Tzu-En Huang <tehuang@xxxxxxxxxxx>

[...]

> +int rtw_sta_add(struct rtw_dev *rtwdev, struct ieee80211_sta *sta,
> +		struct ieee80211_vif *vif)
> +{
> +	struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv;
> +	int i;
> +
> +	si->mac_id = rtw_acquire_macid(rtwdev);
> +	if (si->mac_id >= RTW_MAX_MAC_ID_NUM)
> +		return -ENOSPC;
> +
> +	si->sta = sta;
> +	si->vif = vif;
> +	si->init_ra_lv = 1;
> +	ewma_rssi_init(&si->avg_rssi);
> +	for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
> +		rtw_txq_init(rtwdev, sta->txq[i]);
> +
> +	rtw_update_sta_info(rtwdev, si);
> +	rtw_fw_media_status_report(rtwdev, si->mac_id, true);
> +
> +	rtwdev->sta_cnt++;
> +	rtw_info(rtwdev, "sta %pM joined with macid %d\n",
> +		 sta->addr, si->mac_id);

This was already in the driver before, but I'll comment still that I
find it bad practise to spam the log like this everytime a STA
associates or disassociates. So I would be happy to apply a patch to
change these messages to a debug message.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux