diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 17:48:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 17:48:32 -0700 |
commit | fb20871a54961b82d35303b43452928186c1361d (patch) | |
tree | 1beeb39e45eda1c8b5893090904b583fceeb07ef /drivers/staging/wlan-ng/prism2mib.c | |
parent | bee89ab228e6f51c4ddd3481b9bd491859a8ee7b (diff) | |
parent | c7a5d70796379e3d51d0c652fbe1634b81d3bbd5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (342 commits)
Staging: comedi: fix build errors
Staging: udlfb: update to version 0.2.3
Staging: udlfb: fix some sparse warnings.
Staging: udlfb: clean up checkpatch warnings in udlfb.c
Staging: udlfb: clean up checkpatch warnings in udlfb.h
Staging: udlfb: add udlfb driver to build
Staging: add udlfb driver
Staging: pata_rdc: remove pointless comments
Staging: pata_rdc: remove DRIVER macros
Staging: pata_rdc: remove dbgprintf macro
Staging: pata_rdc: remove broken flag
Staging: pata_rdc: fix build warnings
Staging: pata_rdc: use PCI_DEVICE
Staging: pata_rdc: remove function prototypes
Staging: pata_rdc: coding style fixes
Staging: pata_rdc: convert code to work in 2.6.29
Staging: pata_rdc: add driver to the build system
Staging: add pata_rdc driver
Staging: remove obsolete serqt_usb driver
Staging: serqt_usb2 add the driver to the build
...
Diffstat (limited to 'drivers/staging/wlan-ng/prism2mib.c')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mib.c | 159 |
1 files changed, 76 insertions, 83 deletions
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 5a6ba86009d..f930254e1b3 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -50,7 +50,6 @@ * -------------------------------------------------------------------- */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> @@ -87,65 +86,65 @@ typedef struct mibrec { u16 parm1; u16 parm2; u16 parm3; - int (*func) (struct mibrec *mib, + int (*func) (struct mibrec * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data); + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); } mibrec_t; -static int prism2mib_bytearea2pstr(mibrec_t *mib, +static int prism2mib_bytearea2pstr(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_uint32(mibrec_t *mib, +static int prism2mib_uint32(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data); + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_flag(mibrec_t *mib, +static int prism2mib_flag(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data); + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_wepdefaultkey(mibrec_t *mib, +static int prism2mib_wepdefaultkey(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_privacyinvoked(mibrec_t *mib, +static int prism2mib_privacyinvoked(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_excludeunencrypted(mibrec_t *mib, +static int prism2mib_excludeunencrypted(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_fragmentationthreshold(mibrec_t *mib, +static int prism2mib_fragmentationthreshold(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); -static int prism2mib_priv(mibrec_t *mib, +static int prism2mib_priv(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data); + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data); static mibrec_t mibtab[] = { @@ -259,7 +258,7 @@ static mibrec_t mibtab[] = { * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp) { hfa384x_t *hw = wlandev->priv; int result, isget; @@ -331,8 +330,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) if (msg->resultcode.data == P80211ENUM_resultcode_success) { if (result != 0) { - pr_debug("get/set failure, result=%d\n", - result); + pr_debug("get/set failure, result=%d\n", result); msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; } else { @@ -374,11 +372,11 @@ done: * ----------------------------------------------------------------*/ -static int prism2mib_bytearea2pstr(mibrec_t *mib, +static int prism2mib_bytearea2pstr(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; @@ -424,11 +422,11 @@ static int prism2mib_bytearea2pstr(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_uint32(mibrec_t *mib, +static int prism2mib_uint32(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data) + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; u32 *uint32 = (u32 *) data; @@ -471,11 +469,11 @@ static int prism2mib_uint32(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_flag(mibrec_t *mib, +static int prism2mib_flag(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data) + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; u32 *uint32 = (u32 *) data; @@ -528,11 +526,11 @@ static int prism2mib_flag(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_wepdefaultkey(mibrec_t *mib, +static int prism2mib_wepdefaultkey(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; @@ -578,11 +576,11 @@ static int prism2mib_wepdefaultkey(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_privacyinvoked(mibrec_t *mib, +static int prism2mib_privacyinvoked(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; @@ -624,11 +622,11 @@ static int prism2mib_privacyinvoked(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_excludeunencrypted(mibrec_t *mib, +static int prism2mib_excludeunencrypted(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; @@ -663,11 +661,11 @@ static int prism2mib_excludeunencrypted(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_fragmentationthreshold(mibrec_t *mib, +static int prism2mib_fragmentationthreshold(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { int result; @@ -712,11 +710,11 @@ static int prism2mib_fragmentationthreshold(mibrec_t *mib, * ----------------------------------------------------------------*/ -static int prism2mib_priv(mibrec_t *mib, +static int prism2mib_priv(mibrec_t * mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, - p80211msg_dot11req_mibset_t *msg, void *data) + wlandevice_t * wlandev, + hfa384x_t * hw, + p80211msg_dot11req_mibset_t * msg, void *data) { p80211pstrd_t *pstr = (p80211pstrd_t *) data; @@ -728,7 +726,7 @@ static int prism2mib_priv(mibrec_t *mib, 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); @@ -739,7 +737,7 @@ static int prism2mib_priv(mibrec_t *mib, result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFWPADATA, - (u8 *)&wpa, + (u8 *) & wpa, sizeof(wpa)); } break; @@ -766,7 +764,7 @@ static int prism2mib_priv(mibrec_t *mib, * ----------------------------------------------------------------*/ -void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) +void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr) { bytestr->len = cpu_to_le16((u16) (pstr->len)); memcpy(bytestr->data, pstr->data, pstr->len); @@ -787,7 +785,7 @@ void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) * ----------------------------------------------------------------*/ -void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr) +void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr) { memcpy(bytearea, pstr->data, pstr->len); } @@ -807,7 +805,7 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr) * ----------------------------------------------------------------*/ -void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) +void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr) { pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len))); memcpy(pstr->data, bytestr->data, pstr->len); @@ -828,13 +826,8 @@ void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) * ----------------------------------------------------------------*/ -void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len) +void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len) { pstr->len = (u8) len; memcpy(pstr->data, bytearea, len); } - - - - - |