mirror of https://gitee.com/openkylin/linux.git
iwl-3945: add #ifdef CONFIG_IWL3945_LEDS to avoid compile warning.
When building the wireless-next-2.6 tree with CONFIG_IWL3945 (for building iwl-3945 driver) and where CONFIG_IWL3945_LEDS is not set, we get this warning: drivers/net/wireless/iwlwifi/iwl-3945.c: In function 'iwl3945_pass_packet_to_mac80211': drivers/net/wireless/iwlwifi/iwl-3945.c:633: warning: unused variable 'hdr' This patch adds #ifdef to iwl3945_pass_packet_to_mac80211() to avoid this warning. (The variable 'hdr' is used only if CONFIG_IWL3945_LEDS is set) Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
435307a365
commit
699669f331
|
@ -630,7 +630,9 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv,
|
||||||
struct ieee80211_rx_status *stats)
|
struct ieee80211_rx_status *stats)
|
||||||
{
|
{
|
||||||
struct iwl3945_rx_packet *pkt = (struct iwl3945_rx_packet *)rxb->skb->data;
|
struct iwl3945_rx_packet *pkt = (struct iwl3945_rx_packet *)rxb->skb->data;
|
||||||
|
#ifdef CONFIG_IWL3945_LEDS
|
||||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA(pkt);
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA(pkt);
|
||||||
|
#endif
|
||||||
struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt);
|
struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt);
|
||||||
struct iwl3945_rx_frame_end *rx_end = IWL_RX_END(pkt);
|
struct iwl3945_rx_frame_end *rx_end = IWL_RX_END(pkt);
|
||||||
short len = le16_to_cpu(rx_hdr->len);
|
short len = le16_to_cpu(rx_hdr->len);
|
||||||
|
|
Loading…
Reference in New Issue