mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
staging: wlan-ng: remove unnecessary spaces before casts
Fixed a coding style issue by removing unnecessary spaces before casts. Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d30924a032
commit
0e21fa4602
7 changed files with 53 additions and 53 deletions
|
@ -256,7 +256,7 @@ Information RID Lengths: MAC Information
|
||||||
include the len or code fields)
|
include the len or code fields)
|
||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
|
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
|
||||||
((u16) sizeof(hfa384x_dbmcommsquality_t))
|
((u16)sizeof(hfa384x_dbmcommsquality_t))
|
||||||
#define HFA384x_RID_JOINREQUEST_LEN \
|
#define HFA384x_RID_JOINREQUEST_LEN \
|
||||||
((u16)sizeof(hfa384x_JoinRequest_data_t))
|
((u16)sizeof(hfa384x_JoinRequest_data_t))
|
||||||
|
|
||||||
|
@ -1380,7 +1380,7 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
|
||||||
|
|
||||||
result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
|
result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
*((u16 *) val) = le16_to_cpu(*((u16 *) val));
|
*((u16 *)val) = le16_to_cpu(*((u16 *)val));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev, struct sk_buff *s
|
||||||
{
|
{
|
||||||
struct p80211_hdr_a3 *hdr;
|
struct p80211_hdr_a3 *hdr;
|
||||||
|
|
||||||
hdr = (struct p80211_hdr_a3 *) skb->data;
|
hdr = (struct p80211_hdr_a3 *)skb->data;
|
||||||
if (p80211_rx_typedrop(wlandev, hdr->fc))
|
if (p80211_rx_typedrop(wlandev, hdr->fc))
|
||||||
return CONV_TO_ETHER_SKIPPED;
|
return CONV_TO_ETHER_SKIPPED;
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev, struct sk_buff *s
|
||||||
*/
|
*/
|
||||||
static void p80211netdev_rx_bh(unsigned long arg)
|
static void p80211netdev_rx_bh(unsigned long arg)
|
||||||
{
|
{
|
||||||
struct wlandevice *wlandev = (struct wlandevice *) arg;
|
struct wlandevice *wlandev = (struct wlandevice *)arg;
|
||||||
struct sk_buff *skb = NULL;
|
struct sk_buff *skb = NULL;
|
||||||
netdevice_t *dev = wlandev->netdev;
|
netdevice_t *dev = wlandev->netdev;
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ static int p80211netdev_ethtool(struct wlandevice *wlandev, void __user *useradd
|
||||||
static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
struct p80211ioctl_req *req = (struct p80211ioctl_req *) ifr;
|
struct p80211ioctl_req *req = (struct p80211ioctl_req *)ifr;
|
||||||
struct wlandevice *wlandev = dev->ml_priv;
|
struct wlandevice *wlandev = dev->ml_priv;
|
||||||
u8 *msgbuf;
|
u8 *msgbuf;
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
|
||||||
|
|
||||||
/* Set up some convenience pointers. */
|
/* Set up some convenience pointers. */
|
||||||
mibattr = &dot11req.mibattribute;
|
mibattr = &dot11req.mibattribute;
|
||||||
macaddr = (p80211item_pstr6_t *) &mibattr->data;
|
macaddr = (p80211item_pstr6_t *)&mibattr->data;
|
||||||
resultcode = &dot11req.resultcode;
|
resultcode = &dot11req.resultcode;
|
||||||
|
|
||||||
/* Set up a dot11req_mibset */
|
/* Set up a dot11req_mibset */
|
||||||
|
@ -633,7 +633,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
|
||||||
dot11req.msgcode = DIDmsg_dot11req_mibset;
|
dot11req.msgcode = DIDmsg_dot11req_mibset;
|
||||||
dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
|
dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
|
||||||
memcpy(dot11req.devname,
|
memcpy(dot11req.devname,
|
||||||
((struct wlandevice *) dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
|
((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
|
||||||
|
|
||||||
/* Set up the mibattribute argument */
|
/* Set up the mibattribute argument */
|
||||||
mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
|
mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
|
||||||
|
@ -653,7 +653,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
|
||||||
resultcode->data = 0;
|
resultcode->data = 0;
|
||||||
|
|
||||||
/* now fire the request */
|
/* now fire the request */
|
||||||
result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
|
result = p80211req_dorequest(dev->ml_priv, (u8 *)&dot11req);
|
||||||
|
|
||||||
/* If the request wasn't successful, report an error and don't
|
/* If the request wasn't successful, report an error and don't
|
||||||
* change the netdev address
|
* change the netdev address
|
||||||
|
|
|
@ -110,7 +110,7 @@ static void p80211req_handle_action(struct wlandevice *wlandev, u32 *data,
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
|
int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
|
||||||
{
|
{
|
||||||
struct p80211msg *msg = (struct p80211msg *) msgbuf;
|
struct p80211msg *msg = (struct p80211msg *)msgbuf;
|
||||||
|
|
||||||
/* Check to make sure the MSD is running */
|
/* Check to make sure the MSD is running */
|
||||||
if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
|
if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
|
||||||
|
@ -170,7 +170,7 @@ static void p80211req_handlemsg(struct wlandevice *wlandev, struct p80211msg *ms
|
||||||
|
|
||||||
case DIDmsg_lnxreq_hostwep:{
|
case DIDmsg_lnxreq_hostwep:{
|
||||||
struct p80211msg_lnxreq_hostwep *req =
|
struct p80211msg_lnxreq_hostwep *req =
|
||||||
(struct p80211msg_lnxreq_hostwep *) msg;
|
(struct p80211msg_lnxreq_hostwep *)msg;
|
||||||
wlandev->hostwep &=
|
wlandev->hostwep &=
|
||||||
~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
|
~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
|
||||||
if (req->decrypt.data == P80211ENUM_truth_true)
|
if (req->decrypt.data == P80211ENUM_truth_true)
|
||||||
|
@ -184,7 +184,7 @@ static void p80211req_handlemsg(struct wlandevice *wlandev, struct p80211msg *ms
|
||||||
case DIDmsg_dot11req_mibset:{
|
case DIDmsg_dot11req_mibset:{
|
||||||
int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
|
int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
|
||||||
struct p80211msg_dot11req_mibget *mib_msg =
|
struct p80211msg_dot11req_mibget *mib_msg =
|
||||||
(struct p80211msg_dot11req_mibget *) msg;
|
(struct p80211msg_dot11req_mibget *)msg;
|
||||||
p80211req_mibset_mibget(wlandev, mib_msg, isget);
|
p80211req_mibset_mibget(wlandev, mib_msg, isget);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -195,8 +195,8 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
|
||||||
struct p80211msg_dot11req_mibget *mib_msg,
|
struct p80211msg_dot11req_mibget *mib_msg,
|
||||||
int isget)
|
int isget)
|
||||||
{
|
{
|
||||||
p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data;
|
p80211itemd_t *mibitem = (p80211itemd_t *)mib_msg->mibattribute.data;
|
||||||
p80211pstrd_t *pstr = (p80211pstrd_t *) mibitem->data;
|
p80211pstrd_t *pstr = (p80211pstrd_t *)mibitem->data;
|
||||||
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
|
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
|
||||||
|
|
||||||
switch (mibitem->did) {
|
switch (mibitem->did) {
|
||||||
|
@ -211,7 +211,7 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID:{
|
case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID:{
|
||||||
u32 *data = (u32 *) mibitem->data;
|
u32 *data = (u32 *)mibitem->data;
|
||||||
|
|
||||||
if (isget) {
|
if (isget) {
|
||||||
*data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK;
|
*data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK;
|
||||||
|
@ -222,14 +222,14 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked:{
|
case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked:{
|
||||||
u32 *data = (u32 *) mibitem->data;
|
u32 *data = (u32 *)mibitem->data;
|
||||||
|
|
||||||
p80211req_handle_action(wlandev, data, isget,
|
p80211req_handle_action(wlandev, data, isget,
|
||||||
HOSTWEP_PRIVACYINVOKED);
|
HOSTWEP_PRIVACYINVOKED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted:{
|
case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted:{
|
||||||
u32 *data = (u32 *) mibitem->data;
|
u32 *data = (u32 *)mibitem->data;
|
||||||
|
|
||||||
p80211req_handle_action(wlandev, data, isget,
|
p80211req_handle_action(wlandev, data, isget,
|
||||||
HOSTWEP_EXCLUDEUNENCRYPTED);
|
HOSTWEP_EXCLUDEUNENCRYPTED);
|
||||||
|
|
|
@ -266,7 +266,7 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr,
|
||||||
|
|
||||||
/* clear the pda and add an initial END record */
|
/* clear the pda and add an initial END record */
|
||||||
memset(&pda, 0, sizeof(pda));
|
memset(&pda, 0, sizeof(pda));
|
||||||
pda.rec[0] = (hfa384x_pdrec_t *) pda.buf;
|
pda.rec[0] = (hfa384x_pdrec_t *)pda.buf;
|
||||||
pda.rec[0]->len = cpu_to_le16(2); /* len in words */
|
pda.rec[0]->len = cpu_to_le16(2); /* len in words */
|
||||||
pda.rec[0]->code = cpu_to_le16(HFA384x_PDR_END_OF_PDA);
|
pda.rec[0]->code = cpu_to_le16(HFA384x_PDR_END_OF_PDA);
|
||||||
pda.nrec = 1;
|
pda.nrec = 1;
|
||||||
|
@ -293,11 +293,11 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr,
|
||||||
getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode;
|
getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode;
|
||||||
getmsg.resultcode.status = P80211ENUM_msgitem_status_no_value;
|
getmsg.resultcode.status = P80211ENUM_msgitem_status_no_value;
|
||||||
|
|
||||||
item = (p80211itemd_t *) getmsg.mibattribute.data;
|
item = (p80211itemd_t *)getmsg.mibattribute.data;
|
||||||
item->did = DIDmib_p2_p2NIC_p2PRISupRange;
|
item->did = DIDmib_p2_p2NIC_p2PRISupRange;
|
||||||
item->status = P80211ENUM_msgitem_status_no_value;
|
item->status = P80211ENUM_msgitem_status_no_value;
|
||||||
|
|
||||||
data = (u32 *) item->data;
|
data = (u32 *)item->data;
|
||||||
|
|
||||||
/* DIDmsg_dot11req_mibget */
|
/* DIDmsg_dot11req_mibget */
|
||||||
prism2mgmt_mibset_mibget(wlandev, &getmsg);
|
prism2mgmt_mibset_mibget(wlandev, &getmsg);
|
||||||
|
@ -592,14 +592,14 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt)
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
static int mkpdrlist(struct pda *pda)
|
static int mkpdrlist(struct pda *pda)
|
||||||
{
|
{
|
||||||
u16 *pda16 = (u16 *) pda->buf;
|
u16 *pda16 = (u16 *)pda->buf;
|
||||||
int curroff; /* in 'words' */
|
int curroff; /* in 'words' */
|
||||||
|
|
||||||
pda->nrec = 0;
|
pda->nrec = 0;
|
||||||
curroff = 0;
|
curroff = 0;
|
||||||
while (curroff < (HFA384x_PDA_LEN_MAX / 2 - 1) &&
|
while (curroff < (HFA384x_PDA_LEN_MAX / 2 - 1) &&
|
||||||
le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
|
le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
|
||||||
pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
|
pda->rec[pda->nrec] = (hfa384x_pdrec_t *)&(pda16[curroff]);
|
||||||
|
|
||||||
if (le16_to_cpu(pda->rec[pda->nrec]->code) ==
|
if (le16_to_cpu(pda->rec[pda->nrec]->code) ==
|
||||||
HFA384x_PDR_NICID) {
|
HFA384x_PDR_NICID) {
|
||||||
|
@ -638,7 +638,7 @@ static int mkpdrlist(struct pda *pda)
|
||||||
curroff, pda->nrec);
|
curroff, pda->nrec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
|
pda->rec[pda->nrec] = (hfa384x_pdrec_t *)&(pda16[curroff]);
|
||||||
(pda->nrec)++;
|
(pda->nrec)++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -879,8 +879,8 @@ static int read_fwfile(const struct ihex_binrec *record)
|
||||||
addr = be32_to_cpu(record->addr);
|
addr = be32_to_cpu(record->addr);
|
||||||
|
|
||||||
/* Point into data for different word lengths */
|
/* Point into data for different word lengths */
|
||||||
ptr32 = (u32 *) record->data;
|
ptr32 = (u32 *)record->data;
|
||||||
ptr16 = (u16 *) record->data;
|
ptr16 = (u16 *)record->data;
|
||||||
|
|
||||||
/* parse what was an S3 srec and put it in the right array */
|
/* parse what was an S3 srec and put it in the right array */
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
|
@ -954,7 +954,7 @@ static int read_fwfile(const struct ihex_binrec *record)
|
||||||
default: /* Data record */
|
default: /* Data record */
|
||||||
s3data[ns3data].addr = addr;
|
s3data[ns3data].addr = addr;
|
||||||
s3data[ns3data].len = len;
|
s3data[ns3data].len = len;
|
||||||
s3data[ns3data].data = (uint8_t *) record->data;
|
s3data[ns3data].data = (uint8_t *)record->data;
|
||||||
ns3data++;
|
ns3data++;
|
||||||
if (ns3data == S3DATA_MAX) {
|
if (ns3data == S3DATA_MAX) {
|
||||||
pr_err("S3 datarec limit reached - aborting\n");
|
pr_err("S3 datarec limit reached - aborting\n");
|
||||||
|
|
|
@ -533,7 +533,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp)
|
||||||
|
|
||||||
p80211pstrd_t *pstr;
|
p80211pstrd_t *pstr;
|
||||||
u8 bytebuf[80];
|
u8 bytebuf[80];
|
||||||
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
|
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
||||||
u16 word;
|
u16 word;
|
||||||
|
|
||||||
wlandev->macmode = WLAN_MACMODE_NONE;
|
wlandev->macmode = WLAN_MACMODE_NONE;
|
||||||
|
@ -558,7 +558,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp)
|
||||||
/*** STATION ***/
|
/*** STATION ***/
|
||||||
/* Set the REQUIRED config items */
|
/* Set the REQUIRED config items */
|
||||||
/* SSID */
|
/* SSID */
|
||||||
pstr = (p80211pstrd_t *) &(msg->ssid.data);
|
pstr = (p80211pstrd_t *)&(msg->ssid.data);
|
||||||
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
||||||
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
|
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
|
||||||
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
|
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
|
||||||
|
@ -1028,7 +1028,7 @@ int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp)
|
||||||
struct p80211msg_lnxreq_autojoin *msg = msgp;
|
struct p80211msg_lnxreq_autojoin *msg = msgp;
|
||||||
p80211pstrd_t *pstr;
|
p80211pstrd_t *pstr;
|
||||||
u8 bytebuf[256];
|
u8 bytebuf[256];
|
||||||
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
|
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
||||||
|
|
||||||
wlandev->macmode = WLAN_MACMODE_NONE;
|
wlandev->macmode = WLAN_MACMODE_NONE;
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp)
|
||||||
|
|
||||||
/* Set the ssid */
|
/* Set the ssid */
|
||||||
memset(bytebuf, 0, 256);
|
memset(bytebuf, 0, 256);
|
||||||
pstr = (p80211pstrd_t *) &(msg->ssid.data);
|
pstr = (p80211pstrd_t *)&(msg->ssid.data);
|
||||||
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
||||||
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
|
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
|
||||||
bytebuf,
|
bytebuf,
|
||||||
|
|
|
@ -284,7 +284,7 @@ int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp)
|
||||||
** MIB table.
|
** MIB table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mibitem = (p80211itemd_t *) msg->mibattribute.data;
|
mibitem = (p80211itemd_t *)msg->mibattribute.data;
|
||||||
|
|
||||||
for (mib = mibtab; mib->did != 0; mib++)
|
for (mib = mibtab; mib->did != 0; mib++)
|
||||||
if (mib->did == mibitem->did && (mib->flag & which))
|
if (mib->did == mibitem->did && (mib->flag & which))
|
||||||
|
@ -430,7 +430,7 @@ static int prism2mib_uint32(struct mibrec *mib,
|
||||||
int result;
|
int result;
|
||||||
u32 *uint32 = data;
|
u32 *uint32 = data;
|
||||||
u8 bytebuf[MIB_TMP_MAXLEN];
|
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||||
u16 *wordbuf = (u16 *) bytebuf;
|
u16 *wordbuf = (u16 *)bytebuf;
|
||||||
|
|
||||||
if (isget) {
|
if (isget) {
|
||||||
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
||||||
|
@ -477,7 +477,7 @@ static int prism2mib_flag(struct mibrec *mib,
|
||||||
int result;
|
int result;
|
||||||
u32 *uint32 = data;
|
u32 *uint32 = data;
|
||||||
u8 bytebuf[MIB_TMP_MAXLEN];
|
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||||
u16 *wordbuf = (u16 *) bytebuf;
|
u16 *wordbuf = (u16 *)bytebuf;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
|
|
||||||
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
||||||
|
@ -714,7 +714,7 @@ static int prism2mib_priv(struct mibrec *mib,
|
||||||
if (isget) {
|
if (isget) {
|
||||||
hfa384x_drvr_getconfig(hw,
|
hfa384x_drvr_getconfig(hw,
|
||||||
HFA384x_RID_CNFWPADATA,
|
HFA384x_RID_CNFWPADATA,
|
||||||
(u8 *) &wpa,
|
(u8 *)&wpa,
|
||||||
sizeof(wpa));
|
sizeof(wpa));
|
||||||
pstr->len = le16_to_cpu(wpa.datalen);
|
pstr->len = le16_to_cpu(wpa.datalen);
|
||||||
memcpy(pstr->data, wpa.data, pstr->len);
|
memcpy(pstr->data, wpa.data, pstr->len);
|
||||||
|
@ -724,7 +724,7 @@ static int prism2mib_priv(struct mibrec *mib,
|
||||||
|
|
||||||
hfa384x_drvr_setconfig(hw,
|
hfa384x_drvr_setconfig(hw,
|
||||||
HFA384x_RID_CNFWPADATA,
|
HFA384x_RID_CNFWPADATA,
|
||||||
(u8 *) &wpa,
|
(u8 *)&wpa,
|
||||||
sizeof(wpa));
|
sizeof(wpa));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -754,7 +754,7 @@ static int prism2mib_priv(struct mibrec *mib,
|
||||||
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr)
|
p80211pstrd_t *pstr)
|
||||||
{
|
{
|
||||||
bytestr->len = cpu_to_le16((u16) (pstr->len));
|
bytestr->len = cpu_to_le16((u16)(pstr->len));
|
||||||
memcpy(bytestr->data, pstr->data, pstr->len);
|
memcpy(bytestr->data, pstr->data, pstr->len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,7 +776,7 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
||||||
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr)
|
p80211pstrd_t *pstr)
|
||||||
{
|
{
|
||||||
pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len)));
|
pstr->len = (u8)(le16_to_cpu((u16)(bytestr->len)));
|
||||||
memcpy(pstr->data, bytestr->data, pstr->len);
|
memcpy(pstr->data, bytestr->data, pstr->len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,6 +797,6 @@ void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
||||||
|
|
||||||
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
|
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
|
||||||
{
|
{
|
||||||
pstr->len = (u8) len;
|
pstr->len = (u8)len;
|
||||||
memcpy(pstr->data, bytearea, len);
|
memcpy(pstr->data, bytearea, len);
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, struct p80211msg *m
|
||||||
struct p80211msg_lnxreq_ifstate *ifstatemsg;
|
struct p80211msg_lnxreq_ifstate *ifstatemsg;
|
||||||
|
|
||||||
pr_debug("Received mlme ifstate request\n");
|
pr_debug("Received mlme ifstate request\n");
|
||||||
ifstatemsg = (struct p80211msg_lnxreq_ifstate *) msg;
|
ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg;
|
||||||
result =
|
result =
|
||||||
prism2sta_ifstate(wlandev,
|
prism2sta_ifstate(wlandev,
|
||||||
ifstatemsg->ifstate.data);
|
ifstatemsg->ifstate.data);
|
||||||
|
@ -360,7 +360,7 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, struct p80211msg *m
|
||||||
|
|
||||||
pr_debug("Received commsquality request\n");
|
pr_debug("Received commsquality request\n");
|
||||||
|
|
||||||
qualmsg = (struct p80211msg_lnxreq_commsquality *) msg;
|
qualmsg = (struct p80211msg_lnxreq_commsquality *)msg;
|
||||||
|
|
||||||
qualmsg->link.status =
|
qualmsg->link.status =
|
||||||
P80211ENUM_msgitem_status_data_ok;
|
P80211ENUM_msgitem_status_data_ok;
|
||||||
|
@ -651,7 +651,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
|
||||||
|
|
||||||
/* strip out the 'special' variant bits */
|
/* strip out the 'special' variant bits */
|
||||||
hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15));
|
hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15));
|
||||||
hw->ident_sta_fw.variant &= ~((u16) (BIT(14) | BIT(15)));
|
hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15)));
|
||||||
|
|
||||||
if (hw->ident_sta_fw.id == 0x1f) {
|
if (hw->ident_sta_fw.id == 0x1f) {
|
||||||
netdev_info(wlandev->netdev,
|
netdev_info(wlandev->netdev,
|
||||||
|
@ -999,13 +999,13 @@ static void prism2sta_inf_tallies(struct wlandevice *wlandev,
|
||||||
|
|
||||||
cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
|
cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
|
||||||
if (inf->framelen > 22) {
|
if (inf->framelen > 22) {
|
||||||
dst = (u32 *) &hw->tallies;
|
dst = (u32 *)&hw->tallies;
|
||||||
src32 = (u32 *) &inf->info.commtallies32;
|
src32 = (u32 *)&inf->info.commtallies32;
|
||||||
for (i = 0; i < cnt; i++, dst++, src32++)
|
for (i = 0; i < cnt; i++, dst++, src32++)
|
||||||
*dst += le32_to_cpu(*src32);
|
*dst += le32_to_cpu(*src32);
|
||||||
} else {
|
} else {
|
||||||
dst = (u32 *) &hw->tallies;
|
dst = (u32 *)&hw->tallies;
|
||||||
src16 = (u16 *) &inf->info.commtallies16;
|
src16 = (u16 *)&inf->info.commtallies16;
|
||||||
for (i = 0; i < cnt; i++, dst++, src16++)
|
for (i = 0; i < cnt; i++, dst++, src16++)
|
||||||
*dst += le16_to_cpu(*src16);
|
*dst += le16_to_cpu(*src16);
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1180,7 @@ void prism2sta_processing_defer(struct work_struct *data)
|
||||||
hfa384x_InfFrame_t *inf;
|
hfa384x_InfFrame_t *inf;
|
||||||
|
|
||||||
while ((skb = skb_dequeue(&hw->authq))) {
|
while ((skb = skb_dequeue(&hw->authq))) {
|
||||||
inf = (hfa384x_InfFrame_t *) skb->data;
|
inf = (hfa384x_InfFrame_t *)skb->data;
|
||||||
prism2sta_inf_authreq_defer(wlandev, inf);
|
prism2sta_inf_authreq_defer(wlandev, inf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1255,8 +1255,8 @@ void prism2sta_processing_defer(struct work_struct *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr(
|
prism2mgmt_bytestr2pstr(
|
||||||
(struct hfa384x_bytestr *) &ssid,
|
(struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *) &wlandev->ssid);
|
(p80211pstrd_t *)&wlandev->ssid);
|
||||||
|
|
||||||
/* Collect the port status */
|
/* Collect the port status */
|
||||||
result = hfa384x_drvr_getconfig16(hw,
|
result = hfa384x_drvr_getconfig16(hw,
|
||||||
|
@ -1336,8 +1336,8 @@ void prism2sta_processing_defer(struct work_struct *data)
|
||||||
HFA384x_RID_CURRENTSSID, result);
|
HFA384x_RID_CURRENTSSID, result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
|
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *) &wlandev->ssid);
|
(p80211pstrd_t *)&wlandev->ssid);
|
||||||
|
|
||||||
hw->link_status = HFA384x_LINK_CONNECTED;
|
hw->link_status = HFA384x_LINK_CONNECTED;
|
||||||
netif_carrier_on(wlandev->netdev);
|
netif_carrier_on(wlandev->netdev);
|
||||||
|
@ -1949,7 +1949,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
||||||
/* Get the signal rate */
|
/* Get the signal rate */
|
||||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||||
mibitem->did = DIDmib_p2_p2MAC_p2CurrentTxRate;
|
mibitem->did = DIDmib_p2_p2MAC_p2CurrentTxRate;
|
||||||
result = p80211req_dorequest(wlandev, (u8 *) &msg);
|
result = p80211req_dorequest(wlandev, (u8 *)&msg);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
pr_debug("get signal rate failed, result = %d\n",
|
pr_debug("get signal rate failed, result = %d\n",
|
||||||
|
@ -1992,8 +1992,8 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
||||||
HFA384x_RID_CURRENTSSID, result);
|
HFA384x_RID_CURRENTSSID, result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
|
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *) &wlandev->ssid);
|
(p80211pstrd_t *)&wlandev->ssid);
|
||||||
|
|
||||||
/* Reschedule timer */
|
/* Reschedule timer */
|
||||||
mod_timer(&hw->commsqual_timer, jiffies + HZ);
|
mod_timer(&hw->commsqual_timer, jiffies + HZ);
|
||||||
|
@ -2001,7 +2001,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
||||||
|
|
||||||
void prism2sta_commsqual_timer(unsigned long data)
|
void prism2sta_commsqual_timer(unsigned long data)
|
||||||
{
|
{
|
||||||
hfa384x_t *hw = (hfa384x_t *) data;
|
hfa384x_t *hw = (hfa384x_t *)data;
|
||||||
|
|
||||||
schedule_work(&hw->commsqual_bh);
|
schedule_work(&hw->commsqual_bh);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue