Sends now "Zyxel formatted" control headers.
FossilOrigin-Name: 87cd61bafbe36c97d73ef6d0768535999b2711eb6f0812738e82bc831916b9c4
This commit is contained in:
parent
04fa8f58f9
commit
0af9ce0eff
@ -23,13 +23,21 @@
|
|||||||
|
|
||||||
#include "cw_log.h"
|
#include "cw_log.h"
|
||||||
|
|
||||||
|
|
||||||
int conn_send_cwmsg(struct conn * conn, struct cwmsg * cwmsg)
|
int conn_send_cwmsg(struct conn * conn, struct cwmsg * cwmsg)
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
|
|
||||||
/* second dword of message control header */
|
/* second dword of message control header -
|
||||||
//orig val = (cwmsg->seqnum<<24)|((cwmsg->pos+3)<<8);
|
msg length and seqnum */
|
||||||
val = (cwmsg->seqnum<<24)|((cwmsg->pos)<<8);
|
val = (cwmsg->seqnum<<24)|((cwmsg->pos+3)<<8);
|
||||||
|
|
||||||
|
/* Zyxel doesn't count msg element length from
|
||||||
|
behind seqnum */
|
||||||
|
if (conn->capwap_mode == CWMODE_ZYXEL){
|
||||||
|
val-=3;
|
||||||
|
}
|
||||||
|
|
||||||
*((uint32_t*)(cwmsg->ctrlhdr+4))=htonl(val);
|
*((uint32_t*)(cwmsg->ctrlhdr+4))=htonl(val);
|
||||||
|
|
||||||
|
|
||||||
@ -49,6 +57,7 @@ int conn_send_cwmsg(struct conn * conn, struct cwmsg * cwmsg)
|
|||||||
|
|
||||||
int wbid=CWTH_WBID_IEEE80211;
|
int wbid=CWTH_WBID_IEEE80211;
|
||||||
int packetlen = msglen+hlen;
|
int packetlen = msglen+hlen;
|
||||||
|
|
||||||
int mtu = conn->mtu;
|
int mtu = conn->mtu;
|
||||||
|
|
||||||
while (packetlen>mtu){
|
while (packetlen>mtu){
|
||||||
|
Loading…
Reference in New Issue
Block a user