diff options
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index b7f275c00de3..3db0c32afe82 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -4030,6 +4030,10 @@ static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv) | |||
4030 | int i; | 4030 | int i; |
4031 | 4031 | ||
4032 | rxq = (struct ipw_rx_queue *)kmalloc(sizeof(*rxq), GFP_KERNEL); | 4032 | rxq = (struct ipw_rx_queue *)kmalloc(sizeof(*rxq), GFP_KERNEL); |
4033 | if (unlikely(!rxq)) { | ||
4034 | IPW_ERROR("memory allocation failed\n"); | ||
4035 | return NULL; | ||
4036 | } | ||
4033 | memset(rxq, 0, sizeof(*rxq)); | 4037 | memset(rxq, 0, sizeof(*rxq)); |
4034 | spin_lock_init(&rxq->lock); | 4038 | spin_lock_init(&rxq->lock); |
4035 | INIT_LIST_HEAD(&rxq->rx_free); | 4039 | INIT_LIST_HEAD(&rxq->rx_free); |
@@ -4904,7 +4908,7 @@ static void ipw_rx(struct ipw_priv *priv) | |||
4904 | { | 4908 | { |
4905 | struct ipw_rx_mem_buffer *rxb; | 4909 | struct ipw_rx_mem_buffer *rxb; |
4906 | struct ipw_rx_packet *pkt; | 4910 | struct ipw_rx_packet *pkt; |
4907 | struct ieee80211_hdr *header; | 4911 | struct ieee80211_hdr_4addr *header; |
4908 | u32 r, w, i; | 4912 | u32 r, w, i; |
4909 | u8 network_packet; | 4913 | u8 network_packet; |
4910 | 4914 | ||
@@ -4967,8 +4971,9 @@ static void ipw_rx(struct ipw_priv *priv) | |||
4967 | #endif | 4971 | #endif |
4968 | 4972 | ||
4969 | header = | 4973 | header = |
4970 | (struct ieee80211_hdr *)(rxb->skb->data + | 4974 | (struct ieee80211_hdr_4addr *)(rxb->skb-> |
4971 | IPW_RX_FRAME_SIZE); | 4975 | data + |
4976 | IPW_RX_FRAME_SIZE); | ||
4972 | /* TODO: Check Ad-Hoc dest/source and make sure | 4977 | /* TODO: Check Ad-Hoc dest/source and make sure |
4973 | * that we are actually parsing these packets | 4978 | * that we are actually parsing these packets |
4974 | * correctly -- we should probably use the | 4979 | * correctly -- we should probably use the |
@@ -5317,8 +5322,6 @@ static int ipw_wx_set_freq(struct net_device *dev, | |||
5317 | 5322 | ||
5318 | IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m); | 5323 | IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m); |
5319 | return ipw_set_channel(priv, (u8) fwrq->m); | 5324 | return ipw_set_channel(priv, (u8) fwrq->m); |
5320 | |||
5321 | return 0; | ||
5322 | } | 5325 | } |
5323 | 5326 | ||
5324 | static int ipw_wx_get_freq(struct net_device *dev, | 5327 | static int ipw_wx_get_freq(struct net_device *dev, |
@@ -6010,12 +6013,12 @@ static int ipw_wx_set_wireless_mode(struct net_device *dev, | |||
6010 | } | 6013 | } |
6011 | 6014 | ||
6012 | if (priv->adapter == IPW_2915ABG) { | 6015 | if (priv->adapter == IPW_2915ABG) { |
6013 | priv->ieee->abg_ture = 1; | 6016 | priv->ieee->abg_true = 1; |
6014 | if (mode & IEEE_A) { | 6017 | if (mode & IEEE_A) { |
6015 | band |= IEEE80211_52GHZ_BAND; | 6018 | band |= IEEE80211_52GHZ_BAND; |
6016 | modulation |= IEEE80211_OFDM_MODULATION; | 6019 | modulation |= IEEE80211_OFDM_MODULATION; |
6017 | } else | 6020 | } else |
6018 | priv->ieee->abg_ture = 0; | 6021 | priv->ieee->abg_true = 0; |
6019 | } else { | 6022 | } else { |
6020 | if (mode & IEEE_A) { | 6023 | if (mode & IEEE_A) { |
6021 | IPW_WARNING("Attempt to set 2200BG into " | 6024 | IPW_WARNING("Attempt to set 2200BG into " |
@@ -6023,20 +6026,20 @@ static int ipw_wx_set_wireless_mode(struct net_device *dev, | |||
6023 | return -EINVAL; | 6026 | return -EINVAL; |
6024 | } | 6027 | } |
6025 | 6028 | ||
6026 | priv->ieee->abg_ture = 0; | 6029 | priv->ieee->abg_true = 0; |
6027 | } | 6030 | } |
6028 | 6031 | ||
6029 | if (mode & IEEE_B) { | 6032 | if (mode & IEEE_B) { |
6030 | band |= IEEE80211_24GHZ_BAND; | 6033 | band |= IEEE80211_24GHZ_BAND; |
6031 | modulation |= IEEE80211_CCK_MODULATION; | 6034 | modulation |= IEEE80211_CCK_MODULATION; |
6032 | } else | 6035 | } else |
6033 | priv->ieee->abg_ture = 0; | 6036 | priv->ieee->abg_true = 0; |
6034 | 6037 | ||
6035 | if (mode & IEEE_G) { | 6038 | if (mode & IEEE_G) { |
6036 | band |= IEEE80211_24GHZ_BAND; | 6039 | band |= IEEE80211_24GHZ_BAND; |
6037 | modulation |= IEEE80211_OFDM_MODULATION; | 6040 | modulation |= IEEE80211_OFDM_MODULATION; |
6038 | } else | 6041 | } else |
6039 | priv->ieee->abg_ture = 0; | 6042 | priv->ieee->abg_true = 0; |
6040 | 6043 | ||
6041 | priv->ieee->mode = mode; | 6044 | priv->ieee->mode = mode; |
6042 | priv->ieee->freq_band = band; | 6045 | priv->ieee->freq_band = band; |
@@ -6325,7 +6328,7 @@ we need to heavily modify the ieee80211_skb_to_txb. | |||
6325 | 6328 | ||
6326 | static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) | 6329 | static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) |
6327 | { | 6330 | { |
6328 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) | 6331 | struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *) |
6329 | txb->fragments[0]->data; | 6332 | txb->fragments[0]->data; |
6330 | int i = 0; | 6333 | int i = 0; |
6331 | struct tfd_frame *tfd; | 6334 | struct tfd_frame *tfd; |
@@ -6448,7 +6451,7 @@ static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) | |||
6448 | } | 6451 | } |
6449 | 6452 | ||
6450 | static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, | 6453 | static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, |
6451 | struct net_device *dev) | 6454 | struct net_device *dev, int pri) |
6452 | { | 6455 | { |
6453 | struct ipw_priv *priv = ieee80211_priv(dev); | 6456 | struct ipw_priv *priv = ieee80211_priv(dev); |
6454 | unsigned long flags; | 6457 | unsigned long flags; |
@@ -7108,7 +7111,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
7108 | printk(KERN_INFO DRV_NAME | 7111 | printk(KERN_INFO DRV_NAME |
7109 | ": Detected Intel PRO/Wireless 2915ABG Network " | 7112 | ": Detected Intel PRO/Wireless 2915ABG Network " |
7110 | "Connection\n"); | 7113 | "Connection\n"); |
7111 | priv->ieee->abg_ture = 1; | 7114 | priv->ieee->abg_true = 1; |
7112 | band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND; | 7115 | band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND; |
7113 | modulation = IEEE80211_OFDM_MODULATION | | 7116 | modulation = IEEE80211_OFDM_MODULATION | |
7114 | IEEE80211_CCK_MODULATION; | 7117 | IEEE80211_CCK_MODULATION; |
@@ -7124,7 +7127,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
7124 | ": Detected Intel PRO/Wireless 2200BG Network " | 7127 | ": Detected Intel PRO/Wireless 2200BG Network " |
7125 | "Connection\n"); | 7128 | "Connection\n"); |
7126 | 7129 | ||
7127 | priv->ieee->abg_ture = 0; | 7130 | priv->ieee->abg_true = 0; |
7128 | band = IEEE80211_24GHZ_BAND; | 7131 | band = IEEE80211_24GHZ_BAND; |
7129 | modulation = IEEE80211_OFDM_MODULATION | | 7132 | modulation = IEEE80211_OFDM_MODULATION | |
7130 | IEEE80211_CCK_MODULATION; | 7133 | IEEE80211_CCK_MODULATION; |