Added mgmt_readpda().

This commit is contained in:
mark 2000-01-25 21:29:04 +00:00
parent 83392c1387
commit 5964e65ccd
2 changed files with 39 additions and 0 deletions

View File

@ -130,6 +130,7 @@ int prism2mgmt_reassociate(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_disassociate(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_start(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp);
int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp);
/*---------------------------------------------------------------
* conversion functions going between wlan message data types and

View File

@ -1213,6 +1213,44 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
}
/*----------------------------------------------------------------
* prism2mgmt_readpda
*
* Collect the PDA data and put it in the message.
*
* 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)
----------------------------------------------------------------*/
int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
{
prism2sta_priv_t *priv = (prism2sta_priv_t*)wlandev->priv;
p80211msg_p2req_readpda_t *msg = msgp;
DBFENTER;
/* This driver really shouldn't be active if we weren't able */
/* to read a PDA from a card. Therefore, we assume the pda */
/* in priv->pda is good. */
memcpy( msg->pda.data, priv->pda, HFA384x_PDA_LEN_MAX);
msg->pda.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_success;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
DBFEXIT;
return 0;
}
/*----------------------------------------------------------------
* prism2mgmt_wlansniff
*