Search Linux Wireless

[PATCH 6/7] mac80211: suppress warnings

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

 



From: Michael Wu <flamingice@xxxxxxxxxxxx>

This eliminates warnings from gcc and sparse.

Signed-off-by: Michael Wu <flamingice@xxxxxxxxxxxx>
---

 net/mac80211/ieee80211.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 4fd2300..2b6cb06 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -952,8 +952,6 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
 	if (unlikely(!tx->u.tx.mgmt_interface && tx->sdata->ieee802_1x &&
 		     !(sta_flags & WLAN_STA_AUTHORIZED))) {
 #ifdef CONFIG_MAC80211_DEBUG
-		struct ieee80211_hdr *hdr =
-			(struct ieee80211_hdr *) tx->skb->data;
 		printk(KERN_DEBUG "%s: dropped frame to " MAC_FMT
 		       " (unauthorized port)\n", tx->dev->name,
 		       MAC_ARG(hdr->addr1));
@@ -2049,7 +2047,7 @@ static int __ieee80211_if_config(struct net_device *dev,
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 	struct ieee80211_if_conf conf;
-	static const u8 scan_bssid[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+	static u8 scan_bssid[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 	if (!local->ops->config_interface || !netif_running(dev))
 		return 0;
@@ -2758,7 +2756,7 @@ ieee80211_fill_frame_info(struct ieee80211_local *local,
 				htonl(ieee80211_phytype_dsss_dot11_turbo);
 			break;
 		default:
-			fi->phytype = 0xAAAAAAAA;
+			fi->phytype = htonl(0xAAAAAAAA);
 			break;
 		}
 		fi->channel = htonl(status->channel);
@@ -2779,7 +2777,7 @@ ieee80211_fill_frame_info(struct ieee80211_local *local,
 		}
 
 		fi->antenna = htonl(status->antenna);
-		fi->priority = 0xffffffff; /* no clue */
+		fi->priority = htonl(0xffffffff); /* no clue */
 		fi->ssi_type = htonl(ieee80211_ssi_raw);
 		fi->ssi_signal = htonl(status->ssi);
 		fi->ssi_noise = 0x00000000;

-
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