aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2200.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 5e7c7e944c9d..cdfe50207757 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -462,7 +462,7 @@ static inline void ipw_disable_interrupts(struct ipw_priv *priv)
462 ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL); 462 ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL);
463} 463}
464 464
465#ifdef CONFIG_IPW_DEBUG 465#ifdef CONFIG_IPW2200_DEBUG
466static char *ipw_error_desc(u32 val) 466static char *ipw_error_desc(u32 val)
467{ 467{
468 switch (val) { 468 switch (val) {
@@ -1235,7 +1235,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
1235 const char *buf, size_t count) 1235 const char *buf, size_t count)
1236{ 1236{
1237 struct ipw_priv *priv = dev_get_drvdata(d); 1237 struct ipw_priv *priv = dev_get_drvdata(d);
1238#ifdef CONFIG_IPW_DEBUG 1238#ifdef CONFIG_IPW2200_DEBUG
1239 struct net_device *dev = priv->net_dev; 1239 struct net_device *dev = priv->net_dev;
1240#endif 1240#endif
1241 char buffer[] = "00000000"; 1241 char buffer[] = "00000000";
@@ -1754,7 +1754,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
1754 IPW_ERROR("Firmware error detected. Restarting.\n"); 1754 IPW_ERROR("Firmware error detected. Restarting.\n");
1755 if (priv->error) { 1755 if (priv->error) {
1756 IPW_ERROR("Sysfs 'error' log already exists.\n"); 1756 IPW_ERROR("Sysfs 'error' log already exists.\n");
1757#ifdef CONFIG_IPW_DEBUG 1757#ifdef CONFIG_IPW2200_DEBUG
1758 if (ipw_debug_level & IPW_DL_FW_ERRORS) { 1758 if (ipw_debug_level & IPW_DL_FW_ERRORS) {
1759 struct ipw_fw_error *error = 1759 struct ipw_fw_error *error =
1760 ipw_alloc_error_log(priv); 1760 ipw_alloc_error_log(priv);
@@ -1770,7 +1770,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
1770 else 1770 else
1771 IPW_ERROR("Error allocating sysfs 'error' " 1771 IPW_ERROR("Error allocating sysfs 'error' "
1772 "log.\n"); 1772 "log.\n");
1773#ifdef CONFIG_IPW_DEBUG 1773#ifdef CONFIG_IPW2200_DEBUG
1774 if (ipw_debug_level & IPW_DL_FW_ERRORS) 1774 if (ipw_debug_level & IPW_DL_FW_ERRORS)
1775 ipw_dump_error_log(priv, priv->error); 1775 ipw_dump_error_log(priv, priv->error);
1776#endif 1776#endif
@@ -3778,7 +3778,7 @@ static const struct ipw_status_code ipw_status_codes[] = {
3778 {0x2E, "Cipher suite is rejected per security policy"}, 3778 {0x2E, "Cipher suite is rejected per security policy"},
3779}; 3779};
3780 3780
3781#ifdef CONFIG_IPW_DEBUG 3781#ifdef CONFIG_IPW2200_DEBUG
3782static const char *ipw_get_status_code(u16 status) 3782static const char *ipw_get_status_code(u16 status)
3783{ 3783{
3784 int i; 3784 int i;
@@ -4250,7 +4250,7 @@ static inline void ipw_rx_notification(struct ipw_priv *priv,
4250 if (priv-> 4250 if (priv->
4251 status & (STATUS_ASSOCIATED | 4251 status & (STATUS_ASSOCIATED |
4252 STATUS_AUTH)) { 4252 STATUS_AUTH)) {
4253#ifdef CONFIG_IPW_DEBUG 4253#ifdef CONFIG_IPW2200_DEBUG
4254 struct notif_authenticate *auth 4254 struct notif_authenticate *auth
4255 = &notif->u.auth; 4255 = &notif->u.auth;
4256 IPW_DEBUG(IPW_DL_NOTIF | 4256 IPW_DEBUG(IPW_DL_NOTIF |
@@ -4944,12 +4944,11 @@ static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv)
4944 struct ipw_rx_queue *rxq; 4944 struct ipw_rx_queue *rxq;
4945 int i; 4945 int i;
4946 4946
4947 rxq = (struct ipw_rx_queue *)kmalloc(sizeof(*rxq), GFP_KERNEL); 4947 rxq = kzalloc(sizeof(*rxq), GFP_KERNEL);
4948 if (unlikely(!rxq)) { 4948 if (unlikely(!rxq)) {
4949 IPW_ERROR("memory allocation failed\n"); 4949 IPW_ERROR("memory allocation failed\n");
4950 return NULL; 4950 return NULL;
4951 } 4951 }
4952 memset(rxq, 0, sizeof(*rxq));
4953 spin_lock_init(&rxq->lock); 4952 spin_lock_init(&rxq->lock);
4954 INIT_LIST_HEAD(&rxq->rx_free); 4953 INIT_LIST_HEAD(&rxq->rx_free);
4955 INIT_LIST_HEAD(&rxq->rx_used); 4954 INIT_LIST_HEAD(&rxq->rx_used);
@@ -5828,7 +5827,7 @@ static void ipw_bg_adhoc_check(void *data)
5828 up(&priv->sem); 5827 up(&priv->sem);
5829} 5828}
5830 5829
5831#ifdef CONFIG_IPW_DEBUG 5830#ifdef CONFIG_IPW2200_DEBUG
5832static void ipw_debug_config(struct ipw_priv *priv) 5831static void ipw_debug_config(struct ipw_priv *priv)
5833{ 5832{
5834 IPW_DEBUG_INFO("Scan completed, no valid APs matched " 5833 IPW_DEBUG_INFO("Scan completed, no valid APs matched "
@@ -7456,8 +7455,7 @@ static void ipw_handle_data_packet(struct ipw_priv *priv,
7456 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */ 7455 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */
7457 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data; 7456 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data;
7458 if (priv->ieee->iw_mode != IW_MODE_MONITOR && 7457 if (priv->ieee->iw_mode != IW_MODE_MONITOR &&
7459 ((is_multicast_ether_addr(hdr->addr1) || 7458 (is_multicast_ether_addr(hdr->addr1) ?
7460 is_broadcast_ether_addr(hdr->addr1)) ?
7461 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) 7459 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt))
7462 ipw_rebuild_decrypted_skb(priv, rxb->skb); 7460 ipw_rebuild_decrypted_skb(priv, rxb->skb);
7463 7461
@@ -7648,8 +7646,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7648 return 0; 7646 return 0;
7649 7647
7650 /* {broad,multi}cast packets to our BSSID go through */ 7648 /* {broad,multi}cast packets to our BSSID go through */
7651 if (is_multicast_ether_addr(header->addr1) || 7649 if (is_multicast_ether_addr(header->addr1))
7652 is_broadcast_ether_addr(header->addr1))
7653 return !memcmp(header->addr3, priv->bssid, ETH_ALEN); 7650 return !memcmp(header->addr3, priv->bssid, ETH_ALEN);
7654 7651
7655 /* packets to our adapter go through */ 7652 /* packets to our adapter go through */
@@ -7662,8 +7659,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7662 return 0; 7659 return 0;
7663 7660
7664 /* {broad,multi}cast packets to our BSS go through */ 7661 /* {broad,multi}cast packets to our BSS go through */
7665 if (is_multicast_ether_addr(header->addr1) || 7662 if (is_multicast_ether_addr(header->addr1))
7666 is_broadcast_ether_addr(header->addr1))
7667 return !memcmp(header->addr2, priv->bssid, ETH_ALEN); 7663 return !memcmp(header->addr2, priv->bssid, ETH_ALEN);
7668 7664
7669 /* packets to our adapter go through */ 7665 /* packets to our adapter go through */
@@ -7815,7 +7811,7 @@ static void ipw_rx(struct ipw_priv *priv)
7815 7811
7816 while (i != r) { 7812 while (i != r) {
7817 rxb = priv->rxq->queue[i]; 7813 rxb = priv->rxq->queue[i];
7818#ifdef CONFIG_IPW_DEBUG 7814#ifdef CONFIG_IPW2200_DEBUG
7819 if (unlikely(rxb == NULL)) { 7815 if (unlikely(rxb == NULL)) {
7820 printk(KERN_CRIT "Queue not allocated!\n"); 7816 printk(KERN_CRIT "Queue not allocated!\n");
7821 break; 7817 break;
@@ -9657,8 +9653,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9657 switch (priv->ieee->iw_mode) { 9653 switch (priv->ieee->iw_mode) {
9658 case IW_MODE_ADHOC: 9654 case IW_MODE_ADHOC:
9659 hdr_len = IEEE80211_3ADDR_LEN; 9655 hdr_len = IEEE80211_3ADDR_LEN;
9660 unicast = !(is_multicast_ether_addr(hdr->addr1) || 9656 unicast = !is_multicast_ether_addr(hdr->addr1);
9661 is_broadcast_ether_addr(hdr->addr1));
9662 id = ipw_find_station(priv, hdr->addr1); 9657 id = ipw_find_station(priv, hdr->addr1);
9663 if (id == IPW_INVALID_STATION) { 9658 if (id == IPW_INVALID_STATION) {
9664 id = ipw_add_station(priv, hdr->addr1); 9659 id = ipw_add_station(priv, hdr->addr1);
@@ -9673,8 +9668,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9673 9668
9674 case IW_MODE_INFRA: 9669 case IW_MODE_INFRA:
9675 default: 9670 default:
9676 unicast = !(is_multicast_ether_addr(hdr->addr3) || 9671 unicast = !is_multicast_ether_addr(hdr->addr3);
9677 is_broadcast_ether_addr(hdr->addr3));
9678 hdr_len = IEEE80211_3ADDR_LEN; 9672 hdr_len = IEEE80211_3ADDR_LEN;
9679 id = 0; 9673 id = 0;
9680 break; 9674 break;
@@ -10956,7 +10950,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
10956 10950
10957 priv->net_dev = net_dev; 10951 priv->net_dev = net_dev;
10958 priv->pci_dev = pdev; 10952 priv->pci_dev = pdev;
10959#ifdef CONFIG_IPW_DEBUG 10953#ifdef CONFIG_IPW2200_DEBUG
10960 ipw_debug_level = debug; 10954 ipw_debug_level = debug;
10961#endif 10955#endif
10962 spin_lock_init(&priv->lock); 10956 spin_lock_init(&priv->lock);