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>
include the len or code fields)
--------------------------------------------------------------------*/
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
- ((u16) sizeof(hfa384x_dbmcommsquality_t))
+ ((u16)sizeof(hfa384x_dbmcommsquality_t))
#define HFA384x_RID_JOINREQUEST_LEN \
((u16)sizeof(hfa384x_JoinRequest_data_t))
result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
if (result == 0)
- *((u16 *) val) = le16_to_cpu(*((u16 *) val));
+ *((u16 *)val) = le16_to_cpu(*((u16 *)val));
return result;
}
{
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))
return CONV_TO_ETHER_SKIPPED;
*/
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;
netdevice_t *dev = wlandev->netdev;
static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
{
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;
u8 *msgbuf;
/* Set up some convenience pointers. */
mibattr = &dot11req.mibattribute;
- macaddr = (p80211item_pstr6_t *) &mibattr->data;
+ macaddr = (p80211item_pstr6_t *)&mibattr->data;
resultcode = &dot11req.resultcode;
/* Set up a dot11req_mibset */
dot11req.msgcode = DIDmsg_dot11req_mibset;
dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
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 */
mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
resultcode->data = 0;
/* 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
* change the netdev address
----------------------------------------------------------------*/
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 */
if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
case DIDmsg_lnxreq_hostwep:{
struct p80211msg_lnxreq_hostwep *req =
- (struct p80211msg_lnxreq_hostwep *) msg;
+ (struct p80211msg_lnxreq_hostwep *)msg;
wlandev->hostwep &=
~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
if (req->decrypt.data == P80211ENUM_truth_true)
case DIDmsg_dot11req_mibset:{
int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
struct p80211msg_dot11req_mibget *mib_msg =
- (struct p80211msg_dot11req_mibget *) msg;
+ (struct p80211msg_dot11req_mibget *)msg;
p80211req_mibset_mibget(wlandev, mib_msg, isget);
break;
}
struct p80211msg_dot11req_mibget *mib_msg,
int isget)
{
- p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data;
- p80211pstrd_t *pstr = (p80211pstrd_t *) mibitem->data;
+ p80211itemd_t *mibitem = (p80211itemd_t *)mib_msg->mibattribute.data;
+ p80211pstrd_t *pstr = (p80211pstrd_t *)mibitem->data;
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
switch (mibitem->did) {
break;
case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
if (isget) {
*data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK;
break;
}
case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
p80211req_handle_action(wlandev, data, isget,
HOSTWEP_PRIVACYINVOKED);
break;
}
case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
p80211req_handle_action(wlandev, data, isget,
HOSTWEP_EXCLUDEUNENCRYPTED);
/* clear the pda and add an initial END record */
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]->code = cpu_to_le16(HFA384x_PDR_END_OF_PDA);
pda.nrec = 1;
getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode;
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->status = P80211ENUM_msgitem_status_no_value;
- data = (u32 *) item->data;
+ data = (u32 *)item->data;
/* DIDmsg_dot11req_mibget */
prism2mgmt_mibset_mibget(wlandev, &getmsg);
----------------------------------------------------------------*/
static int mkpdrlist(struct pda *pda)
{
- u16 *pda16 = (u16 *) pda->buf;
+ u16 *pda16 = (u16 *)pda->buf;
int curroff; /* in 'words' */
pda->nrec = 0;
curroff = 0;
while (curroff < (HFA384x_PDA_LEN_MAX / 2 - 1) &&
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) ==
HFA384x_PDR_NICID) {
curroff, pda->nrec);
return 1;
}
- pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
+ pda->rec[pda->nrec] = (hfa384x_pdrec_t *)&(pda16[curroff]);
(pda->nrec)++;
return 0;
}
addr = be32_to_cpu(record->addr);
/* Point into data for different word lengths */
- ptr32 = (u32 *) record->data;
- ptr16 = (u16 *) record->data;
+ ptr32 = (u32 *)record->data;
+ ptr16 = (u16 *)record->data;
/* parse what was an S3 srec and put it in the right array */
switch (addr) {
default: /* Data record */
s3data[ns3data].addr = addr;
s3data[ns3data].len = len;
- s3data[ns3data].data = (uint8_t *) record->data;
+ s3data[ns3data].data = (uint8_t *)record->data;
ns3data++;
if (ns3data == S3DATA_MAX) {
pr_err("S3 datarec limit reached - aborting\n");
p80211pstrd_t *pstr;
u8 bytebuf[80];
- struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
+ struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
u16 word;
wlandev->macmode = WLAN_MACMODE_NONE;
/*** STATION ***/
/* Set the REQUIRED config items */
/* SSID */
- pstr = (p80211pstrd_t *) &(msg->ssid.data);
+ pstr = (p80211pstrd_t *)&(msg->ssid.data);
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
struct p80211msg_lnxreq_autojoin *msg = msgp;
p80211pstrd_t *pstr;
u8 bytebuf[256];
- struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;
+ struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
wlandev->macmode = WLAN_MACMODE_NONE;
/* Set the ssid */
memset(bytebuf, 0, 256);
- pstr = (p80211pstrd_t *) &(msg->ssid.data);
+ pstr = (p80211pstrd_t *)&(msg->ssid.data);
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
bytebuf,
** MIB table.
*/
- mibitem = (p80211itemd_t *) msg->mibattribute.data;
+ mibitem = (p80211itemd_t *)msg->mibattribute.data;
for (mib = mibtab; mib->did != 0; mib++)
if (mib->did == mibitem->did && (mib->flag & which))
int result;
u32 *uint32 = data;
u8 bytebuf[MIB_TMP_MAXLEN];
- u16 *wordbuf = (u16 *) bytebuf;
+ u16 *wordbuf = (u16 *)bytebuf;
if (isget) {
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
int result;
u32 *uint32 = data;
u8 bytebuf[MIB_TMP_MAXLEN];
- u16 *wordbuf = (u16 *) bytebuf;
+ u16 *wordbuf = (u16 *)bytebuf;
u32 flags;
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
if (isget) {
hfa384x_drvr_getconfig(hw,
HFA384x_RID_CNFWPADATA,
- (u8 *) &wpa,
+ (u8 *)&wpa,
sizeof(wpa));
pstr->len = le16_to_cpu(wpa.datalen);
memcpy(pstr->data, wpa.data, pstr->len);
hfa384x_drvr_setconfig(hw,
HFA384x_RID_CNFWPADATA,
- (u8 *) &wpa,
+ (u8 *)&wpa,
sizeof(wpa));
}
break;
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
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);
}
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
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);
}
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
{
- pstr->len = (u8) len;
+ pstr->len = (u8)len;
memcpy(pstr->data, bytearea, len);
}
struct p80211msg_lnxreq_ifstate *ifstatemsg;
pr_debug("Received mlme ifstate request\n");
- ifstatemsg = (struct p80211msg_lnxreq_ifstate *) msg;
+ ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg;
result =
prism2sta_ifstate(wlandev,
ifstatemsg->ifstate.data);
pr_debug("Received commsquality request\n");
- qualmsg = (struct p80211msg_lnxreq_commsquality *) msg;
+ qualmsg = (struct p80211msg_lnxreq_commsquality *)msg;
qualmsg->link.status =
P80211ENUM_msgitem_status_data_ok;
/* strip out the 'special' variant bits */
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) {
netdev_info(wlandev->netdev,
cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
if (inf->framelen > 22) {
- dst = (u32 *) &hw->tallies;
- src32 = (u32 *) &inf->info.commtallies32;
+ dst = (u32 *)&hw->tallies;
+ src32 = (u32 *)&inf->info.commtallies32;
for (i = 0; i < cnt; i++, dst++, src32++)
*dst += le32_to_cpu(*src32);
} else {
- dst = (u32 *) &hw->tallies;
- src16 = (u16 *) &inf->info.commtallies16;
+ dst = (u32 *)&hw->tallies;
+ src16 = (u16 *)&inf->info.commtallies16;
for (i = 0; i < cnt; i++, dst++, src16++)
*dst += le16_to_cpu(*src16);
}
hfa384x_InfFrame_t *inf;
while ((skb = skb_dequeue(&hw->authq))) {
- inf = (hfa384x_InfFrame_t *) skb->data;
+ inf = (hfa384x_InfFrame_t *)skb->data;
prism2sta_inf_authreq_defer(wlandev, inf);
}
return;
}
prism2mgmt_bytestr2pstr(
- (struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ (struct hfa384x_bytestr *)&ssid,
+ (p80211pstrd_t *)&wlandev->ssid);
/* Collect the port status */
result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_CURRENTSSID, result);
return;
}
- prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
+ (p80211pstrd_t *)&wlandev->ssid);
hw->link_status = HFA384x_LINK_CONNECTED;
netif_carrier_on(wlandev->netdev);
/* Get the signal rate */
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem->did = DIDmib_p2_p2MAC_p2CurrentTxRate;
- result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ result = p80211req_dorequest(wlandev, (u8 *)&msg);
if (result) {
pr_debug("get signal rate failed, result = %d\n",
HFA384x_RID_CURRENTSSID, result);
return;
}
- prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
+ (p80211pstrd_t *)&wlandev->ssid);
/* Reschedule timer */
mod_timer(&hw->commsqual_timer, jiffies + HZ);
void prism2sta_commsqual_timer(unsigned long data)
{
- hfa384x_t *hw = (hfa384x_t *) data;
+ hfa384x_t *hw = (hfa384x_t *)data;
schedule_work(&hw->commsqual_bh);
}