Search Linux Wireless

Re: [PATCH 6/6] p54: integrate parts of lmac_longbow.h and other parts of stlc45xx

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

 



Christian Lamparter wrote:
> This patch removes most/all? of the "magic" numbers and unknown structure 
> variables inside the code and replaces them with meaningful prototypes.
> 
> Signed-off-by: Christian Lamparter <chunkeey@xxxxxx>
> ---

The following change of ack_rssi from __le16 to u8 generates the sparse warning
"drivers/net/wireless/p54/p54common.c:660:5: warning: cast to restricted __le16":

> +struct p54_frame_sent {
>  	u8 status;
> -	u8 retries;
> -	__le16 ack_rssi;
> +	u8 tries;
> +	u8 ack_rssi;
> +	u8 quality;

The statement in question is:

info->status.ack_signal = p54_rssi_to_dbm(dev,
                le16_to_cpu(payload->ack_rssi));

The following patch fixes the warning:

Index: wireless-testing/drivers/net/wireless/p54/p54common.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/p54common.c
+++ wireless-testing/drivers/net/wireless/p54/p54common.c
@@ -657,7 +657,7 @@ static void p54_rx_frame_sent(struct iee
                if (payload->status & 0x02)
                        info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
                info->status.ack_signal = p54_rssi_to_dbm(dev,
-                               le16_to_cpu(payload->ack_rssi));
+                               (int)payload->ack_rssi);
                skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data));
                ieee80211_tx_status_irqsafe(dev, entry);
                goto out;

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux