~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/vt6655/device_main.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
/* IP_byte_align[] is used for IP header unsigned long byte aligned
138
138
   0: indicate the IP header won't be unsigned long byte aligned.(Default) .
139
139
   1: indicate the IP header will be unsigned long byte aligned.
140
 
      In some enviroment, the IP header should be unsigned long byte aligned,
 
140
      In some environment, the IP header should be unsigned long byte aligned,
141
141
      or the packet will be droped when we receive it. (eg: IPVS)
142
142
*/
143
143
DEVICE_PARAM(IP_byte_align,"Enable IP header dword aligned");
312
312
static int viawget_suspend(struct pci_dev *pcid, pm_message_t state);
313
313
static int viawget_resume(struct pci_dev *pcid);
314
314
struct notifier_block device_notifier = {
315
 
        notifier_call:  device_notify_reboot,
316
 
        next:           NULL,
317
 
        priority:       0
 
315
        .notifier_call = device_notify_reboot,
 
316
        .next = NULL,
 
317
        .priority = 0,
318
318
};
319
319
#endif
320
320
 
900
900
                if(ii>20)
901
901
                  break;
902
902
              }
903
 
           };
 
903
           }
904
904
    return true;
905
905
}
906
906
 
1446
1446
        if (!device_alloc_frag_buf(pDevice, pDeF)) {
1447
1447
            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n",
1448
1448
                pDevice->dev->name);
1449
 
        };
 
1449
        }
1450
1450
    }
1451
1451
    pDevice->cbDFCB = CB_MAX_RX_FRAG;
1452
1452
    pDevice->cbFreeDFCB = pDevice->cbDFCB;
2104
2104
        dev_kfree_skb_irq(skb);
2105
2105
        spin_unlock_irq(&pDevice->lock);
2106
2106
        return 0;
2107
 
    };
 
2107
    }
2108
2108
 
2109
2109
    cbMPDULen = skb->len;
2110
2110
    pbMPDU = skb->data;
2136
2136
    if (pDevice->bStopTx0Pkt == true) {
2137
2137
        dev_kfree_skb_irq(skb);
2138
2138
        return false;
2139
 
    };
 
2139
    }
2140
2140
 
2141
2141
    if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) {
2142
2142
        dev_kfree_skb_irq(skb);
2865
2865
            pDevice->bBeaconSent = false;
2866
2866
            if (pDevice->bEnablePSMode) {
2867
2867
                PSbIsNextTBTTWakeUp((void *)pDevice);
2868
 
            };
 
2868
            }
2869
2869
 
2870
2870
            if ((pDevice->eOPMode == OP_MODE_AP) ||
2871
2871
                (pDevice->eOPMode == OP_MODE_ADHOC)) {
2876
2876
 
2877
2877
            if (pDevice->eOPMode == OP_MODE_ADHOC && pDevice->pMgmt->wCurrATIMWindow > 0) {
2878
2878
                // todo adhoc PS mode
2879
 
            };
 
2879
            }
2880
2880
 
2881
2881
        }
2882
2882
 
2885
2885
            if (pDevice->eOPMode == OP_MODE_ADHOC) {
2886
2886
                pDevice->bIsBeaconBufReadySet = false;
2887
2887
                pDevice->cbBeaconBufReadySetCnt = 0;
2888
 
            };
 
2888
            }
2889
2889
 
2890
2890
            if (pDevice->eOPMode == OP_MODE_AP) {
2891
2891
                if(pMgmt->byDTIMCount > 0) {
3032
3032
 
3033
3033
buffer = kmalloc(1024, GFP_KERNEL);
3034
3034
if(buffer==NULL) {
3035
 
  printk("alllocate mem for file fail?\n");
 
3035
  printk("allocate mem for file fail?\n");
3036
3036
  result = -1;
3037
3037
  goto error1;
3038
3038
}
3064
3064
}
3065
3065
 
3066
3066
error1:
3067
 
  if(buffer)
3068
 
         kfree(buffer);
 
3067
  kfree(buffer);
3069
3068
 
3070
3069
  if(filp_close(filp,NULL))
3071
3070
       printk("Config_FileOperation:close file fail\n");
3606
3605
MODULE_DEVICE_TABLE(pci, vt6655_pci_id_table);
3607
3606
 
3608
3607
static struct pci_driver device_driver = {
3609
 
        name:       DEVICE_NAME,
3610
 
        id_table:   vt6655_pci_id_table,
3611
 
        probe:      vt6655_probe,
3612
 
        remove:     vt6655_remove,
 
3608
        .name = DEVICE_NAME,
 
3609
        .id_table = vt6655_pci_id_table,
 
3610
        .probe = vt6655_probe,
 
3611
        .remove = vt6655_remove,
3613
3612
#ifdef CONFIG_PM
3614
 
        suspend:    viawget_suspend,
3615
 
        resume:     viawget_resume,
 
3613
        .suspend = viawget_suspend,
 
3614
        .resume = viawget_resume,
3616
3615
#endif
3617
3616
};
3618
3617