Search Linux Wireless

Re: [PATCH 5/7] mac80211: Implement functionality to monitor station's rssi cross event

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

 



On Wed, 2018-06-13 at 16:15 +0530, Tamizh chelvam wrote:
> 
> +	if (sta->rssi_thold && bss_conf->enable_beacon) {
> +		int last_event = sta->last_sta_mon_event_signal;
> +		int thold = sta->rssi_thold;
> +		int hyst = sta->rssi_hyst;
> +		int sig = -ewma_signal_read(&sta->rx_stats_avg.signal);
> +
> +		if (sig < thold &&
> +		    (last_event == 0 || sig < last_event - hyst)) {
> +			sta->last_sta_mon_event_signal = sig;
> +			cfg80211_sta_mon_rssi_notify(
> +				rx->sdata->dev, sta->addr,
> +				NL80211_STA_MON_RSSI_THRESHOLD_EVENT_LOW,
> +				sig, GFP_ATOMIC);
> +		} else if (sig > thold &&
> +			   (last_event == 0 || sig > last_event + hyst)) {
> +			sta->last_sta_mon_event_signal = sig;
> +			cfg80211_sta_mon_rssi_notify(
> +				rx->sdata->dev, sta->addr,
> +				NL80211_STA_MON_RSSI_THRESHOLD_EVENT_HIGH,
> +				sig, GFP_ATOMIC);
> +		}
> +	}

This seems really familiar - perhaps if you unify the cfg80211 API for
sta_mon and "normal" CQM (distinguish based on the peer address?) you
can unify this block of code too?

johannes



[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