Lines Matching refs:configNr
64 static rndis_resp_t *rndis_add_response (int configNr, u32 length);
151 gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
183 net = rndis_per_dev_params[configNr].dev;
216 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
224 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
231 if (rndis_per_dev_params [configNr].dev) {
233 rndis_per_dev_params [configNr].dev->mtu);
242 if (rndis_per_dev_params [configNr].media_state
247 rndis_per_dev_params [configNr].speed);
254 if (rndis_per_dev_params [configNr].dev) {
256 rndis_per_dev_params [configNr].dev->mtu);
264 if (rndis_per_dev_params [configNr].dev) {
266 rndis_per_dev_params [configNr].dev->mtu);
275 rndis_per_dev_params [configNr].vendorID);
282 if ( rndis_per_dev_params [configNr].vendorDescr ) {
283 length = strlen (rndis_per_dev_params [configNr].vendorDescr);
285 rndis_per_dev_params [configNr].vendorDescr, length);
302 *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter);
317 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
398 if (rndis_per_dev_params [configNr].dev) {
401 rndis_per_dev_params [configNr].host_mac,
410 if (rndis_per_dev_params [configNr].dev) {
413 rndis_per_dev_params [configNr].host_mac,
479 static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len,
503 params = &rndis_per_dev_params [configNr];
552 static int rndis_init_response (int configNr, rndis_init_msg_type *buf)
556 struct rndis_params *params = rndis_per_dev_params + configNr;
561 r = rndis_add_response (configNr, sizeof (rndis_init_cmplt_type));
589 static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
593 struct rndis_params *params = rndis_per_dev_params + configNr;
605 r = rndis_add_response (configNr,
614 if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID),
632 static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
637 struct rndis_params *params = rndis_per_dev_params + configNr;
639 r = rndis_add_response (configNr, sizeof (rndis_set_cmplt_type));
662 if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID),
672 static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf)
676 struct rndis_params *params = rndis_per_dev_params + configNr;
678 r = rndis_add_response (configNr, sizeof (rndis_reset_cmplt_type));
693 static int rndis_keepalive_response (int configNr,
698 struct rndis_params *params = rndis_per_dev_params + configNr;
702 r = rndis_add_response (configNr, sizeof (rndis_keepalive_cmplt_type));
721 static int rndis_indicate_status_msg (int configNr, u32 status)
725 struct rndis_params *params = rndis_per_dev_params + configNr;
730 r = rndis_add_response (configNr,
747 int rndis_signal_connect (int configNr)
749 rndis_per_dev_params [configNr].media_state
751 return rndis_indicate_status_msg (configNr,
755 int rndis_signal_disconnect (int configNr)
757 rndis_per_dev_params [configNr].media_state
759 return rndis_indicate_status_msg (configNr,
763 void rndis_uninit (int configNr)
768 if (configNr >= RNDIS_MAX_CONFIGS)
770 rndis_per_dev_params [configNr].state = RNDIS_UNINITIALIZED;
773 while ((buf = rndis_get_next_response(configNr, &length)))
774 rndis_free_response(configNr, buf);
777 void rndis_set_host_mac (int configNr, const u8 *addr)
779 rndis_per_dev_params [configNr].host_mac = addr;
785 int rndis_msg_parser (u8 configNr, u8 *buf)
798 if (configNr >= RNDIS_MAX_CONFIGS)
800 params = &rndis_per_dev_params [configNr];
813 return rndis_init_response (configNr,
827 return rndis_query_response (configNr,
831 return rndis_set_response (configNr,
837 return rndis_reset_response (configNr,
845 return rndis_keepalive_response (configNr,
894 pr_debug("%s: configNr = %d\n", __func__, i);
903 void rndis_deregister (int configNr)
907 if (configNr >= RNDIS_MAX_CONFIGS) return;
908 rndis_per_dev_params [configNr].used = 0;
913 int rndis_set_param_dev(u8 configNr, struct net_device *dev, u16 *cdc_filter)
918 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
920 rndis_per_dev_params [configNr].dev = dev;
921 rndis_per_dev_params [configNr].filter = cdc_filter;
926 int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
930 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
932 rndis_per_dev_params [configNr].vendorID = vendorID;
933 rndis_per_dev_params [configNr].vendorDescr = vendorDescr;
938 int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
941 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
943 rndis_per_dev_params [configNr].medium = medium;
944 rndis_per_dev_params [configNr].speed = speed;
963 void rndis_free_response (int configNr, u8 *buf)
969 &(rndis_per_dev_params [configNr].resp_queue))
979 u8 *rndis_get_next_response (int configNr, u32 *length)
987 &(rndis_per_dev_params [configNr].resp_queue))
1000 static rndis_resp_t *rndis_add_response (int configNr, u32 length)
1013 &(rndis_per_dev_params [configNr].resp_queue));