Search Linux Wireless

Re: [PATCH 09/10] mac80211_hwsim: Add command to control rx status RSSI

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

 



On Sat, 2017-08-05 at 11:44 +0300, Luca Coelho wrote:
> 
> +static int hwsim_fops_rx_rssi_write(void *dat, u64 val)
> +{
> +	struct mac80211_hwsim_data *data = dat;
> +	int rssi = (int)val;

That cast is wrong - you should go to s64, do the range check, and only
then restrict to int. Basically, just do

s64 rssi = val;

in this line instead.


> +	debugfs_create_file("rx_rssi", 0666, data->debugfs, data,
> +			    &hwsim_fops_rx_rssi);

I also can't say I'm really happy with this, since there's no such
thing as an "RX RSSI".

Also, wmediumd already allows changing this - I'd rather people start
using the infrastructure better than papering over more.

IOW - do we really need this? Why can't you do the (simple) wmediumd
setup? There's even a hwsim test in wpa_s with wmediumd, it's not all
that difficult.

johannes



[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