Lines Matching refs:configNr
60 static rndis_resp_t *rndis_add_response(int configNr, u32 length);
149 static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, in gen_ndis_query_resp() argument
183 params = &rndis_per_dev_params[configNr]; in gen_ndis_query_resp()
651 static int gen_ndis_set_resp(u8 configNr, u32 OID, u8 *buf, u32 buf_len, in gen_ndis_set_resp() argument
680 params = &rndis_per_dev_params[configNr]; in gen_ndis_set_resp()
774 static int rndis_init_response(int configNr, rndis_init_msg_type *buf) in rndis_init_response() argument
779 if (!rndis_per_dev_params[configNr].dev) in rndis_init_response()
782 r = rndis_add_response(configNr, sizeof(rndis_init_cmplt_type)); in rndis_init_response()
798 rndis_per_dev_params[configNr].mtu in rndis_init_response()
806 if (rndis_per_dev_params[configNr].ack) in rndis_init_response()
807 rndis_per_dev_params[configNr].ack( in rndis_init_response()
808 rndis_per_dev_params[configNr].dev); in rndis_init_response()
813 static int rndis_query_response(int configNr, rndis_query_msg_type *buf) in rndis_query_response() argument
819 if (!rndis_per_dev_params[configNr].dev) in rndis_query_response()
828 r = rndis_add_response(configNr, in rndis_query_response()
837 if (gen_ndis_query_resp(configNr, get_unaligned_le32(&buf->OID), in rndis_query_response()
851 if (rndis_per_dev_params[configNr].ack) in rndis_query_response()
852 rndis_per_dev_params[configNr].ack( in rndis_query_response()
853 rndis_per_dev_params[configNr].dev); in rndis_query_response()
857 static int rndis_set_response(int configNr, rndis_set_msg_type *buf) in rndis_set_response() argument
863 r = rndis_add_response(configNr, sizeof(rndis_set_cmplt_type)); in rndis_set_response()
885 if (gen_ndis_set_resp(configNr, get_unaligned_le32(&buf->OID), in rndis_set_response()
892 if (rndis_per_dev_params[configNr].ack) in rndis_set_response()
893 rndis_per_dev_params[configNr].ack( in rndis_set_response()
894 rndis_per_dev_params[configNr].dev); in rndis_set_response()
899 static int rndis_reset_response(int configNr, rndis_reset_msg_type *buf) in rndis_reset_response() argument
904 r = rndis_add_response(configNr, sizeof(rndis_reset_cmplt_type)); in rndis_reset_response()
915 if (rndis_per_dev_params[configNr].ack) in rndis_reset_response()
916 rndis_per_dev_params[configNr].ack( in rndis_reset_response()
917 rndis_per_dev_params[configNr].dev); in rndis_reset_response()
922 static int rndis_keepalive_response(int configNr, in rndis_keepalive_response() argument
930 r = rndis_add_response(configNr, sizeof(rndis_keepalive_cmplt_type)); in rndis_keepalive_response()
941 if (rndis_per_dev_params[configNr].ack) in rndis_keepalive_response()
942 rndis_per_dev_params[configNr].ack( in rndis_keepalive_response()
943 rndis_per_dev_params[configNr].dev); in rndis_keepalive_response()
952 static int rndis_indicate_status_msg(int configNr, u32 status) in rndis_indicate_status_msg() argument
957 if (rndis_per_dev_params[configNr].state == RNDIS_UNINITIALIZED) in rndis_indicate_status_msg()
960 r = rndis_add_response(configNr, in rndis_indicate_status_msg()
973 if (rndis_per_dev_params[configNr].ack) in rndis_indicate_status_msg()
974 rndis_per_dev_params[configNr].ack( in rndis_indicate_status_msg()
975 rndis_per_dev_params[configNr].dev); in rndis_indicate_status_msg()
979 int rndis_signal_connect(int configNr) in rndis_signal_connect() argument
981 rndis_per_dev_params[configNr].media_state in rndis_signal_connect()
983 return rndis_indicate_status_msg(configNr, in rndis_signal_connect()
987 int rndis_signal_disconnect(int configNr) in rndis_signal_disconnect() argument
989 rndis_per_dev_params[configNr].media_state in rndis_signal_disconnect()
993 return rndis_indicate_status_msg(configNr, in rndis_signal_disconnect()
1000 void rndis_uninit(int configNr) in rndis_uninit() argument
1005 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_uninit()
1007 rndis_per_dev_params[configNr].used = 0; in rndis_uninit()
1008 rndis_per_dev_params[configNr].state = RNDIS_UNINITIALIZED; in rndis_uninit()
1011 while ((buf = rndis_get_next_response(configNr, &length))) in rndis_uninit()
1012 rndis_free_response(configNr, buf); in rndis_uninit()
1015 void rndis_set_host_mac(int configNr, const u8 *addr) in rndis_set_host_mac() argument
1017 rndis_per_dev_params[configNr].host_mac = addr; in rndis_set_host_mac()
1020 enum rndis_state rndis_get_state(int configNr) in rndis_get_state() argument
1022 if (configNr >= RNDIS_MAX_CONFIGS || configNr < 0) in rndis_get_state()
1024 return rndis_per_dev_params[configNr].state; in rndis_get_state()
1030 int rndis_msg_parser(u8 configNr, u8 *buf) in rndis_msg_parser() argument
1036 debug("%s: configNr = %d, %p\n", __func__, configNr, buf); in rndis_msg_parser()
1045 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_msg_parser()
1047 params = &rndis_per_dev_params[configNr]; in rndis_msg_parser()
1060 return rndis_init_response(configNr, in rndis_msg_parser()
1069 return rndis_query_response(configNr, in rndis_msg_parser()
1073 return rndis_set_response(configNr, in rndis_msg_parser()
1078 return rndis_reset_response(configNr, in rndis_msg_parser()
1086 return rndis_keepalive_response(configNr, in rndis_msg_parser()
1144 void rndis_deregister(int configNr) in rndis_deregister() argument
1146 debug("%s: configNr = %d\n", __func__, configNr); in rndis_deregister()
1148 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_deregister()
1150 rndis_per_dev_params[configNr].used = 0; in rndis_deregister()
1156 int rndis_set_param_dev(u8 configNr, struct eth_device *dev, int mtu, in rndis_set_param_dev() argument
1159 int rndis_set_param_dev(u8 configNr, struct udevice *dev, int mtu, in rndis_set_param_dev()
1163 debug("%s: configNr = %d\n", __func__, configNr); in rndis_set_param_dev()
1166 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_set_param_dev()
1169 rndis_per_dev_params[configNr].dev = dev; in rndis_set_param_dev()
1170 rndis_per_dev_params[configNr].stats = stats; in rndis_set_param_dev()
1171 rndis_per_dev_params[configNr].mtu = mtu; in rndis_set_param_dev()
1172 rndis_per_dev_params[configNr].filter = cdc_filter; in rndis_set_param_dev()
1177 int rndis_set_param_vendor(u8 configNr, u32 vendorID, const char *vendorDescr) in rndis_set_param_vendor() argument
1179 debug("%s: configNr = %d\n", __func__, configNr); in rndis_set_param_vendor()
1182 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_set_param_vendor()
1185 rndis_per_dev_params[configNr].vendorID = vendorID; in rndis_set_param_vendor()
1186 rndis_per_dev_params[configNr].vendorDescr = vendorDescr; in rndis_set_param_vendor()
1191 int rndis_set_param_medium(u8 configNr, u32 medium, u32 speed) in rndis_set_param_medium() argument
1193 debug("%s: configNr = %d, %u %u\n", __func__, configNr, medium, speed); in rndis_set_param_medium()
1194 if (configNr >= RNDIS_MAX_CONFIGS) in rndis_set_param_medium()
1197 rndis_per_dev_params[configNr].medium = medium; in rndis_set_param_medium()
1198 rndis_per_dev_params[configNr].speed = speed; in rndis_set_param_medium()
1215 void rndis_free_response(int configNr, u8 *buf) in rndis_free_response() argument
1221 &(rndis_per_dev_params[configNr].resp_queue)) in rndis_free_response()
1231 u8 *rndis_get_next_response(int configNr, u32 *length) in rndis_get_next_response() argument
1240 &(rndis_per_dev_params[configNr].resp_queue)) in rndis_get_next_response()
1253 static rndis_resp_t *rndis_add_response(int configNr, u32 length) in rndis_add_response() argument
1267 &(rndis_per_dev_params[configNr].resp_queue)); in rndis_add_response()