On Wed, 2017-09-06 at 12:33 +0200, Johannes Berg wrote:
> 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
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.
From: Beni Lev
Set the base RSSI of a TX frame. The final RSSI of the frame will be
the base RSSI + the radio's TX power
Signed-off-by: Beni Lev
Signed-off-by: Luca Coelho
---
drivers/net/wireless/mac80211_hwsim.c | 36