1/* 2 * This is a reverse-engineered driver for mobile WiMAX (802.16e) devices 3 * based on Samsung CMC-730 chip. 4 * Copyright (C) 2008-2009 Alexander Gordeev <lasaine@lvk.cs.msu.su> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21#ifndef _PROTOCOL_H 22#define _PROTOCOL_H 23 24#include "wimax.h" 25 26#define USB_HOST_SUPPORT_EXTENDED_CMD 0x01 27#define USB_HOST_SUPPORT_MULTIPLE_MAC_REQ 0x02 28#define USB_HOST_SUPPORT_SELECTIVE_SUSPEND 0x04 29#define USB_HOST_SUPPORT_TRUNCATE_ETHERNET_HEADER 0x08 30#define USB_HOST_SUPPORT_DL_SIX_BYTES_HEADER 0x10 31#define USB_HOST_SUPPORT_UL_SIX_BYTES_HEADER 0x20 32#define USB_HOST_SUPPORT_DL_MULTI_PACKETS 0x40 33#define USB_HOST_SUPPORT_UL_MULTI_PACKETS 0x80 34 35 36int process_response(struct wimax_dev_status *dev, const unsigned char *buf, int len); 37 38 39#define HEADER_LENGTH_LOWLEVEL 4 40#define HEADER_LENGTH 6 41 42/* 57 45 requests */ 43 44int fill_protocol_info_req(unsigned char *buf, unsigned char flags); 45 46/* 57 50 requests */ 47 48int fill_mac_lowlevel_req(unsigned char *buf); 49 50 51/* 57 43 requests */ 52 53int fill_init_cmd(unsigned char *buf); 54 55/* 57 43 config requests */ 56 57int fill_string_info_req(unsigned char *buf); 58 59int fill_diode_control_cmd(unsigned char *buf, int turn_on); 60 61int fill_mac_req(unsigned char *buf); 62 63int fill_auth_policy_req(unsigned char *buf); 64 65int fill_auth_method_req(unsigned char *buf); 66 67int fill_auth_set_cmd(unsigned char *buf, char *netid); 68 69int fill_find_network_req(unsigned char *buf, unsigned short level); 70 71int fill_connection_params_req(unsigned char *buf); 72 73int fill_state_req(unsigned char *buf); 74 75int fill_network_list_req(unsigned char *buf); 76 77 78/* 57 44 requests */ 79 80int get_header_len(); 81 82int fill_data_packet_header(unsigned char *buf, int body_len); 83 84#endif // _PROTOCOL_H 85 86