Lines Matching refs:i2400m

162 	struct i2400m *i2400m,  in i2400m_tlv_buffer_walk()  argument
166 struct device *dev = i2400m_dev(i2400m); in i2400m_tlv_buffer_walk()
225 struct i2400m *i2400m, in i2400m_tlv_find() argument
230 struct device *dev = i2400m_dev(i2400m); in i2400m_tlv_find()
232 while ((tlv = i2400m_tlv_buffer_walk(i2400m, tlv_hdr, size, tlv))) { in i2400m_tlv_find()
311 void i2400m_report_tlv_system_state(struct i2400m *i2400m, in i2400m_report_tlv_system_state() argument
314 struct device *dev = i2400m_dev(i2400m); in i2400m_report_tlv_system_state()
315 struct wimax_dev *wimax_dev = &i2400m->wimax_dev; in i2400m_report_tlv_system_state()
318 d_fnstart(3, dev, "(i2400m %p ss %p [%u])\n", i2400m, ss, i2400m_state); in i2400m_report_tlv_system_state()
320 if (i2400m->state != i2400m_state) { in i2400m_report_tlv_system_state()
321 i2400m->state = i2400m_state; in i2400m_report_tlv_system_state()
322 wake_up_all(&i2400m->state_wq); in i2400m_report_tlv_system_state()
365 i2400m_reset(i2400m, I2400M_RT_WARM); in i2400m_report_tlv_system_state()
369 i2400m, ss, i2400m_state); in i2400m_report_tlv_system_state()
388 void i2400m_report_tlv_media_status(struct i2400m *i2400m, in i2400m_report_tlv_media_status() argument
391 struct device *dev = i2400m_dev(i2400m); in i2400m_report_tlv_media_status()
392 struct wimax_dev *wimax_dev = &i2400m->wimax_dev; in i2400m_report_tlv_media_status()
396 d_fnstart(3, dev, "(i2400m %p ms %p [%u])\n", i2400m, ms, status); in i2400m_report_tlv_media_status()
418 i2400m, ms, status); in i2400m_report_tlv_media_status()
433 void i2400m_report_state_parse_tlv(struct i2400m *i2400m, in i2400m_report_state_parse_tlv() argument
437 struct device *dev = i2400m_dev(i2400m); in i2400m_report_state_parse_tlv()
448 i2400m_report_tlv_system_state(i2400m, ss); in i2400m_report_state_parse_tlv()
457 i2400m_report_tlv_rf_switches_status(i2400m, rfss); in i2400m_report_state_parse_tlv()
463 i2400m_report_tlv_media_status(i2400m, ms); in i2400m_report_state_parse_tlv()
481 void i2400m_report_state_hook(struct i2400m *i2400m, in i2400m_report_state_hook() argument
485 struct device *dev = i2400m_dev(i2400m); in i2400m_report_state_hook()
490 i2400m, l3l4_hdr, size, tag); in i2400m_report_state_hook()
493 while ((tlv = i2400m_tlv_buffer_walk(i2400m, &l3l4_hdr->pl, in i2400m_report_state_hook()
495 i2400m_report_state_parse_tlv(i2400m, tlv, tag); in i2400m_report_state_hook()
497 i2400m, l3l4_hdr, size, tag); in i2400m_report_state_hook()
514 void i2400m_report_hook(struct i2400m *i2400m, in i2400m_report_hook() argument
517 struct device *dev = i2400m_dev(i2400m); in i2400m_report_hook()
521 i2400m, l3l4_hdr, size); in i2400m_report_hook()
527 i2400m_report_state_hook(i2400m, in i2400m_report_hook()
541 i2400m_cmd_enter_powersave(i2400m); in i2400m_report_hook()
547 i2400m, l3l4_hdr, size); in i2400m_report_hook()
564 static void i2400m_msg_ack_hook(struct i2400m *i2400m, in i2400m_msg_ack_hook() argument
569 struct device *dev = i2400m_dev(i2400m); in i2400m_msg_ack_hook()
598 int i2400m_msg_size_check(struct i2400m *i2400m, in i2400m_msg_size_check() argument
603 struct device *dev = i2400m_dev(i2400m); in i2400m_msg_size_check()
606 i2400m, l3l4_hdr, msg_size); in i2400m_msg_size_check()
625 i2400m, l3l4_hdr, msg_size, result); in i2400m_msg_size_check()
640 void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code) in i2400m_msg_to_dev_cancel_wait() argument
645 spin_lock_irqsave(&i2400m->rx_lock, flags); in i2400m_msg_to_dev_cancel_wait()
646 ack_skb = i2400m->ack_skb; in i2400m_msg_to_dev_cancel_wait()
649 i2400m->ack_skb = ERR_PTR(code); in i2400m_msg_to_dev_cancel_wait()
650 spin_unlock_irqrestore(&i2400m->rx_lock, flags); in i2400m_msg_to_dev_cancel_wait()
705 struct sk_buff *i2400m_msg_to_dev(struct i2400m *i2400m, in i2400m_msg_to_dev() argument
709 struct device *dev = i2400m_dev(i2400m); in i2400m_msg_to_dev()
719 i2400m, buf, buf_len); in i2400m_msg_to_dev()
722 if (i2400m->boot_mode) in i2400m_msg_to_dev()
727 result = i2400m_msg_size_check(i2400m, msg_l3l4_hdr, buf_len); in i2400m_msg_to_dev()
737 mutex_lock(&i2400m->msg_mutex); in i2400m_msg_to_dev()
738 spin_lock_irqsave(&i2400m->rx_lock, flags); in i2400m_msg_to_dev()
739 i2400m->ack_skb = ERR_PTR(-EINPROGRESS); in i2400m_msg_to_dev()
740 spin_unlock_irqrestore(&i2400m->rx_lock, flags); in i2400m_msg_to_dev()
741 init_completion(&i2400m->msg_completion); in i2400m_msg_to_dev()
742 result = i2400m_tx(i2400m, buf, buf_len, I2400M_PT_CTRL); in i2400m_msg_to_dev()
760 if (unlikely(i2400m->trace_msg_from_user)) in i2400m_msg_to_dev()
761 wimax_msg(&i2400m->wimax_dev, "echo", buf, buf_len, GFP_KERNEL); in i2400m_msg_to_dev()
767 &i2400m->msg_completion, ack_timeout); in i2400m_msg_to_dev()
772 i2400m_msg_to_dev_cancel_wait(i2400m, result); in i2400m_msg_to_dev()
777 i2400m_msg_to_dev_cancel_wait(i2400m, result); in i2400m_msg_to_dev()
783 spin_lock_irqsave(&i2400m->rx_lock, flags); in i2400m_msg_to_dev()
784 ack_skb = i2400m->ack_skb; in i2400m_msg_to_dev()
789 i2400m->ack_skb = NULL; in i2400m_msg_to_dev()
790 spin_unlock_irqrestore(&i2400m->rx_lock, flags); in i2400m_msg_to_dev()
796 if (unlikely(i2400m->trace_msg_from_user)) in i2400m_msg_to_dev()
797 wimax_msg(&i2400m->wimax_dev, "echo", in i2400m_msg_to_dev()
799 result = i2400m_msg_size_check(i2400m, ack_l3l4_hdr, ack_len); in i2400m_msg_to_dev()
811 i2400m_msg_ack_hook(i2400m, ack_l3l4_hdr, ack_len); in i2400m_msg_to_dev()
812 mutex_unlock(&i2400m->msg_mutex); in i2400m_msg_to_dev()
814 i2400m, buf, buf_len, ack_skb); in i2400m_msg_to_dev()
823 mutex_unlock(&i2400m->msg_mutex); in i2400m_msg_to_dev()
826 i2400m, buf, buf_len, result); in i2400m_msg_to_dev()
861 int i2400m_cmd_enter_powersave(struct i2400m *i2400m) in i2400m_cmd_enter_powersave() argument
864 struct device *dev = i2400m_dev(i2400m); in i2400m_cmd_enter_powersave()
880 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_cmd_enter_powersave()
925 struct sk_buff *i2400m_get_device_info(struct i2400m *i2400m) in i2400m_get_device_info() argument
928 struct device *dev = i2400m_dev(i2400m); in i2400m_get_device_info()
945 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_get_device_info()
959 tlv = i2400m_tlv_find(i2400m, ack->pl, ack_len - sizeof(*ack), in i2400m_get_device_info()
1007 int i2400m_firmware_check(struct i2400m *i2400m) in i2400m_firmware_check() argument
1010 struct device *dev = i2400m_dev(i2400m); in i2400m_firmware_check()
1028 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_firmware_check()
1043 tlv = i2400m_tlv_find(i2400m, ack->pl, ack_len - sizeof(*ack), in i2400m_firmware_check()
1066 i2400m->fw_version = major << 16 | minor; in i2400m_firmware_check()
1091 int i2400m_cmd_exit_idle(struct i2400m *i2400m) in i2400m_cmd_exit_idle() argument
1094 struct device *dev = i2400m_dev(i2400m); in i2400m_cmd_exit_idle()
1107 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_cmd_exit_idle()
1139 static int i2400m_cmd_get_state(struct i2400m *i2400m) in i2400m_cmd_get_state() argument
1142 struct device *dev = i2400m_dev(i2400m); in i2400m_cmd_get_state()
1157 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_cmd_get_state()
1171 i2400m_report_state_hook(i2400m, ack, ack_len - sizeof(*ack), in i2400m_cmd_get_state()
1192 static int i2400m_set_init_config(struct i2400m *i2400m, in i2400m_set_init_config() argument
1197 struct device *dev = i2400m_dev(i2400m); in i2400m_set_init_config()
1205 d_fnstart(3, dev, "(i2400m %p arg %p args %zu)\n", i2400m, arg, args); in i2400m_set_init_config()
1238 ack_skb = i2400m_msg_to_dev(i2400m, buf, sizeof(*cmd) + argsize); in i2400m_set_init_config()
1257 i2400m, arg, args, result); in i2400m_set_init_config()
1280 int i2400m_set_idle_timeout(struct i2400m *i2400m, unsigned msecs) in i2400m_set_idle_timeout() argument
1283 struct device *dev = i2400m_dev(i2400m); in i2400m_set_idle_timeout()
1294 if (i2400m_le_v1_3(i2400m)) in i2400m_set_idle_timeout()
1309 ack_skb = i2400m_msg_to_dev(i2400m, cmd, sizeof(*cmd)); in i2400m_set_idle_timeout()
1346 int i2400m_dev_initialize(struct i2400m *i2400m) in i2400m_dev_initialize() argument
1349 struct device *dev = i2400m_dev(i2400m); in i2400m_dev_initialize()
1357 d_fnstart(3, dev, "(i2400m %p)\n", i2400m); in i2400m_dev_initialize()
1362 if (i2400m_le_v1_3(i2400m)) { in i2400m_dev_initialize()
1379 if (i2400m_ge_v1_4(i2400m)) { in i2400m_dev_initialize()
1390 if (i2400m->rx_reorder) { in i2400m_dev_initialize()
1399 result = i2400m_set_init_config(i2400m, args, argc); in i2400m_dev_initialize()
1409 result = i2400m_cmd_get_state(i2400m); in i2400m_dev_initialize()
1413 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); in i2400m_dev_initialize()
1428 void i2400m_dev_shutdown(struct i2400m *i2400m) in i2400m_dev_shutdown() argument
1430 struct device *dev = i2400m_dev(i2400m); in i2400m_dev_shutdown()
1432 d_fnstart(3, dev, "(i2400m %p)\n", i2400m); in i2400m_dev_shutdown()
1433 d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); in i2400m_dev_shutdown()