X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Fipw2100.c;h=2ab107f457937b96b339711d6c7eaa6ffa8f79c0;hb=9853832c49dc1685587abeb4e1decd4be690d256;hp=8d53d08b9691773ac36f1e2e3274d85a0a940853;hpb=da8e5aa21e037be02e0752e80b9444ff60185a3f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 8d53d08b969..2ab107f4579 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -1267,7 +1267,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) IPW2100_INTA_FATAL_ERROR | IPW2100_INTA_PARITY_ERROR); } - } while (i--); + } while (--i); /* Clear out any pending INTAs since we aren't supposed to have * interrupts enabled at this point... */ @@ -1339,7 +1339,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv) if (reg & IPW_AUX_HOST_RESET_REG_MASTER_DISABLED) break; - } while (i--); + } while (--i); priv->status &= ~STATUS_RESET_PENDING; @@ -2509,9 +2509,9 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ - ipw_rt->rt_hdr.it_len = sizeof(struct ipw_rt_hdr); /* total hdr+data */ + ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(struct ipw_rt_hdr)); /* total hdr+data */ - ipw_rt->rt_hdr.it_present = 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL; + ipw_rt->rt_hdr.it_present = cpu_to_le32(1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL); ipw_rt->rt_dbmsignal = status->rssi + IPW2100_RSSI_TO_DBM; @@ -2558,7 +2558,7 @@ static int ipw2100_corruption_check(struct ipw2100_priv *priv, int i) #ifdef CONFIG_IPW2100_MONITOR return 0; #else - switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { + switch (WLAN_FC_GET_TYPE(le16_to_cpu(u->rx_data.header.frame_ctl))) { case IEEE80211_FTYPE_MGMT: case IEEE80211_FTYPE_CTL: return 0; @@ -2677,7 +2677,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv) #endif if (stats.len < sizeof(struct ieee80211_hdr_3addr)) break; - switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { + switch (WLAN_FC_GET_TYPE(le16_to_cpu(u->rx_data.header.frame_ctl))) { case IEEE80211_FTYPE_MGMT: ieee80211_rx_mgt(priv->ieee, &u->rx_data.header, &stats); @@ -6591,8 +6591,7 @@ static const long ipw2100_frequencies[] = { 2472, 2484 }; -#define FREQ_COUNT (sizeof(ipw2100_frequencies) / \ - sizeof(ipw2100_frequencies[0])) +#define FREQ_COUNT ARRAY_SIZE(ipw2100_frequencies) static const long ipw2100_rates_11b[] = { 1000000, @@ -7796,7 +7795,7 @@ static int ipw2100_wx_set_mlme(struct net_device *dev, { struct ipw2100_priv *priv = ieee80211_priv(dev); struct iw_mlme *mlme = (struct iw_mlme *)extra; - u16 reason; + __le16 reason; reason = cpu_to_le16(mlme->reason_code);