Esempio n. 1
0
/*----------------------------------------------------------------
* p80211req_handlemsg
*
* p80211 message handler.  Primarily looks for messages that
* belong to p80211 and then dispatches the appropriate response.
* TODO: we don't do anything yet.  Once the linuxMIB is better
*	defined we'll need a get/set handler.
*
* Arguments:
*	wlandev		WLAN device struct
*	msg		message structure
*
* Returns:
*	nothing (any results are set in the status field of the msg)
*
* Call context:
*	Process thread
----------------------------------------------------------------*/
static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg)
{
	switch (msg->msgcode) {

	case DIDmsg_lnxreq_hostwep:{
		struct p80211msg_lnxreq_hostwep *req =
			(struct p80211msg_lnxreq_hostwep *) msg;
		wlandev->hostwep &=
				~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
		if (req->decrypt.data == P80211ENUM_truth_true)
			wlandev->hostwep |= HOSTWEP_DECRYPT;
		if (req->encrypt.data == P80211ENUM_truth_true)
			wlandev->hostwep |= HOSTWEP_ENCRYPT;

	break;
	}
	case DIDmsg_dot11req_mibget:
	case DIDmsg_dot11req_mibset:{
		int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
		struct p80211msg_dot11req_mibget *mib_msg =
			(struct p80211msg_dot11req_mibget *) msg;
		p80211req_mibset_mibget(wlandev, mib_msg, isget);
	break;
	}
	}			/* switch msg->msgcode */
}
Esempio n. 2
0
/*----------------------------------------------------------------
* p80211req_handlemsg
*
* p80211 message handler.  Primarily looks for messages that
* belong to p80211 and then dispatches the appropriate response.
* TODO: we don't do anything yet.  Once the linuxMIB is better
*	defined we'll need a get/set handler.  
* 
* Arguments:
*	wlandev		WLAN device struct
*	msg		message structure
*
* Returns: 
*	nothing (any results are set in the status field of the msg)
*	
* Call context:
*	Process thread
----------------------------------------------------------------*/
void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg)
{
        DBFENTER;
        
	switch (msg->msgcode) {

	case DIDmsg_lnxreq_hostwep: {
		p80211msg_lnxreq_hostwep_t *req = (p80211msg_lnxreq_hostwep_t*) msg;
		wlandev->hostwep &= ~(HOSTWEP_DECRYPT|HOSTWEP_ENCRYPT);
		if (req->decrypt.data == P80211ENUM_truth_true)
			wlandev->hostwep |= HOSTWEP_DECRYPT;
		if (req->encrypt.data == P80211ENUM_truth_true)
			wlandev->hostwep |= HOSTWEP_ENCRYPT;

		break;
	}
	case DIDmsg_dot11req_mibget:
	case DIDmsg_dot11req_mibset: {
		int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
		p80211msg_dot11req_mibget_t  *mib_msg = (p80211msg_dot11req_mibget_t *) msg;
		p80211req_mibset_mibget (wlandev, mib_msg, isget);
	}
	default:
		// XXX do nothing!
		;
	} /* switch msg->msgcode */

	DBFEXIT;

	return;
}