diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
commit | 41844e36206be90cd4d962ea49b0abc3612a99d0 (patch) | |
tree | ce0b3a3403bc6abdb28f52779d0d7b57a51a5c86 /drivers/staging/wlan-ng/prism2mib.c | |
parent | 5691f0e9a3e7855832d5fd094801bf600347c2d0 (diff) | |
parent | fc1e2c8ea85e109acf09e74789e9b852f6eed251 (diff) | |
download | op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.zip op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.tar.gz |
Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the big staging and IIO driver pull request for 4.9-rc1.
There are a lot of patches in here, the majority due to the
drivers/staging/greybus/ subsystem being merged in with full
development history that went back a few years, in order to preserve
the work that those developers did over time.
Lots and lots of tiny cleanups happened in the tree as well, due to
the Outreachy application process and lots of other developers showing
up for the first time to clean code up. Along with those changes, we
deleted a wireless driver, and added a raspberrypi driver (currently
marked broken), and lots of new iio drivers.
Overall the tree still shrunk with more lines removed than added,
about 10 thousand lines removed in total. Full details are in the very
long shortlog below.
All of this has been in the linux-next tree with no issues. There will
be some merge problems with other subsystem trees, but those are all
minor problems and shouldn't be hard to work out when they happen
(MAINTAINERS and some lustre build problems with the IB tree)"
And furter from me asking for clarification about greybus:
"Right now there is a phone from Motorola shipping with this code (a
slightly older version, but the same tree), so even though Ara is not
alive in the same form, the functionality is happening. We are working
with the developers of that phone to merge the newer stuff in with
their fork so they can use the upstream version in future versions of
their phone product line.
Toshiba has at least one chip shipping in their catalog that
needs/uses this protocol over a Unipro link, and rumor has it that
there might be more in the future.
There are also other users of the greybus protocols, there is a talk
next week at ELC that shows how it is being used across a network
connection to control a device, and previous ELC talks have showed the
protocol stack being used over USB to drive embedded Linux boards.
I've also talked to some people who are starting to work to add a host
controller driver to control arduinos as the greybus PHY protocols are
very useful to control a serial/i2c/spio/whatever device across a
random physical link, as it is a way to have a self-describing device
be attached to a host without needing manual configuration.
So yes, people are using it, and there is still the chance that it
will show up in a phone/laptop/tablet/whatever from Google in the
future as well, the tech isn't dead, even if the original large phone
project happens to be"
* tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (3703 commits)
Staging: fbtft: Fix bug in fbtft-core
staging: rtl8188eu: fix double unlock error in rtw_resume_process()
staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro
staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro
staging:r8188eu: remove GEN_EVT_CODE macro
staging:r8188eu: remove GEN_CMD_CODE macro
staging:r8188eu: remove pkt_newalloc member of the recv_buf structure
staging:r8188eu: remove rtw_handle_dualmac declaration
staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros
staging:r8188eu: change rtl8188e_process_phy_info function argument type
Staging: fsl-mc: Remove blank lines
Staging: fsl-mc: Fix unaligned * in block comments
Staging: comedi: Align the * in block comments
Staging : ks7010 : Fix block comments warninig
Staging: vt6655: Remove explicit NULL comparison using Coccinelle
staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants
staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
staging: dgnc: Fix lines longer than 80 characters
Staging: dgnc: constify attribute_group structures
Staging: most: hdm-dim2: constify attribute_group structures
...
Diffstat (limited to 'drivers/staging/wlan-ng/prism2mib.c')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mib.c | 622 |
1 files changed, 311 insertions, 311 deletions
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index fe914b1..63ab6bc8 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -87,80 +87,80 @@ struct mibrec { u16 parm3; int (*func)(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); }; static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_uint32(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_flag(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_wepdefaultkey(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_privacyinvoked(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_excludeunencrypted(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_fragmentationthreshold(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_priv(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static struct mibrec mibtab[] = { /* dot11smt MIB's */ - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0, + {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1, + {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2, + {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3, + {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0, prism2mib_wepdefaultkey}, @@ -237,36 +237,36 @@ static struct mibrec mibtab[] = { {0, 0, 0, 0, 0, NULL} }; -/*---------------------------------------------------------------- -* prism2mgmt_mibset_mibget -* -* Set the value of a mib item. -* -* Arguments: -* wlandev wlan device structure -* msgp ptr to msg buffer -* -* Returns: -* 0 success and done -* <0 success, but we're waiting for something to finish. -* >0 an error occurred while handling the message. -* Side effects: -* -* Call context: -* process thread (usually) -* interrupt -----------------------------------------------------------------*/ - -int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) +/* + * prism2mgmt_mibset_mibget + * + * Set the value of a mib item. + * + * Arguments: + * wlandev wlan device structure + * msgp ptr to msg buffer + * + * Returns: + * 0 success and done + * <0 success, but we're waiting for something to finish. + * >0 an error occurred while handling the message. + * Side effects: + * + * Call context: + * process thread (usually) + * interrupt + */ + +int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int result, isget; struct mibrec *mib; u16 which; struct p80211msg_dot11req_mibset *msg = msgp; - p80211itemd_t *mibitem; + struct p80211itemd *mibitem; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.data = P80211ENUM_resultcode_success; @@ -284,7 +284,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) ** MIB table. */ - mibitem = (p80211itemd_t *) msg->mibattribute.data; + mibitem = (struct p80211itemd *)msg->mibattribute.data; for (mib = mibtab; mib->did != 0; mib++) if (mib->did == mibitem->did && (mib->flag & which)) @@ -346,40 +346,40 @@ done: return 0; } -/*---------------------------------------------------------------- -* prism2mib_bytearea2pstr -* -* Get/set pstr data to/from a byte area. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Number of bytes of RID data. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_bytearea2pstr + * + * Get/set pstr data to/from a byte area. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Number of bytes of RID data. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; if (isget) { @@ -396,41 +396,41 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib, return result; } -/*---------------------------------------------------------------- -* prism2mib_uint32 -* -* Get/set uint32 data. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Not used. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_uint32 + * + * Get/set uint32 data. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Not used. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_uint32(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { 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); @@ -443,41 +443,41 @@ static int prism2mib_uint32(struct mibrec *mib, return result; } -/*---------------------------------------------------------------- -* prism2mib_flag -* -* Get/set a flag. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Bit to get/set. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_flag + * + * Get/set a flag. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Bit to get/set. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_flag(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { 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); @@ -500,40 +500,40 @@ static int prism2mib_flag(struct mibrec *mib, return result; } -/*---------------------------------------------------------------- -* prism2mib_wepdefaultkey -* -* Get/set WEP default keys. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Number of bytes of RID data. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_wepdefaultkey + * + * Get/set WEP default keys. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Number of bytes of RID data. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_wepdefaultkey(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; u16 len; @@ -550,35 +550,35 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib, return result; } -/*---------------------------------------------------------------- -* prism2mib_privacyinvoked -* -* Get/set the dot11PrivacyInvoked value. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Bit value for PrivacyInvoked flag. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_privacyinvoked + * + * Get/set the dot11PrivacyInvoked value. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Bit value for PrivacyInvoked flag. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_privacyinvoked(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -592,35 +592,35 @@ static int prism2mib_privacyinvoked(struct mibrec *mib, return prism2mib_flag(mib, isget, wlandev, hw, msg, data); } -/*---------------------------------------------------------------- -* prism2mib_excludeunencrypted -* -* Get/set the dot11ExcludeUnencrypted value. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Bit value for ExcludeUnencrypted flag. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_excludeunencrypted + * + * Get/set the dot11ExcludeUnencrypted value. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Bit value for ExcludeUnencrypted flag. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_excludeunencrypted(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -628,35 +628,35 @@ static int prism2mib_excludeunencrypted(struct mibrec *mib, return prism2mib_flag(mib, isget, wlandev, hw, msg, data); } -/*---------------------------------------------------------------- -* prism2mib_fragmentationthreshold -* -* Get/set the fragmentation threshold. -* -* MIB record parameters: -* parm1 Prism2 RID value. -* parm2 Not used. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_fragmentationthreshold + * + * Get/set the fragmentation threshold. + * + * MIB record parameters: + * parm1 Prism2 RID value. + * parm2 Not used. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_fragmentationthreshold(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -674,47 +674,47 @@ static int prism2mib_fragmentationthreshold(struct mibrec *mib, return prism2mib_uint32(mib, isget, wlandev, hw, msg, data); } -/*---------------------------------------------------------------- -* prism2mib_priv -* -* Get/set values in the "priv" data structure. -* -* MIB record parameters: -* parm1 Not used. -* parm2 Not used. -* parm3 Not used. -* -* Arguments: -* mib MIB record. -* isget MIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -----------------------------------------------------------------*/ +/* + * prism2mib_priv + * + * Get/set values in the "priv" data structure. + * + * MIB record parameters: + * parm1 Not used. + * parm2 Not used. + * parm3 Not used. + * + * Arguments: + * mib MIB record. + * isget MIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_priv(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; switch (mib->did) { case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{ - hfa384x_WPAData_t wpa; + struct hfa384x_WPAData wpa; 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); @@ -724,7 +724,7 @@ static int prism2mib_priv(struct mibrec *mib, hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFWPADATA, - (u8 *) &wpa, + (u8 *)&wpa, sizeof(wpa)); } break; @@ -736,67 +736,67 @@ static int prism2mib_priv(struct mibrec *mib, return 0; } -/*---------------------------------------------------------------- -* prism2mgmt_pstr2bytestr -* -* Convert the pstr data in the WLAN message structure into an hfa384x -* byte string format. -* -* Arguments: -* bytestr hfa384x byte string data type -* pstr wlan message data -* -* Returns: -* Nothing -* -----------------------------------------------------------------*/ +/* + * prism2mgmt_pstr2bytestr + * + * Convert the pstr data in the WLAN message structure into an hfa384x + * byte string format. + * + * Arguments: + * bytestr hfa384x byte string data type + * pstr wlan message data + * + * Returns: + * Nothing + * + */ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr) + struct p80211pstrd *pstr) { - bytestr->len = cpu_to_le16((u16) (pstr->len)); + bytestr->len = cpu_to_le16((u16)(pstr->len)); memcpy(bytestr->data, pstr->data, pstr->len); } -/*---------------------------------------------------------------- -* prism2mgmt_bytestr2pstr -* -* Convert the data in an hfa384x byte string format into a -* pstr in the WLAN message. -* -* Arguments: -* bytestr hfa384x byte string data type -* msg wlan message -* -* Returns: -* Nothing -* -----------------------------------------------------------------*/ +/* + * prism2mgmt_bytestr2pstr + * + * Convert the data in an hfa384x byte string format into a + * pstr in the WLAN message. + * + * Arguments: + * bytestr hfa384x byte string data type + * msg wlan message + * + * Returns: + * Nothing + * + */ void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr) + struct p80211pstrd *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); } -/*---------------------------------------------------------------- -* prism2mgmt_bytearea2pstr -* -* Convert the data in an hfa384x byte area format into a pstr -* in the WLAN message. -* -* Arguments: -* bytearea hfa384x byte area data type -* msg wlan message -* -* Returns: -* Nothing -* -----------------------------------------------------------------*/ - -void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len) +/* + * prism2mgmt_bytearea2pstr + * + * Convert the data in an hfa384x byte area format into a pstr + * in the WLAN message. + * + * Arguments: + * bytearea hfa384x byte area data type + * msg wlan message + * + * Returns: + * Nothing + * + */ + +void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len) { - pstr->len = (u8) len; + pstr->len = (u8)len; memcpy(pstr->data, bytearea, len); } |