Added p2req_state_dump.

This commit is contained in:
mark 2000-06-30 00:54:09 +00:00
parent 72d4ac5caf
commit e0a03be7b5
3 changed files with 109 additions and 0 deletions

View File

@ -1336,3 +1336,54 @@ int prism2mgmt_mm_dscpmap(wlandevice_t *wlandev, void *msgp)
DBFEXIT;
return 0;
}
/*----------------------------------------------------------------
* prism2mgmt_dump_state
*
* Dumps the driver's and hardware's current state via the kernel
* log at KERN_NOTICE level.
*
* 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_dump_state(wlandevice_t *wlandev, void *msgp)
{
prism2sta_priv_t *priv = (prism2sta_priv_t*)wlandev->priv;
hfa384x_t *hw = priv->hw;
p80211msg_p2req_dump_state_t *msg = msgp;
int result;
UINT16 auxbuf[15];
DBFENTER;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_success;
WLAN_LOG_NOTICE0("prism2 driver and hardware state:\n");
if ( (result = hfa384x_cmd_aux_enable(hw)) ) {
WLAN_LOG_ERROR1("aux_enable failed, result=%d\n", result);
goto failed;
}
hfa384x_copy_from_aux(hw, 0x01e2, auxbuf, sizeof(auxbuf));
hfa384x_cmd_aux_disable(hw);
WLAN_LOG_NOTICE1(" cmac: FreeBlocks=%d\n", auxbuf[5]);
WLAN_LOG_NOTICE2(" cmac: IntEn=0x%02x EvStat=0x%02x\n",
wlan_inw_le16_to_cpu(HFA384x_INTEN(hw->iobase)),
wlan_inw_le16_to_cpu(HFA384x_EVSTAT(hw->iobase)));
WLAN_LOG_NOTICE2(" drvr: txfid_top=%d stacksize=%d\n",
priv->txfid_top,PRISM2_FIDSTACKLEN_MAX);
failed:
DBFEXIT;
return 0;
}

View File

@ -703,6 +703,10 @@ int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
WLAN_LOG_DEBUG0(2,"Received mlme mm_dscpmap request\n");
result = prism2mgmt_mm_dscpmap(wlandev, msg);
break;
case DIDmsg_p2req_dump_state :
WLAN_LOG_DEBUG0(2,"Received mlme dump_state request\n");
result = prism2mgmt_dump_state(wlandev, msg);
break;
default:
WLAN_LOG_WARNING1("Unknown mgmt request message 0x%08lx", msg->msgcode);
break;

View File

@ -3027,6 +3027,56 @@ p80211meta_t MKREQMETANAME(p2req_mm_dscpmap)[] = {
UINT32 MKREQMETASIZE(p2req_mm_dscpmap) =
sizeof(MKREQMETANAME(p2req_mm_dscpmap))/sizeof(p80211meta_t);
/*--------------------------------------------------------------------*/
/* metadata for the p2req_dump_state request message arguments */
extern UINT32 MKREQMETASIZE(p2req_dump_state);
p80211meta_t MKREQMETANAME(p2req_dump_state)[] = {
{
/* name */ (char *)&(MKREQMETASIZE(p2req_dump_state)),
/* did */ 0,
/* flags */ 0,
/* min */ 0,
/* max */ 0,
/* maxlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ NULL,
/* fromtextptr */ NULL,
/* validfunptr */ NULL
},
{
/* name */ MKITEMNAME("level"),
/* did */ P80211DID_MKID(0,0,0,0,0,0,P80211_TYPE_BOUNDEDINT),
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, ISREQUEST, 0UL),
/* min */ 0,
/* max */ 63,
/* maxlen */ 0,
/* enumptr */ NULL,
/* collptr */ NULL,
/* totextptr */ p80211_totext_boundedint,
/* fromtextptr */ p80211_fromtext_boundedint,
/* validfunptr */ p80211_isvalid_boundedint
},
{
/* name */ MKITEMNAME("resultcode"),
/* did */ P80211DID_MKID(0,0,0,0,0,0,P80211_TYPE_ENUMINT),
/* flags */ P80211ITEM_SETFLAGS(ISREQUIRED, 0UL, ISCONFIRM),
/* min */ 0,
/* max */ 0,
/* maxlen */ 0,
/* enumptr */ &MKENUMNAME(resultcode),
/* collptr */ NULL,
/* totextptr */ p80211_totext_enumint,
/* fromtextptr */ p80211_fromtext_enumint,
/* validfunptr */ p80211_isvalid_enumint
}
}; /* end of p2req_dump_state request metadata list */
UINT32 MKREQMETASIZE(p2req_dump_state) =
sizeof(MKREQMETANAME(p2req_dump_state))/sizeof(p80211meta_t);
/*--------------------------------------------------------------------*/
/* Messages Group arrays */
@ -3204,6 +3254,10 @@ grplistitem_t MKGRPMETANAME(p2req)[] = {
{
"p2req_mm_dscpmap", /* dscp=0-63, macqueue=0-3 */
MKREQMETANAME(p2req_mm_dscpmap)
},
{
"p2req_dump_state", /* level=0-63 */
MKREQMETANAME(p2req_dump_state)
}
};