static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, struct wlandevice *wlandev, struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; struct p80211pstrd *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; if (isget) { result = hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2); prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2); } else { memset(bytebuf, 0, mib->parm2); memcpy(bytebuf, pstr->data, pstr->len); result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2); } return result; }
static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, wlandevice_t *wlandev, hfa384x_t *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; p80211pstrd_t *pstr = (p80211pstrd_t *) data; u8 bytebuf[MIB_TMP_MAXLEN]; if (isget) { result = hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2); prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2); } else { memset(bytebuf, 0, mib->parm2); prism2mgmt_pstr2bytearea(bytebuf, pstr); result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2); } return result; }