Commit ecdd21c7 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: ft1000: Whitespace neatening

Use normal kernel style, indentation and alignment.

git diff -w shows no difference
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4884434c
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
History: History:
1/11/05 Whc Ported to Linux. 1/11/05 Whc Ported to Linux.
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
#ifndef _BOOTH_ #ifndef _BOOTH_
#define _BOOTH_ #define _BOOTH_
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
License along with this program; if not, write to the License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. Suite 330, Boston, MA 02111-1307, USA.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
Description: Common structures and defines Description: Common structures and defines
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
#ifndef _FT1000H_ #ifndef _FT1000H_
#define _FT1000H_ #define _FT1000H_
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
License along with this program; if not, write to the License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. Suite 330, Boston, MA 02111-1307, USA.
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -84,7 +84,7 @@ static int ft1000_confcheck(struct pcmcia_device *link, void *priv_data) ...@@ -84,7 +84,7 @@ static int ft1000_confcheck(struct pcmcia_device *link, void *priv_data)
is received, to configure the PCMCIA socket, and to make the is received, to configure the PCMCIA socket, and to make the
device available to the system. device available to the system.
======================================================================*/ ======================================================================*/
static int ft1000_config(struct pcmcia_device *link) static int ft1000_config(struct pcmcia_device *link)
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Description: This module will handshake with the DSP bootloader to Description: This module will handshake with the DSP bootloader to
download the DSP runtime image. download the DSP runtime image.
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
#define __KERNEL_SYSCALLS__ #define __KERNEL_SYSCALLS__
...@@ -114,7 +114,7 @@ struct dsp_image_info { ...@@ -114,7 +114,7 @@ struct dsp_image_info {
void card_bootload(struct net_device *dev) void card_bootload(struct net_device *dev)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
unsigned long flags; unsigned long flags;
u32 *pdata; u32 *pdata;
u32 size; u32 size;
...@@ -123,7 +123,7 @@ void card_bootload(struct net_device *dev) ...@@ -123,7 +123,7 @@ void card_bootload(struct net_device *dev)
netdev_dbg(dev, "card_bootload is called\n"); netdev_dbg(dev, "card_bootload is called\n");
pdata = (u32 *) bootimage; pdata = (u32 *)bootimage;
size = sizeof(bootimage); size = sizeof(bootimage);
/* check for odd word */ /* check for odd word */
...@@ -146,7 +146,7 @@ void card_bootload(struct net_device *dev) ...@@ -146,7 +146,7 @@ void card_bootload(struct net_device *dev)
u16 get_handshake(struct net_device *dev, u16 expected_value) u16 get_handshake(struct net_device *dev, u16 expected_value)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
u16 handshake; u16 handshake;
u32 tempx; u32 tempx;
int loopcnt; int loopcnt;
...@@ -162,7 +162,7 @@ u16 get_handshake(struct net_device *dev, u16 expected_value) ...@@ -162,7 +162,7 @@ u16 get_handshake(struct net_device *dev, u16 expected_value)
tempx = tempx =
ntohl(ft1000_read_dpram_mag_32 ntohl(ft1000_read_dpram_mag_32
(dev, DWNLD_MAG_HANDSHAKE_LOC)); (dev, DWNLD_MAG_HANDSHAKE_LOC));
handshake = (u16) tempx; handshake = (u16)tempx;
} }
if ((handshake == expected_value) if ((handshake == expected_value)
...@@ -180,7 +180,7 @@ u16 get_handshake(struct net_device *dev, u16 expected_value) ...@@ -180,7 +180,7 @@ u16 get_handshake(struct net_device *dev, u16 expected_value)
void put_handshake(struct net_device *dev, u16 handshake_value) void put_handshake(struct net_device *dev, u16 handshake_value)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
u32 tempx; u32 tempx;
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
...@@ -188,7 +188,7 @@ void put_handshake(struct net_device *dev, u16 handshake_value) ...@@ -188,7 +188,7 @@ void put_handshake(struct net_device *dev, u16 handshake_value)
DWNLD_HANDSHAKE_LOC); DWNLD_HANDSHAKE_LOC);
ft1000_write_reg(dev, FT1000_REG_DPRAM_DATA, handshake_value); /* Handshake */ ft1000_write_reg(dev, FT1000_REG_DPRAM_DATA, handshake_value); /* Handshake */
} else { } else {
tempx = (u32) handshake_value; tempx = (u32)handshake_value;
tempx = ntohl(tempx); tempx = ntohl(tempx);
ft1000_write_dpram_mag_32(dev, DWNLD_MAG_HANDSHAKE_LOC, tempx); /* Handshake */ ft1000_write_dpram_mag_32(dev, DWNLD_MAG_HANDSHAKE_LOC, tempx); /* Handshake */
} }
...@@ -196,7 +196,7 @@ void put_handshake(struct net_device *dev, u16 handshake_value) ...@@ -196,7 +196,7 @@ void put_handshake(struct net_device *dev, u16 handshake_value)
u16 get_request_type(struct net_device *dev) u16 get_request_type(struct net_device *dev)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
u16 request_type; u16 request_type;
u32 tempx; u32 tempx;
...@@ -206,7 +206,7 @@ u16 get_request_type(struct net_device *dev) ...@@ -206,7 +206,7 @@ u16 get_request_type(struct net_device *dev)
} else { } else {
tempx = ft1000_read_dpram_mag_32(dev, DWNLD_MAG_TYPE_LOC); tempx = ft1000_read_dpram_mag_32(dev, DWNLD_MAG_TYPE_LOC);
tempx = ntohl(tempx); tempx = ntohl(tempx);
request_type = (u16) tempx; request_type = (u16)tempx;
} }
return request_type; return request_type;
...@@ -215,7 +215,7 @@ u16 get_request_type(struct net_device *dev) ...@@ -215,7 +215,7 @@ u16 get_request_type(struct net_device *dev)
long get_request_value(struct net_device *dev) long get_request_value(struct net_device *dev)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
long value; long value;
u16 w_val; u16 w_val;
...@@ -244,7 +244,7 @@ long get_request_value(struct net_device *dev) ...@@ -244,7 +244,7 @@ long get_request_value(struct net_device *dev)
void put_request_value(struct net_device *dev, long lvalue) void put_request_value(struct net_device *dev, long lvalue)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
u16 size; u16 size;
u32 tempx; u32 tempx;
...@@ -271,7 +271,7 @@ void put_request_value(struct net_device *dev, long lvalue) ...@@ -271,7 +271,7 @@ void put_request_value(struct net_device *dev, long lvalue)
u16 hdr_checksum(struct pseudo_hdr *pHdr) u16 hdr_checksum(struct pseudo_hdr *pHdr)
{ {
u16 *usPtr = (u16 *) pHdr; u16 *usPtr = (u16 *)pHdr;
u16 chksum; u16 chksum;
chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^ chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
...@@ -283,7 +283,7 @@ u16 hdr_checksum(struct pseudo_hdr *pHdr) ...@@ -283,7 +283,7 @@ u16 hdr_checksum(struct pseudo_hdr *pHdr)
int card_download(struct net_device *dev, const u8 *pFileStart, int card_download(struct net_device *dev, const u8 *pFileStart,
size_t FileLength) size_t FileLength)
{ {
struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev); struct ft1000_info *info = (struct ft1000_info *)netdev_priv(dev);
int Status = SUCCESS; int Status = SUCCESS;
u32 uiState; u32 uiState;
u16 handshake; u16 handshake;
...@@ -322,7 +322,7 @@ int card_download(struct net_device *dev, const u8 *pFileStart, ...@@ -322,7 +322,7 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
uiState = STATE_START_DWNLD; uiState = STATE_START_DWNLD;
pFileHdr5 = (struct dsp_file_hdr *) pFileStart; pFileHdr5 = (struct dsp_file_hdr *)pFileStart;
pUsFile = (u16 *) ((long)pFileStart + pFileHdr5->loader_offset); pUsFile = (u16 *) ((long)pFileStart + pFileHdr5->loader_offset);
pUcFile = (u8 *) ((long)pFileStart + pFileHdr5->loader_offset); pUcFile = (u8 *) ((long)pFileStart + pFileHdr5->loader_offset);
...@@ -502,9 +502,9 @@ int card_download(struct net_device *dev, const u8 *pFileStart, ...@@ -502,9 +502,9 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
(long)(info->DSPInfoBlklen + 1) / 2; (long)(info->DSPInfoBlklen + 1) / 2;
put_request_value(dev, word_length); put_request_value(dev, word_length);
pMailBoxData = pMailBoxData =
(struct drv_msg *) &info->DSPInfoBlk[0]; (struct drv_msg *)&info->DSPInfoBlk[0];
pUsData = pUsData =
(u16 *) &pMailBoxData->data[0]; (u16 *)&pMailBoxData->data[0];
/* Provide mutual exclusive access while reading ASIC registers. */ /* Provide mutual exclusive access while reading ASIC registers. */
spin_lock_irqsave(&info->dpram_lock, spin_lock_irqsave(&info->dpram_lock,
flags); flags);
...@@ -674,13 +674,13 @@ int card_download(struct net_device *dev, const u8 *pFileStart, ...@@ -674,13 +674,13 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
break; break;
case STATE_DONE_DWNLD: case STATE_DONE_DWNLD:
if (((unsigned long) (pUcFile) - (unsigned long) pFileStart) >= if (((unsigned long)(pUcFile) - (unsigned long) pFileStart) >=
(unsigned long) FileLength) { (unsigned long)FileLength) {
uiState = STATE_DONE_FILE; uiState = STATE_DONE_FILE;
break; break;
} }
pHdr = (struct pseudo_hdr *) pUsFile; pHdr = (struct pseudo_hdr *)pUsFile;
if (pHdr->portdest == 0x80 /* DspOAM */ if (pHdr->portdest == 0x80 /* DspOAM */
&& (pHdr->portsrc == 0x00 /* Driver */ && (pHdr->portsrc == 0x00 /* Driver */
...@@ -700,7 +700,7 @@ int card_download(struct net_device *dev, const u8 *pFileStart, ...@@ -700,7 +700,7 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
case STATE_SECTION_PROV: case STATE_SECTION_PROV:
pHdr = (struct pseudo_hdr *) pUcFile; pHdr = (struct pseudo_hdr *)pUcFile;
if (pHdr->checksum == hdr_checksum(pHdr)) { if (pHdr->checksum == hdr_checksum(pHdr)) {
if (pHdr->portdest != 0x80 /* Dsp OAM */) { if (pHdr->portdest != 0x80 /* Dsp OAM */) {
...@@ -729,11 +729,11 @@ int card_download(struct net_device *dev, const u8 *pFileStart, ...@@ -729,11 +729,11 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
&info->prov_list); &info->prov_list);
/* Move to next entry if available */ /* Move to next entry if available */
pUcFile = pUcFile =
(u8 *) ((unsigned long) pUcFile + (u8 *)((unsigned long) pUcFile +
(unsigned long) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(struct pseudo_hdr)); (unsigned long) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(struct pseudo_hdr));
if ((unsigned long) (pUcFile) - if ((unsigned long) (pUcFile) -
(unsigned long) (pFileStart) >= (unsigned long) (pFileStart) >=
(unsigned long) FileLength) { (unsigned long)FileLength) {
uiState = uiState =
STATE_DONE_FILE; STATE_DONE_FILE;
} }
......
...@@ -72,7 +72,7 @@ static void ft1000_disable_interrupts(struct net_device *dev); ...@@ -72,7 +72,7 @@ static void ft1000_disable_interrupts(struct net_device *dev);
/* new kernel */ /* new kernel */
MODULE_AUTHOR(""); MODULE_AUTHOR("");
MODULE_DESCRIPTION MODULE_DESCRIPTION
("Support for Flarion Flash OFDM NIC Device. Support for PCMCIA when used with ft1000_cs."); ("Support for Flarion Flash OFDM NIC Device. Support for PCMCIA when used with ft1000_cs.");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_SUPPORTED_DEVICE("FT1000"); MODULE_SUPPORTED_DEVICE("FT1000");
...@@ -778,7 +778,7 @@ static void ft1000_hbchk(u_long data) ...@@ -778,7 +778,7 @@ static void ft1000_hbchk(u_long data)
/* Schedule this module to run every 2 seconds */ /* Schedule this module to run every 2 seconds */
poll_timer.expires = jiffies + (2 * HZ); poll_timer.expires = jiffies + (2 * HZ);
poll_timer.data = (u_long) dev; poll_timer.data = (u_long)dev;
add_timer(&poll_timer); add_timer(&poll_timer);
} }
...@@ -790,7 +790,7 @@ static void ft1000_hbchk(u_long data) ...@@ -790,7 +790,7 @@ static void ft1000_hbchk(u_long data)
Output: Output:
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
static void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qtype) static void ft1000_send_cmd(struct net_device *dev, u16 *ptempbuffer, int size, u16 qtype)
{ {
struct ft1000_info *info = netdev_priv(dev); struct ft1000_info *info = netdev_priv(dev);
int i; int i;
...@@ -888,7 +888,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer, ...@@ -888,7 +888,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer,
unsigned long flags; unsigned long flags;
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
size = ( ft1000_read_dpram(dev, *pnxtph) ) + sizeof(struct pseudo_hdr); size = (ft1000_read_dpram(dev, *pnxtph)) + sizeof(struct pseudo_hdr);
} else { } else {
size = size =
ntohs(ft1000_read_dpram_mag_16 ntohs(ft1000_read_dpram_mag_16
...@@ -901,7 +901,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer, ...@@ -901,7 +901,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer,
size); size);
return false; return false;
} else { } else {
ppseudohdr = (u16 *) pbuffer; ppseudohdr = (u16 *)pbuffer;
spin_lock_irqsave(&info->dpram_lock, flags); spin_lock_irqsave(&info->dpram_lock, flags);
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR, ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR,
...@@ -1001,7 +1001,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1001,7 +1001,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword)) { if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword)) {
/* Get the message type which is total_len + PSEUDO header + msgtype + message body */ /* Get the message type which is total_len + PSEUDO header + msgtype + message body */
pdrvmsg = (struct drv_msg *) & cmdbuffer[0]; pdrvmsg = (struct drv_msg *)&cmdbuffer[0];
msgtype = ntohs(pdrvmsg->type); msgtype = ntohs(pdrvmsg->type);
DEBUG(1, "Command message type = 0x%x\n", msgtype); DEBUG(1, "Command message type = 0x%x\n", msgtype);
switch (msgtype) { switch (msgtype) {
...@@ -1025,11 +1025,11 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1025,11 +1025,11 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
ptr = ptr =
list_entry(info->prov_list.next, list_entry(info->prov_list.next,
struct prov_record, list); struct prov_record, list);
len = *(u16 *) ptr->pprov_data; len = *(u16 *)ptr->pprov_data;
len = htons(len); len = htons(len);
pmsg = (u16 *) ptr->pprov_data; pmsg = (u16 *)ptr->pprov_data;
ppseudo_hdr = (struct pseudo_hdr *) pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
/* Insert slow queue sequence number */ /* Insert slow queue sequence number */
ppseudo_hdr->seq_num = info->squeseqnum++; ppseudo_hdr->seq_num = info->squeseqnum++;
ppseudo_hdr->portsrc = 0; ppseudo_hdr->portsrc = 0;
...@@ -1043,7 +1043,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1043,7 +1043,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
ppseudo_hdr->checksum); ppseudo_hdr->checksum);
} }
ft1000_send_cmd (dev, (u16 *)ptr->pprov_data, len, SLOWQ_TYPE); ft1000_send_cmd(dev, (u16 *)ptr->pprov_data, len, SLOWQ_TYPE);
list_del(&ptr->list); list_del(&ptr->list);
kfree(ptr->pprov_data); kfree(ptr->pprov_data);
kfree(ptr); kfree(ptr);
...@@ -1055,7 +1055,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1055,7 +1055,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
info->CardReady = 1; info->CardReady = 1;
break; break;
case MEDIA_STATE: case MEDIA_STATE:
pmediamsg = (struct media_msg *) & cmdbuffer[0]; pmediamsg = (struct media_msg *)&cmdbuffer[0];
if (info->ProgConStat != 0xFF) { if (info->ProgConStat != 0xFF) {
if (pmediamsg->state) { if (pmediamsg->state) {
DEBUG(1, "Media is up\n"); DEBUG(1, "Media is up\n");
...@@ -1087,7 +1087,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1087,7 +1087,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
} }
break; break;
case DSP_INIT_MSG: case DSP_INIT_MSG:
pdspinitmsg = (struct dsp_init_msg *) & cmdbuffer[0]; pdspinitmsg = (struct dsp_init_msg *)&cmdbuffer[0];
memcpy(info->DspVer, pdspinitmsg->DspVer, DSPVERSZ); memcpy(info->DspVer, pdspinitmsg->DspVer, DSPVERSZ);
DEBUG(1, "DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n", DEBUG(1, "DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n",
info->DspVer[0], info->DspVer[1], info->DspVer[2], info->DspVer[0], info->DspVer[1], info->DspVer[2],
...@@ -1115,13 +1115,13 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1115,13 +1115,13 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
info->RfCalVer[0], info->RfCalVer[1]); info->RfCalVer[0], info->RfCalVer[1]);
} }
break ; break;
case DSP_STORE_INFO: case DSP_STORE_INFO:
DEBUG(1, "FT1000:drivermsg:Got DSP_STORE_INFO\n"); DEBUG(1, "FT1000:drivermsg:Got DSP_STORE_INFO\n");
tempword = ntohs(pdrvmsg->length); tempword = ntohs(pdrvmsg->length);
info->DSPInfoBlklen = tempword; info->DSPInfoBlklen = tempword;
if (tempword < (MAX_DSP_SESS_REC - 4)) { if (tempword < (MAX_DSP_SESS_REC - 4)) {
pmsg = (u16 *) & pdrvmsg->data[0]; pmsg = (u16 *)&pdrvmsg->data[0];
for (i = 0; i < ((tempword + 1) / 2); i++) { for (i = 0; i < ((tempword + 1) / 2); i++) {
DEBUG(1, DEBUG(1,
"FT1000:drivermsg:dsp info data = 0x%x\n", "FT1000:drivermsg:dsp info data = 0x%x\n",
...@@ -1152,8 +1152,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1152,8 +1152,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
* Put message into Slow Queue * Put message into Slow Queue
* Form Pseudo header * Form Pseudo header
*/ */
pmsg = (u16 *) info->DSPInfoBlk; pmsg = (u16 *)info->DSPInfoBlk;
ppseudo_hdr = (struct pseudo_hdr *) pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
ppseudo_hdr->length = ppseudo_hdr->length =
htons(info->DSPInfoBlklen + 4); htons(info->DSPInfoBlklen + 4);
ppseudo_hdr->source = 0x10; ppseudo_hdr->source = 0x10;
...@@ -1177,7 +1177,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1177,7 +1177,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
info->DSPInfoBlk[8] = 0x7200; info->DSPInfoBlk[8] = 0x7200;
info->DSPInfoBlk[9] = info->DSPInfoBlk[9] =
htons(info->DSPInfoBlklen); htons(info->DSPInfoBlklen);
ft1000_send_cmd (dev, (u16 *)info->DSPInfoBlk, (u16)(info->DSPInfoBlklen+4), 0); ft1000_send_cmd(dev, (u16 *)info->DSPInfoBlk, (u16)(info->DSPInfoBlklen+4), 0);
} }
break; break;
...@@ -1203,8 +1203,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1203,8 +1203,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
* Put message into Slow Queue * Put message into Slow Queue
* Form Pseudo header * Form Pseudo header
*/ */
pmsg = (u16 *) & tempbuffer[0]; pmsg = (u16 *)&tempbuffer[0];
ppseudo_hdr = (struct pseudo_hdr *) pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
ppseudo_hdr->length = htons(0x0012); ppseudo_hdr->length = htons(0x0012);
ppseudo_hdr->source = 0x10; ppseudo_hdr->source = 0x10;
ppseudo_hdr->destination = 0x20; ppseudo_hdr->destination = 0x20;
...@@ -1221,10 +1221,10 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1221,10 +1221,10 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
ppseudo_hdr->portsrc = 0; ppseudo_hdr->portsrc = 0;
/* Calculate new checksum */ /* Calculate new checksum */
ppseudo_hdr->checksum = *pmsg++; ppseudo_hdr->checksum = *pmsg++;
for (i=1; i<7; i++) { for (i = 1; i < 7; i++) {
ppseudo_hdr->checksum ^= *pmsg++; ppseudo_hdr->checksum ^= *pmsg++;
} }
pmsg = (u16 *) &tempbuffer[16]; pmsg = (u16 *)&tempbuffer[16];
*pmsg++ = htons(RSP_DRV_ERR_RPT_MSG); *pmsg++ = htons(RSP_DRV_ERR_RPT_MSG);
*pmsg++ = htons(0x000e); *pmsg++ = htons(0x000e);
*pmsg++ = htons(info->DSP_TIME[0]); *pmsg++ = htons(info->DSP_TIME[0]);
...@@ -1239,7 +1239,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1239,7 +1239,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
*pmsg++ = convert.wrd; *pmsg++ = convert.wrd;
*pmsg++ = htons(info->DrvErrNum); *pmsg++ = htons(info->DrvErrNum);
ft1000_send_cmd (dev, (u16 *)&tempbuffer[0], (u16)(0x0012), 0); ft1000_send_cmd(dev, (u16 *)&tempbuffer[0], (u16)(0x0012), 0);
info->DrvErrNum = 0; info->DrvErrNum = 0;
} }
...@@ -1616,7 +1616,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev) ...@@ -1616,7 +1616,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
info->stats.rx_errors++; info->stats.rx_errors++;
return FAILURE; return FAILURE;
} }
pbuffer = (u8 *) skb_put(skb, len + 12); pbuffer = (u8 *)skb_put(skb, len + 12);
/* Pseudo header */ /* Pseudo header */
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
...@@ -1685,7 +1685,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev) ...@@ -1685,7 +1685,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
for (i = 0; i < len / 2; i++) { for (i = 0; i < len / 2; i++) {
tempword = ft1000_read_reg(dev, FT1000_REG_DFIFO); tempword = ft1000_read_reg(dev, FT1000_REG_DFIFO);
*pbuffer++ = (u8) (tempword >> 8); *pbuffer++ = (u8) (tempword >> 8);
*pbuffer++ = (u8) tempword; *pbuffer++ = (u8)tempword;
if (ft1000_chkcard(dev) == false) { if (ft1000_chkcard(dev) == false) {
kfree_skb(skb); kfree_skb(skb);
return FAILURE; return FAILURE;
...@@ -1698,7 +1698,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev) ...@@ -1698,7 +1698,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
*pbuffer++ = (u8) (tempword >> 8); *pbuffer++ = (u8) (tempword >> 8);
} }
} else { } else {
ptemplong = (u32 *) pbuffer; ptemplong = (u32 *)pbuffer;
for (i = 0; i < len / 4; i++) { for (i = 0; i < len / 4; i++) {
templong = inl(dev->base_addr + FT1000_REG_MAG_DFR); templong = inl(dev->base_addr + FT1000_REG_MAG_DFR);
DEBUG(1, "Data = 0x%8x\n", templong); DEBUG(1, "Data = 0x%8x\n", templong);
...@@ -1878,24 +1878,24 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len) ...@@ -1878,24 +1878,24 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len)
i + 8, htons(*packet)); i + 8, htons(*packet));
} }
} else { } else {
outl(*(u32 *) & pseudo.buff[0], outl(*(u32 *)&pseudo.buff[0],
dev->base_addr + FT1000_REG_MAG_UFDR); dev->base_addr + FT1000_REG_MAG_UFDR);
DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n", DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n",
*(u32 *) & pseudo.buff[0]); *(u32 *)&pseudo.buff[0]);
outl(*(u32 *) & pseudo.buff[2], outl(*(u32 *)&pseudo.buff[2],
dev->base_addr + FT1000_REG_MAG_UFDR); dev->base_addr + FT1000_REG_MAG_UFDR);
DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n", DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n",
*(u32 *) & pseudo.buff[2]); *(u32 *)&pseudo.buff[2]);
outl(*(u32 *) & pseudo.buff[4], outl(*(u32 *)&pseudo.buff[4],
dev->base_addr + FT1000_REG_MAG_UFDR); dev->base_addr + FT1000_REG_MAG_UFDR);
DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n", DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n",
*(u32 *) & pseudo.buff[4]); *(u32 *)&pseudo.buff[4]);
outl(*(u32 *) & pseudo.buff[6], outl(*(u32 *)&pseudo.buff[6],
dev->base_addr + FT1000_REG_MAG_UFDR); dev->base_addr + FT1000_REG_MAG_UFDR);
DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n", DEBUG(1, "ft1000_copy_down_pkt: Pseudo = 0x%8x\n",
*(u32 *) & pseudo.buff[6]); *(u32 *)&pseudo.buff[6]);
plong = (u32 *) packet; plong = (u32 *)packet;
/* Write PPP type + IP Packet into Downlink FIFO */ /* Write PPP type + IP Packet into Downlink FIFO */
for (i = 0; i < (len >> 2); i++) { for (i = 0; i < (len >> 2); i++) {
outl(*plong++, dev->base_addr + FT1000_REG_MAG_UFDR); outl(*plong++, dev->base_addr + FT1000_REG_MAG_UFDR);
...@@ -1935,7 +1935,7 @@ static int ft1000_open(struct net_device *dev) ...@@ -1935,7 +1935,7 @@ static int ft1000_open(struct net_device *dev)
/* schedule ft1000_hbchk to perform periodic heartbeat checks on DSP and ASIC */ /* schedule ft1000_hbchk to perform periodic heartbeat checks on DSP and ASIC */
init_timer(&poll_timer); init_timer(&poll_timer);
poll_timer.expires = jiffies + (2 * HZ); poll_timer.expires = jiffies + (2 * HZ);
poll_timer.data = (u_long) dev; poll_timer.data = (u_long)dev;
add_timer(&poll_timer); add_timer(&poll_timer);
DEBUG(0, "ft1000_hw: ft1000_open is ended2\n"); DEBUG(0, "ft1000_hw: ft1000_open is ended2\n");
...@@ -1978,7 +1978,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1978,7 +1978,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
DEBUG(1, "ft1000_hw: ft1000_start_xmit:length of packet = %d\n", DEBUG(1, "ft1000_hw: ft1000_start_xmit:length of packet = %d\n",
skb->len); skb->len);
pdata = (u8 *) skb->data; pdata = (u8 *)skb->data;
if (info->mediastate == 0) { if (info->mediastate == 0) {
/* Drop packet is mediastate is down */ /* Drop packet is mediastate is down */
...@@ -2060,7 +2060,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id) ...@@ -2060,7 +2060,7 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
ft1000_write_reg(dev, FT1000_REG_SUP_ISR, tempword); ft1000_write_reg(dev, FT1000_REG_SUP_ISR, tempword);
/* Read interrupt type */ /* Read interrupt type */
inttype = ft1000_read_reg (dev, FT1000_REG_SUP_ISR); inttype = ft1000_read_reg(dev, FT1000_REG_SUP_ISR);
DEBUG(1, "ft1000_hw: interrupt status register after clear = 0x%x\n", inttype); DEBUG(1, "ft1000_hw: interrupt status register after clear = 0x%x\n", inttype);
} }
ft1000_enable_interrupts(dev); ft1000_enable_interrupts(dev);
...@@ -2168,8 +2168,8 @@ struct net_device *init_ft1000_card(struct pcmcia_device *link, ...@@ -2168,8 +2168,8 @@ struct net_device *init_ft1000_card(struct pcmcia_device *link,
memset(info, 0, sizeof(struct ft1000_info)); memset(info, 0, sizeof(struct ft1000_info));
DEBUG(1, "address of dev = 0x%8x\n", (u32) dev); DEBUG(1, "address of dev = 0x%8x\n", (u32)dev);
DEBUG(1, "address of dev info = 0x%8x\n", (u32) info); DEBUG(1, "address of dev info = 0x%8x\n", (u32)info);
DEBUG(0, "device name = %s\n", dev->name); DEBUG(0, "device name = %s\n", dev->name);
memset(&info->stats, 0, sizeof(struct net_device_stats)); memset(&info->stats, 0, sizeof(struct net_device_stats));
......
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* FT1000 driver for Flarion Flash OFDM NIC Device * FT1000 driver for Flarion Flash OFDM NIC Device
* *
* Copyright (C) 2006 Flarion Technologies, All rights reserved. * Copyright (C) 2006 Flarion Technologies, All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free * under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option) any * Software Foundation; either version 2 of the License, or (at your option) any
* later version. This program is distributed in the hope that it will be useful, * later version. This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details. You should have received a copy of the GNU General Public * more details. You should have received a copy of the GNU General Public
* License along with this program; if not, write to the * License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - * Free Software Foundation, Inc., 59 Temple Place -
* Suite 330, Boston, MA 02111-1307, USA. * Suite 330, Boston, MA 02111-1307, USA.
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* *
* File: ft1000_chdev.c * File: ft1000_chdev.c
* *
* Description: Custom character device dispatch routines. * Description: Custom character device dispatch routines.
* *
* History: * History:
* 8/29/02 Whc Ported to Linux. * 8/29/02 Whc Ported to Linux.
* 6/05/06 Whc Porting to Linux 2.6.9 * 6/05/06 Whc Porting to Linux 2.6.9
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -55,8 +55,8 @@ spinlock_t free_buff_lock; ...@@ -55,8 +55,8 @@ spinlock_t free_buff_lock;
int numofmsgbuf = 0; int numofmsgbuf = 0;
/* /*
* Table of entry-point routines for char device * Table of entry-point routines for char device
*/ */
static const struct file_operations ft1000fops = { static const struct file_operations ft1000fops = {
.unlocked_ioctl = ft1000_ioctl, .unlocked_ioctl = ft1000_ioctl,
.poll = ft1000_poll_dev, .poll = ft1000_poll_dev,
...@@ -66,19 +66,19 @@ static const struct file_operations ft1000fops = { ...@@ -66,19 +66,19 @@ static const struct file_operations ft1000fops = {
}; };
/* /*
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
* Function: ft1000_get_buffer * Function: ft1000_get_buffer
* *
* Parameters: * Parameters:
* *
* Returns: * Returns:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist) struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist)
{ {
unsigned long flags; unsigned long flags;
...@@ -104,19 +104,19 @@ struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist) ...@@ -104,19 +104,19 @@ struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist)
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_free_buffer * Function: ft1000_free_buffer
* *
* Parameters: * Parameters:
* *
* Returns: * Returns:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist) void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist)
{ {
unsigned long flags; unsigned long flags;
...@@ -130,19 +130,19 @@ void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist) ...@@ -130,19 +130,19 @@ void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist)
} }
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_CreateDevice * Function: ft1000_CreateDevice
* *
* Parameters: dev - pointer to adapter object * Parameters: dev - pointer to adapter object
* *
* Returns: 0 if successful * Returns: 0 if successful
* *
* Description: Creates a private char device. * Description: Creates a private char device.
* *
* Notes: Only called by init_module(). * Notes: Only called by init_module().
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
int ft1000_create_dev(struct ft1000_usb *dev) int ft1000_create_dev(struct ft1000_usb *dev)
{ {
int result; int result;
...@@ -193,7 +193,7 @@ int ft1000_create_dev(struct ft1000_usb *dev) ...@@ -193,7 +193,7 @@ int ft1000_create_dev(struct ft1000_usb *dev)
/* initialize application information */ /* initialize application information */
dev->appcnt = 0; dev->appcnt = 0;
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
dev->app_info[i].nTxMsg = 0; dev->app_info[i].nTxMsg = 0;
dev->app_info[i].nRxMsg = 0; dev->app_info[i].nRxMsg = 0;
dev->app_info[i].nTxMsgReject = 0; dev->app_info[i].nTxMsgReject = 0;
...@@ -220,17 +220,17 @@ int ft1000_create_dev(struct ft1000_usb *dev) ...@@ -220,17 +220,17 @@ int ft1000_create_dev(struct ft1000_usb *dev)
} }
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_DestroyDeviceDEBUG * Function: ft1000_DestroyDeviceDEBUG
* *
* Parameters: dev - pointer to adapter object * Parameters: dev - pointer to adapter object
* *
* Description: Destroys a private char device. * Description: Destroys a private char device.
* *
* Notes: Only called by cleanup_module(). * Notes: Only called by cleanup_module().
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
void ft1000_destroy_dev(struct net_device *netdev) void ft1000_destroy_dev(struct net_device *netdev)
{ {
struct ft1000_info *info = netdev_priv(netdev); struct ft1000_info *info = netdev_priv(netdev);
...@@ -260,7 +260,7 @@ void ft1000_destroy_dev(struct net_device *netdev) ...@@ -260,7 +260,7 @@ void ft1000_destroy_dev(struct net_device *netdev)
dev->DeviceName); dev->DeviceName);
/* Make sure we free any memory reserve for slow Queue */ /* Make sure we free any memory reserve for slow Queue */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
while (list_empty(&dev->app_info[i].app_sqlist) == 0) { while (list_empty(&dev->app_info[i].app_sqlist) == 0) {
pdpram_blk = list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list); pdpram_blk = list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list);
list_del(&pdpram_blk->list); list_del(&pdpram_blk->list);
...@@ -286,22 +286,22 @@ void ft1000_destroy_dev(struct net_device *netdev) ...@@ -286,22 +286,22 @@ void ft1000_destroy_dev(struct net_device *netdev)
} }
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_open * Function: ft1000_open
* *
* Parameters: * Parameters:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static int ft1000_open(struct inode *inode, struct file *file) static int ft1000_open(struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
int i,num; int i, num;
DEBUG("%s called\n", __func__); DEBUG("%s called\n", __func__);
num = (MINOR(inode->i_rdev) & 0xf); num = (MINOR(inode->i_rdev) & 0xf);
...@@ -318,7 +318,7 @@ static int ft1000_open(struct inode *inode, struct file *file) ...@@ -318,7 +318,7 @@ static int ft1000_open(struct inode *inode, struct file *file)
} }
/* Search for available application info block */ /* Search for available application info block */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if ((dev->app_info[i].fileobject == NULL)) { if ((dev->app_info[i].fileobject == NULL)) {
break; break;
} }
...@@ -343,17 +343,17 @@ static int ft1000_open(struct inode *inode, struct file *file) ...@@ -343,17 +343,17 @@ static int ft1000_open(struct inode *inode, struct file *file)
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_poll_dev * Function: ft1000_poll_dev
* *
* Parameters: * Parameters:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
{ {
...@@ -369,7 +369,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -369,7 +369,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
} }
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if (dev->app_info[i].fileobject == &file->f_owner) { if (dev->app_info[i].fileobject == &file->f_owner) {
/* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */ /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */
break; break;
...@@ -394,24 +394,24 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -394,24 +394,24 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
} }
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_ioctl * Function: ft1000_ioctl
* *
* Parameters: * Parameters:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static long ft1000_ioctl(struct file *file, unsigned int command, static long ft1000_ioctl(struct file *file, unsigned int command,
unsigned long argument) unsigned long argument)
{ {
void __user *argp = (void __user *)argument; void __user *argp = (void __user *)argument;
struct ft1000_info *info; struct ft1000_info *info;
struct ft1000_usb *ft1000dev; struct ft1000_usb *ft1000dev;
int result=0; int result = 0;
int cmd; int cmd;
int i; int i;
u16 tempword; u16 tempword;
...@@ -419,15 +419,15 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -419,15 +419,15 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
struct timeval tv; struct timeval tv;
struct IOCTL_GET_VER get_ver_data; struct IOCTL_GET_VER get_ver_data;
struct IOCTL_GET_DSP_STAT get_stat_data; struct IOCTL_GET_DSP_STAT get_stat_data;
u8 ConnectionMsg[] = {0x00,0x44,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x93,0x64, u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64,
0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00,
0x00,0x01,0x00,0x00}; 0x00, 0x01, 0x00, 0x00};
unsigned short ledStat=0; unsigned short ledStat = 0;
unsigned short conStat=0; unsigned short conStat = 0;
/* DEBUG("ft1000_ioctl called\n"); */ /* DEBUG("ft1000_ioctl called\n"); */
...@@ -447,14 +447,14 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -447,14 +447,14 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
switch (cmd) { switch (cmd) {
case IOCTL_REGISTER_CMD: case IOCTL_REGISTER_CMD:
DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_REGISTER called\n"); DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_REGISTER called\n");
result = get_user(tempword, (__u16 __user*)argp); result = get_user(tempword, (__u16 __user *)argp);
if (result) { if (result) {
DEBUG("result = %d failed to get_user\n", result); DEBUG("result = %d failed to get_user\n", result);
break; break;
} }
if (tempword == DSPBCMSGID) { if (tempword == DSPBCMSGID) {
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if (ft1000dev->app_info[i].fileobject == &file->f_owner) { if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
ft1000dev->app_info[i].DspBCMsgFlag = 1; ft1000dev->app_info[i].DspBCMsgFlag = 1;
DEBUG("FT1000:ft1000_ioctl:Registered for broadcast messages\n"); DEBUG("FT1000:ft1000_ioctl:Registered for broadcast messages\n");
...@@ -475,7 +475,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -475,7 +475,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
break; break;
} }
DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n",(unsigned int)get_ver_data.drv_ver); DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n", (unsigned int)get_ver_data.drv_ver);
break; break;
case IOCTL_CONNECT: case IOCTL_CONNECT:
...@@ -578,12 +578,12 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -578,12 +578,12 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
result = -EFAULT; result = -EFAULT;
} else { } else {
/* Check if this message came from a registered application */ /* Check if this message came from a registered application */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if (ft1000dev->app_info[i].fileobject == &file->f_owner) { if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
break; break;
} }
} }
if (i==MAX_NUM_APP) { if (i == MAX_NUM_APP) {
DEBUG("FT1000:No matching application fileobject\n"); DEBUG("FT1000:No matching application fileobject\n");
result = -EINVAL; result = -EINVAL;
kfree(dpram_data); kfree(dpram_data);
...@@ -643,13 +643,13 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -643,13 +643,13 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
/* Calculate new checksum */ /* Calculate new checksum */
ppseudo_hdr->checksum = *pmsg++; ppseudo_hdr->checksum = *pmsg++;
/* DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum); */ /* DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum); */
for (i=1; i<7; i++) { for (i = 1; i < 7; i++) {
ppseudo_hdr->checksum ^= *pmsg++; ppseudo_hdr->checksum ^= *pmsg++;
/* DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum); */ /* DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum); */
} }
pmsg++; pmsg++;
ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
result = card_send_command(ft1000dev,(unsigned short*)dpram_data,total_len+2); result = card_send_command(ft1000dev, (unsigned short *)dpram_data, total_len+2);
ft1000dev->app_info[app_index].nTxMsg++; ft1000dev->app_info[app_index].nTxMsg++;
...@@ -678,7 +678,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -678,7 +678,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
return -EBADF; return -EBADF;
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if (ft1000dev->app_info[i].fileobject == &file->f_owner) { if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
/*DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */ /*DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */
break; break;
...@@ -708,7 +708,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -708,7 +708,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
break; break;
msglen = htons(msglen); msglen = htons(msglen);
/* DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen); */ /* DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen); */
if (copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) { if (copy_to_user(&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) {
DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
result = -EFAULT; result = -EFAULT;
break; break;
...@@ -731,17 +731,17 @@ static long ft1000_ioctl(struct file *file, unsigned int command, ...@@ -731,17 +731,17 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
} }
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* Function: ft1000_release * Function: ft1000_release
* *
* Parameters: * Parameters:
* *
* Description: * Description:
* *
* Notes: * Notes:
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static int ft1000_release(struct inode *inode, struct file *file) static int ft1000_release(struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
...@@ -762,14 +762,14 @@ static int ft1000_release(struct inode *inode, struct file *file) ...@@ -762,14 +762,14 @@ static int ft1000_release(struct inode *inode, struct file *file)
} }
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i = 0; i < MAX_NUM_APP; i++) {
if (ft1000dev->app_info[i].fileobject == &file->f_owner) { if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
/* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */ /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */
break; break;
} }
} }
if (i==MAX_NUM_APP) if (i == MAX_NUM_APP)
return 0; return 0;
while (list_empty(&ft1000dev->app_info[i].app_sqlist) == 0) { while (list_empty(&ft1000dev->app_info[i].app_sqlist) == 0) {
......
/* /*
* CopyRight (C) 2007 Qualcomm Inc. All Rights Reserved. * CopyRight (C) 2007 Qualcomm Inc. All Rights Reserved.
* *
* This file is part of Express Card USB Driver * This file is part of Express Card USB Driver
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -832,8 +832,8 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, ...@@ -832,8 +832,8 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
* Position ASIC DPRAM auto-increment pointer. * Position ASIC DPRAM auto-increment pointer.
*/ */
data = (u16 *) &mailbox_data->data[0]; data = (u16 *)&mailbox_data->data[0];
dpram = (u16) DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
...@@ -846,7 +846,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, ...@@ -846,7 +846,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
status = status =
fix_ft1000_write_dpram32 fix_ft1000_write_dpram32
(ft1000dev, dpram++, (ft1000dev, dpram++,
(u8 *) &templong); (u8 *)&templong);
} }
break; break;
...@@ -867,7 +867,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, ...@@ -867,7 +867,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
file_hdr-> file_hdr->
version_data_offset); version_data_offset);
dpram = (u16) DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
...@@ -881,7 +881,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, ...@@ -881,7 +881,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
status = status =
fix_ft1000_write_dpram32 fix_ft1000_write_dpram32
(ft1000dev, dpram++, (ft1000dev, dpram++,
(u8 *) &templong); (u8 *)&templong);
} }
break; break;
...@@ -929,7 +929,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, ...@@ -929,7 +929,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
dsp_img_info-> dsp_img_info->
image_size; image_size;
image_chksum = image_chksum =
(u32) dsp_img_info-> (u32)dsp_img_info->
checksum; checksum;
break; break;
} }
......
/* CopyRight (C) 2007 Qualcomm Inc. All Rights Reserved. /* CopyRight (C) 2007 Qualcomm Inc. All Rights Reserved.
* *
* *
* This file is part of Express Card USB Driver * This file is part of Express Card USB Driver
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -35,16 +35,16 @@ static u8 tempbuffer[1600]; ...@@ -35,16 +35,16 @@ static u8 tempbuffer[1600];
#define MAX_RCV_LOOP 100 #define MAX_RCV_LOOP 100
/* send a control message via USB interface synchronously /* send a control message via USB interface synchronously
* Parameters: ft1000_usb - device structure * Parameters: ft1000_usb - device structure
* pipe - usb control message pipe * pipe - usb control message pipe
* request - control request * request - control request
* requesttype - control message request type * requesttype - control message request type
* value - value to be written or 0 * value - value to be written or 0
* index - register index * index - register index
* data - data buffer to hold the read/write values * data - data buffer to hold the read/write values
* size - data size * size - data size
* timeout - control message time out value * timeout - control message time out value
*/ */
static int ft1000_control(struct ft1000_usb *ft1000dev, unsigned int pipe, static int ft1000_control(struct ft1000_usb *ft1000dev, unsigned int pipe,
u8 request, u8 requesttype, u16 value, u16 index, u8 request, u8 requesttype, u16 value, u16 index,
void *data, u16 size, int timeout) void *data, u16 size, int timeout)
...@@ -318,10 +318,10 @@ static void card_reset_dsp(struct ft1000_usb *ft1000dev, bool value) ...@@ -318,10 +318,10 @@ static void card_reset_dsp(struct ft1000_usb *ft1000dev, bool value)
} }
/* send a command to ASIC /* send a command to ASIC
* Parameters: ft1000_usb - device structure * Parameters: ft1000_usb - device structure
* ptempbuffer - command buffer * ptempbuffer - command buffer
* size - command buffer size * size - command buffer size
*/ */
int card_send_command(struct ft1000_usb *ft1000dev, void *ptempbuffer, int card_send_command(struct ft1000_usb *ft1000dev, void *ptempbuffer,
int size) int size)
{ {
...@@ -404,7 +404,7 @@ int dsp_reload(struct ft1000_usb *ft1000dev) ...@@ -404,7 +404,7 @@ int dsp_reload(struct ft1000_usb *ft1000dev)
/* Let's check for FEFE */ /* Let's check for FEFE */
status = status =
ft1000_read_dpram32(ft1000dev, FT1000_MAG_DPRAM_FEFE_INDX, ft1000_read_dpram32(ft1000dev, FT1000_MAG_DPRAM_FEFE_INDX,
(u8 *) &templong, 4); (u8 *)&templong, 4);
DEBUG("templong (fefe) = 0x%8x\n", templong); DEBUG("templong (fefe) = 0x%8x\n", templong);
/* call codeloader */ /* call codeloader */
...@@ -484,7 +484,7 @@ static int ft1000_reset_card(struct net_device *dev) ...@@ -484,7 +484,7 @@ static int ft1000_reset_card(struct net_device *dev)
/* Initialize DSP heartbeat area */ /* Initialize DSP heartbeat area */
ft1000_write_dpram16(ft1000dev, FT1000_MAG_HI_HO, ho_mag, ft1000_write_dpram16(ft1000dev, FT1000_MAG_HI_HO, ho_mag,
FT1000_MAG_HI_HO_INDX); FT1000_MAG_HI_HO_INDX);
ft1000_read_dpram16(ft1000dev, FT1000_MAG_HI_HO, (u8 *) &tempword, ft1000_read_dpram16(ft1000dev, FT1000_MAG_HI_HO, (u8 *)&tempword,
FT1000_MAG_HI_HO_INDX); FT1000_MAG_HI_HO_INDX);
DEBUG("ft1000_hw:ft1000_reset_card:hi_ho value = 0x%x\n", tempword); DEBUG("ft1000_hw:ft1000_reset_card:hi_ho value = 0x%x\n", tempword);
...@@ -508,8 +508,8 @@ static void ft1000_usb_transmit_complete(struct urb *urb) ...@@ -508,8 +508,8 @@ static void ft1000_usb_transmit_complete(struct urb *urb)
} }
/* take an ethernet packet and convert it to a Flarion /* take an ethernet packet and convert it to a Flarion
* packet prior to sending it to the ASIC Downlink FIFO. * packet prior to sending it to the ASIC Downlink FIFO.
*/ */
static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len) static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len)
{ {
struct ft1000_info *pInfo = netdev_priv(netdev); struct ft1000_info *pInfo = netdev_priv(netdev);
...@@ -559,7 +559,7 @@ static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len) ...@@ -559,7 +559,7 @@ static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len)
pFt1000Dev->tx_buf, count, pFt1000Dev->tx_buf, count,
ft1000_usb_transmit_complete, (void *)pFt1000Dev); ft1000_usb_transmit_complete, (void *)pFt1000Dev);
t = (u8 *) pFt1000Dev->tx_urb->transfer_buffer; t = (u8 *)pFt1000Dev->tx_urb->transfer_buffer;
ret = usb_submit_urb(pFt1000Dev->tx_urb, GFP_ATOMIC); ret = usb_submit_urb(pFt1000Dev->tx_urb, GFP_ATOMIC);
...@@ -574,9 +574,9 @@ static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len) ...@@ -574,9 +574,9 @@ static int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len)
} }
/* transmit an ethernet packet /* transmit an ethernet packet
* Parameters: skb - socket buffer to be sent * Parameters: skb - socket buffer to be sent
* dev - network device * dev - network device
*/ */
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev) static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct ft1000_info *pInfo = netdev_priv(dev); struct ft1000_info *pInfo = netdev_priv(dev);
...@@ -598,7 +598,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -598,7 +598,7 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
usb_sndbulkpipe(pFt1000Dev->dev, pFt1000Dev->bulk_out_endpointAddr); usb_sndbulkpipe(pFt1000Dev->dev, pFt1000Dev->bulk_out_endpointAddr);
maxlen = usb_maxpacket(pFt1000Dev->dev, pipe, usb_pipeout(pipe)); maxlen = usb_maxpacket(pFt1000Dev->dev, pipe, usb_pipeout(pipe));
pdata = (u8 *) skb->data; pdata = (u8 *)skb->data;
if (pInfo->mediastate == 0) { if (pInfo->mediastate == 0) {
/* Drop packet is mediastate is down */ /* Drop packet is mediastate is down */
...@@ -814,8 +814,8 @@ int reg_ft1000_netdev(struct ft1000_usb *ft1000dev, ...@@ -814,8 +814,8 @@ int reg_ft1000_netdev(struct ft1000_usb *ft1000dev,
} }
/* take a packet from the FIFO up link and /* take a packet from the FIFO up link and
* convert it into an ethernet packet and deliver it to the IP stack * convert it into an ethernet packet and deliver it to the IP stack
*/ */
static int ft1000_copy_up_pkt(struct urb *urb) static int ft1000_copy_up_pkt(struct urb *urb)
{ {
struct ft1000_info *info = urb->context; struct ft1000_info *info = urb->context;
...@@ -839,7 +839,7 @@ static int ft1000_copy_up_pkt(struct urb *urb) ...@@ -839,7 +839,7 @@ static int ft1000_copy_up_pkt(struct urb *urb)
len = urb->transfer_buffer_length; len = urb->transfer_buffer_length;
lena = urb->actual_length; lena = urb->actual_length;
chksum = (u16 *) ft1000dev->rx_buf; chksum = (u16 *)ft1000dev->rx_buf;
tempword = *chksum++; tempword = *chksum++;
for (i = 1; i < 7; i++) for (i = 1; i < 7; i++)
...@@ -860,7 +860,7 @@ static int ft1000_copy_up_pkt(struct urb *urb) ...@@ -860,7 +860,7 @@ static int ft1000_copy_up_pkt(struct urb *urb)
return -1; return -1;
} }
pbuffer = (u8 *) skb_put(skb, len + 12); pbuffer = (u8 *)skb_put(skb, len + 12);
/* subtract the number of bytes read already */ /* subtract the number of bytes read already */
ptemp = pbuffer; ptemp = pbuffer;
...@@ -914,7 +914,7 @@ static int ft1000_submit_rx_urb(struct ft1000_info *info) ...@@ -914,7 +914,7 @@ static int ft1000_submit_rx_urb(struct ft1000_info *info)
usb_rcvbulkpipe(pFt1000Dev->dev, usb_rcvbulkpipe(pFt1000Dev->dev,
pFt1000Dev->bulk_in_endpointAddr), pFt1000Dev->bulk_in_endpointAddr),
pFt1000Dev->rx_buf, MAX_BUF_SIZE, pFt1000Dev->rx_buf, MAX_BUF_SIZE,
(usb_complete_t) ft1000_copy_up_pkt, info); (usb_complete_t)ft1000_copy_up_pkt, info);
result = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC); result = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC);
...@@ -976,10 +976,10 @@ static int ft1000_chkcard(struct ft1000_usb *dev) ...@@ -976,10 +976,10 @@ static int ft1000_chkcard(struct ft1000_usb *dev)
} }
/* read a message from the dpram area. /* read a message from the dpram area.
* Input: * Input:
* dev - network device structure * dev - network device structure
* pbuffer - caller supply address to buffer * pbuffer - caller supply address to buffer
*/ */
static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer, static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer,
int maxsz) int maxsz)
{ {
...@@ -990,7 +990,7 @@ static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer, ...@@ -990,7 +990,7 @@ static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer,
u16 tempword; u16 tempword;
ret = ret =
ft1000_read_dpram16(dev, FT1000_MAG_PH_LEN, (u8 *) &size, ft1000_read_dpram16(dev, FT1000_MAG_PH_LEN, (u8 *)&size,
FT1000_MAG_PH_LEN_INDX); FT1000_MAG_PH_LEN_INDX);
size = ntohs(size) + PSEUDOSZ; size = ntohs(size) + PSEUDOSZ;
if (size > maxsz) { if (size > maxsz) {
...@@ -998,7 +998,7 @@ static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer, ...@@ -998,7 +998,7 @@ static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer,
size); size);
return FALSE; return FALSE;
} }
ppseudohdr = (u16 *) pbuffer; ppseudohdr = (u16 *)pbuffer;
ft1000_write_register(dev, FT1000_DPRAM_MAG_RX_BASE, ft1000_write_register(dev, FT1000_DPRAM_MAG_RX_BASE,
FT1000_REG_DPRAM_ADDR); FT1000_REG_DPRAM_ADDR);
ret = ret =
...@@ -1090,11 +1090,11 @@ static int ft1000_dsp_prov(void *arg) ...@@ -1090,11 +1090,11 @@ static int ft1000_dsp_prov(void *arg)
ptr = ptr =
list_entry(info->prov_list.next, struct prov_record, list_entry(info->prov_list.next, struct prov_record,
list); list);
len = *(u16 *) ptr->pprov_data; len = *(u16 *)ptr->pprov_data;
len = htons(len); len = htons(len);
len += PSEUDOSZ; len += PSEUDOSZ;
pmsg = (u16 *) ptr->pprov_data; pmsg = (u16 *)ptr->pprov_data;
ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
/* Insert slow queue sequence number */ /* Insert slow queue sequence number */
ppseudo_hdr->seq_num = info->squeseqnum++; ppseudo_hdr->seq_num = info->squeseqnum++;
...@@ -1110,7 +1110,7 @@ static int ft1000_dsp_prov(void *arg) ...@@ -1110,7 +1110,7 @@ static int ft1000_dsp_prov(void *arg)
status = status =
ft1000_write_dpram32(dev, 0, ft1000_write_dpram32(dev, 0,
(u8 *) &TempShortBuf[0], (u8 *)&TempShortBuf[0],
(unsigned short)(len + 2)); (unsigned short)(len + 2));
status = status =
ft1000_write_register(dev, FT1000_DB_DPRAM_TX, ft1000_write_register(dev, FT1000_DB_DPRAM_TX,
...@@ -1264,7 +1264,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size) ...@@ -1264,7 +1264,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
tempword = ntohs(pdrvmsg->length); tempword = ntohs(pdrvmsg->length);
info->DSPInfoBlklen = tempword; info->DSPInfoBlklen = tempword;
if (tempword < (MAX_DSP_SESS_REC - 4)) { if (tempword < (MAX_DSP_SESS_REC - 4)) {
pmsg = (u16 *) &pdrvmsg->data[0]; pmsg = (u16 *)&pdrvmsg->data[0];
for (i = 0; i < ((tempword + 1) / 2); i++) { for (i = 0; i < ((tempword + 1) / 2); i++) {
DEBUG("FT1000:drivermsg:dsp info data = 0x%x\n", *pmsg); DEBUG("FT1000:drivermsg:dsp info data = 0x%x\n", *pmsg);
info->DSPInfoBlk[i + 10] = *pmsg++; info->DSPInfoBlk[i + 10] = *pmsg++;
...@@ -1295,11 +1295,11 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size) ...@@ -1295,11 +1295,11 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
} }
} }
/* Put message into Slow Queue Form Pseudo header */ /* Put message into Slow Queue Form Pseudo header */
pmsg = (u16 *) info->DSPInfoBlk; pmsg = (u16 *)info->DSPInfoBlk;
*pmsg++ = 0; *pmsg++ = 0;
*pmsg++ = htons(info->DSPInfoBlklen + 20 + info->DSPInfoBlklen); *pmsg++ = htons(info->DSPInfoBlklen + 20 + info->DSPInfoBlklen);
ppseudo_hdr = ppseudo_hdr =
(struct pseudo_hdr *)(u16 *) &info->DSPInfoBlk[2]; (struct pseudo_hdr *)(u16 *)&info->DSPInfoBlk[2];
ppseudo_hdr->length = htons(info->DSPInfoBlklen + 4 ppseudo_hdr->length = htons(info->DSPInfoBlklen + 4
+ info->DSPInfoBlklen); + info->DSPInfoBlklen);
ppseudo_hdr->source = 0x10; ppseudo_hdr->source = 0x10;
...@@ -1347,7 +1347,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size) ...@@ -1347,7 +1347,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
} }
if ((tempword & FT1000_DB_DPRAM_TX) == 0) { if ((tempword & FT1000_DB_DPRAM_TX) == 0) {
/* Put message into Slow Queue Form Pseudo header */ /* Put message into Slow Queue Form Pseudo header */
pmsg = (u16 *) &tempbuffer[0]; pmsg = (u16 *)&tempbuffer[0];
ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
ppseudo_hdr->length = htons(0x0012); ppseudo_hdr->length = htons(0x0012);
ppseudo_hdr->source = 0x10; ppseudo_hdr->source = 0x10;
...@@ -1368,7 +1368,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size) ...@@ -1368,7 +1368,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
for (i = 1; i < 7; i++) for (i = 1; i < 7; i++)
ppseudo_hdr->checksum ^= *pmsg++; ppseudo_hdr->checksum ^= *pmsg++;
pmsg = (u16 *) &tempbuffer[16]; pmsg = (u16 *)&tempbuffer[16];
*pmsg++ = htons(RSP_DRV_ERR_RPT_MSG); *pmsg++ = htons(RSP_DRV_ERR_RPT_MSG);
*pmsg++ = htons(0x000e); *pmsg++ = htons(0x000e);
*pmsg++ = htons(info->DSP_TIME[0]); *pmsg++ = htons(info->DSP_TIME[0]);
......
/* /*
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* FT1000 driver for Flarion Flash OFDM NIC Device * FT1000 driver for Flarion Flash OFDM NIC Device
* *
* Copyright (C) 2002 Flarion Technologies, All rights reserved. * Copyright (C) 2002 Flarion Technologies, All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free * under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option) any * Software Foundation; either version 2 of the License, or (at your option) any
* later version. This program is distributed in the hope that it will be useful, * later version. This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details. You should have received a copy of the GNU General Public * more details. You should have received a copy of the GNU General Public
* License along with this program; if not, write to the * License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - * Free Software Foundation, Inc., 59 Temple Place -
* Suite 330, Boston, MA 02111-1307, USA. * Suite 330, Boston, MA 02111-1307, USA.
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
* *
* File: ft1000_ioctl.h * File: ft1000_ioctl.h
* *
* Description: Common structures and defines relating to IOCTL * Description: Common structures and defines relating to IOCTL
* *
* History: * History:
* 11/5/02 Whc Created. * 11/5/02 Whc Created.
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
#ifndef _FT1000IOCTLH_ #ifndef _FT1000IOCTLH_
#define _FT1000IOCTLH_ #define _FT1000IOCTLH_
...@@ -94,8 +94,8 @@ struct IOCTL_DPRAM_COMMAND { ...@@ -94,8 +94,8 @@ struct IOCTL_DPRAM_COMMAND {
} __packed; } __packed;
/* /*
* Custom IOCTL command codes * Custom IOCTL command codes
*/ */
#define FT1000_MAGIC_CODE 'F' #define FT1000_MAGIC_CODE 'F'
#define IOCTL_REGISTER_CMD 0 #define IOCTL_REGISTER_CMD 0
......
...@@ -218,7 +218,7 @@ static void ft1000_disconnect(struct usb_interface *interface) ...@@ -218,7 +218,7 @@ static void ft1000_disconnect(struct usb_interface *interface)
DEBUG("ft1000_disconnect is called\n"); DEBUG("ft1000_disconnect is called\n");
pft1000info = (struct ft1000_info *) usb_get_intfdata(interface); pft1000info = (struct ft1000_info *)usb_get_intfdata(interface);
DEBUG("In disconnect pft1000info=%p\n", pft1000info); DEBUG("In disconnect pft1000info=%p\n", pft1000info);
if (pft1000info) { if (pft1000info) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment