diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
commit | d635711daa98be86d4c7fd01499c34f566b54ccb (patch) | |
tree | aa5cc3760a27c3d57146498cb82fa549547de06c /drivers/staging/wlan-ng/prism2mib.c | |
parent | c91265cd0efb83778f015b4d4b1129bd2cfd075e (diff) |
Linux-libre 4.6.2-gnu
Diffstat (limited to 'drivers/staging/wlan-ng/prism2mib.c')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mib.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index cdda07d1c..fe914b1f9 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -379,7 +379,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib, void *data) { int result; - p80211pstrd_t *pstr = (p80211pstrd_t *) data; + p80211pstrd_t *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; if (isget) { @@ -388,7 +388,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib, prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2); } else { memset(bytebuf, 0, mib->parm2); - prism2mgmt_pstr2bytearea(bytebuf, pstr); + memcpy(bytebuf, pstr->data, pstr->len); result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2); } @@ -428,7 +428,7 @@ static int prism2mib_uint32(struct mibrec *mib, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - u32 *uint32 = (u32 *) data; + u32 *uint32 = data; u8 bytebuf[MIB_TMP_MAXLEN]; u16 *wordbuf = (u16 *) bytebuf; @@ -475,7 +475,7 @@ static int prism2mib_flag(struct mibrec *mib, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - u32 *uint32 = (u32 *) data; + u32 *uint32 = data; u8 bytebuf[MIB_TMP_MAXLEN]; u16 *wordbuf = (u16 *) bytebuf; u32 flags; @@ -533,7 +533,7 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib, void *data) { int result; - p80211pstrd_t *pstr = (p80211pstrd_t *) data; + p80211pstrd_t *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; u16 len; @@ -543,7 +543,7 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib, len = (pstr->len > 5) ? HFA384x_RID_CNFWEP128DEFAULTKEY_LEN : HFA384x_RID_CNFWEPDEFAULTKEY_LEN; memset(bytebuf, 0, len); - prism2mgmt_pstr2bytearea(bytebuf, pstr); + memcpy(bytebuf, pstr->data, pstr->len); result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len); } @@ -660,7 +660,7 @@ static int prism2mib_fragmentationthreshold(struct mibrec *mib, struct p80211msg_dot11req_mibset *msg, void *data) { - u32 *uint32 = (u32 *) data; + u32 *uint32 = data; if (!isget) if ((*uint32) % 2) { @@ -705,7 +705,7 @@ static int prism2mib_priv(struct mibrec *mib, hfa384x_t *hw, struct p80211msg_dot11req_mibset *msg, void *data) { - p80211pstrd_t *pstr = (p80211pstrd_t *) data; + p80211pstrd_t *pstr = data; switch (mib->did) { case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{ @@ -759,26 +759,6 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, } /*---------------------------------------------------------------- -* prism2mgmt_pstr2bytearea -* -* Convert the pstr data in the WLAN message structure into an hfa384x -* byte area format. -* -* Arguments: -* bytearea hfa384x byte area data type -* pstr wlan message data -* -* Returns: -* Nothing -* -----------------------------------------------------------------*/ - -void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr) -{ - memcpy(bytearea, pstr->data, pstr->len); -} - -/*---------------------------------------------------------------- * prism2mgmt_bytestr2pstr * * Convert the data in an hfa384x byte string format into a |