/* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef signed char __s8; typedef unsigned char __u8; typedef short __s16; typedef unsigned short __u16; typedef int __s32; typedef unsigned int __u32; typedef unsigned long long __u64; typedef signed char s8; typedef unsigned char u8; typedef short s16; typedef unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef int __kernel_pid_t; typedef __kernel_long_t __kernel_suseconds_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_time_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u32 __wsum; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef unsigned short umode_t; typedef __kernel_pid_t pid_t; typedef __kernel_clockid_t clockid_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_time_t time_t; typedef __s32 int32_t; typedef __u8 uint8_t; typedef __u16 uint16_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef unsigned long sector_t; typedef unsigned long blkcnt_t; typedef u64 dma_addr_t; typedef unsigned int gfp_t; typedef unsigned int fmode_t; typedef unsigned int oom_flags_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct callback_head { struct callback_head *next ; void (*func)(struct callback_head * ) ; }; struct device; struct ldv_thread; struct kernel_symbol { unsigned long value ; char const *name ; }; struct module; struct pt_regs { unsigned long r15 ; unsigned long r14 ; unsigned long r13 ; unsigned long r12 ; unsigned long bp ; unsigned long bx ; unsigned long r11 ; unsigned long r10 ; unsigned long r9 ; unsigned long r8 ; unsigned long ax ; unsigned long cx ; unsigned long dx ; unsigned long si ; unsigned long di ; unsigned long orig_ax ; unsigned long ip ; unsigned long cs ; unsigned long flags ; unsigned long sp ; unsigned long ss ; }; struct __anonstruct____missing_field_name_9 { unsigned int a ; unsigned int b ; }; struct __anonstruct____missing_field_name_10 { u16 limit0 ; u16 base0 ; unsigned int base1 : 8 ; unsigned int type : 4 ; unsigned int s : 1 ; unsigned int dpl : 2 ; unsigned int p : 1 ; unsigned int limit : 4 ; unsigned int avl : 1 ; unsigned int l : 1 ; unsigned int d : 1 ; unsigned int g : 1 ; unsigned int base2 : 8 ; }; union __anonunion____missing_field_name_8 { struct __anonstruct____missing_field_name_9 __annonCompField4 ; struct __anonstruct____missing_field_name_10 __annonCompField5 ; }; struct desc_struct { union __anonunion____missing_field_name_8 __annonCompField6 ; }; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct pgprot { pgprotval_t pgprot ; }; typedef struct pgprot pgprot_t; struct __anonstruct_pgd_t_12 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_12 pgd_t; struct page; typedef struct page *pgtable_t; struct file; struct seq_file; struct thread_struct; struct mm_struct; struct task_struct; struct cpumask; struct arch_spinlock; typedef u16 __ticket_t; typedef u32 __ticketpair_t; struct __raw_tickets { __ticket_t head ; __ticket_t tail ; }; union __anonunion____missing_field_name_15 { __ticketpair_t head_tail ; struct __raw_tickets tickets ; }; struct arch_spinlock { union __anonunion____missing_field_name_15 __annonCompField7 ; }; typedef struct arch_spinlock arch_spinlock_t; struct __anonstruct____missing_field_name_17 { u32 read ; s32 write ; }; union __anonunion_arch_rwlock_t_16 { s64 lock ; struct __anonstruct____missing_field_name_17 __annonCompField8 ; }; typedef union __anonunion_arch_rwlock_t_16 arch_rwlock_t; typedef void (*ctor_fn_t)(void); struct _ddebug { char const *modname ; char const *function ; char const *filename ; char const *format ; unsigned int lineno : 18 ; unsigned int flags : 8 ; }; struct net_device; struct file_operations; struct completion; struct pid; struct lockdep_map; struct kernel_vm86_regs { struct pt_regs pt ; unsigned short es ; unsigned short __esh ; unsigned short ds ; unsigned short __dsh ; unsigned short fs ; unsigned short __fsh ; unsigned short gs ; unsigned short __gsh ; }; union __anonunion____missing_field_name_18 { struct pt_regs *regs ; struct kernel_vm86_regs *vm86 ; }; struct math_emu_info { long ___orig_eip ; union __anonunion____missing_field_name_18 __annonCompField9 ; }; struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; struct cpumask { unsigned long bits[128U] ; }; typedef struct cpumask cpumask_t; typedef struct cpumask *cpumask_var_t; struct static_key; struct seq_operations; struct i387_fsave_struct { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u32 status ; }; struct __anonstruct____missing_field_name_23 { u64 rip ; u64 rdp ; }; struct __anonstruct____missing_field_name_24 { u32 fip ; u32 fcs ; u32 foo ; u32 fos ; }; union __anonunion____missing_field_name_22 { struct __anonstruct____missing_field_name_23 __annonCompField13 ; struct __anonstruct____missing_field_name_24 __annonCompField14 ; }; union __anonunion____missing_field_name_25 { u32 padding1[12U] ; u32 sw_reserved[12U] ; }; struct i387_fxsave_struct { u16 cwd ; u16 swd ; u16 twd ; u16 fop ; union __anonunion____missing_field_name_22 __annonCompField15 ; u32 mxcsr ; u32 mxcsr_mask ; u32 st_space[32U] ; u32 xmm_space[64U] ; u32 padding[12U] ; union __anonunion____missing_field_name_25 __annonCompField16 ; }; struct i387_soft_struct { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u8 ftop ; u8 changed ; u8 lookahead ; u8 no_update ; u8 rm ; u8 alimit ; struct math_emu_info *info ; u32 entry_eip ; }; struct ymmh_struct { u32 ymmh_space[64U] ; }; struct lwp_struct { u8 reserved[128U] ; }; struct bndregs_struct { u64 bndregs[8U] ; }; struct bndcsr_struct { u64 cfg_reg_u ; u64 status_reg ; }; struct xsave_hdr_struct { u64 xstate_bv ; u64 reserved1[2U] ; u64 reserved2[5U] ; }; struct xsave_struct { struct i387_fxsave_struct i387 ; struct xsave_hdr_struct xsave_hdr ; struct ymmh_struct ymmh ; struct lwp_struct lwp ; struct bndregs_struct bndregs ; struct bndcsr_struct bndcsr ; }; union thread_xstate { struct i387_fsave_struct fsave ; struct i387_fxsave_struct fxsave ; struct i387_soft_struct soft ; struct xsave_struct xsave ; }; struct fpu { unsigned int last_cpu ; unsigned int has_fpu ; union thread_xstate *state ; }; struct kmem_cache; struct perf_event; struct thread_struct { struct desc_struct tls_array[3U] ; unsigned long sp0 ; unsigned long sp ; unsigned long usersp ; unsigned short es ; unsigned short ds ; unsigned short fsindex ; unsigned short gsindex ; unsigned long fs ; unsigned long gs ; struct perf_event *ptrace_bps[4U] ; unsigned long debugreg6 ; unsigned long ptrace_dr7 ; unsigned long cr2 ; unsigned long trap_nr ; unsigned long error_code ; struct fpu fpu ; unsigned long *io_bitmap_ptr ; unsigned long iopl ; unsigned int io_bitmap_max ; unsigned char fpu_counter ; }; typedef atomic64_t atomic_long_t; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct held_lock { u64 prev_chain_key ; unsigned long acquire_ip ; struct lockdep_map *instance ; struct lockdep_map *nest_lock ; u64 waittime_stamp ; u64 holdtime_stamp ; unsigned int class_idx : 13 ; unsigned int irq_context : 2 ; unsigned int trylock : 1 ; unsigned int read : 2 ; unsigned int check : 2 ; unsigned int hardirqs_off : 1 ; unsigned int references : 11 ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct____missing_field_name_29 { u8 __padding[24U] ; struct lockdep_map dep_map ; }; union __anonunion____missing_field_name_28 { struct raw_spinlock rlock ; struct __anonstruct____missing_field_name_29 __annonCompField18 ; }; struct spinlock { union __anonunion____missing_field_name_28 __annonCompField19 ; }; typedef struct spinlock spinlock_t; struct __anonstruct_rwlock_t_30 { arch_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_30 rwlock_t; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct mutex_waiter { struct list_head list ; struct task_struct *task ; void *magic ; }; struct timespec; struct jump_entry; struct static_key_mod; struct static_key { atomic_t enabled ; struct jump_entry *entries ; struct static_key_mod *next ; }; typedef u64 jump_label_t; struct jump_entry { jump_label_t code ; jump_label_t target ; jump_label_t key ; }; struct seqcount { unsigned int sequence ; struct lockdep_map dep_map ; }; typedef struct seqcount seqcount_t; struct __anonstruct_seqlock_t_35 { struct seqcount seqcount ; spinlock_t lock ; }; typedef struct __anonstruct_seqlock_t_35 seqlock_t; struct __wait_queue; typedef struct __wait_queue wait_queue_t; struct __wait_queue { unsigned int flags ; void *private ; int (*func)(wait_queue_t * , unsigned int , int , void * ) ; struct list_head task_list ; }; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct completion { unsigned int done ; wait_queue_head_t wait ; }; struct notifier_block; struct idr_layer { int prefix ; unsigned long bitmap[4U] ; struct idr_layer *ary[256U] ; int count ; int layer ; struct callback_head callback_head ; }; struct idr { struct idr_layer *hint ; struct idr_layer *top ; struct idr_layer *id_free ; int layers ; int id_free_cnt ; int cur ; spinlock_t lock ; }; struct ida_bitmap { long nr_busy ; unsigned long bitmap[15U] ; }; struct ida { struct idr idr ; struct ida_bitmap *free_bitmap ; }; struct rb_node { unsigned long __rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; struct dentry; struct iattr; struct vm_area_struct; struct super_block; struct file_system_type; struct kernfs_open_node; struct kernfs_iattrs; struct kernfs_root; struct kernfs_elem_dir { unsigned long subdirs ; struct rb_root children ; struct kernfs_root *root ; }; struct kernfs_node; struct kernfs_elem_symlink { struct kernfs_node *target_kn ; }; struct kernfs_ops; struct kernfs_elem_attr { struct kernfs_ops const *ops ; struct kernfs_open_node *open ; loff_t size ; }; union __anonunion_u_36 { struct completion *completion ; struct kernfs_node *removed_list ; }; union __anonunion____missing_field_name_37 { struct kernfs_elem_dir dir ; struct kernfs_elem_symlink symlink ; struct kernfs_elem_attr attr ; }; struct kernfs_node { atomic_t count ; atomic_t active ; struct lockdep_map dep_map ; struct kernfs_node *parent ; char const *name ; struct rb_node rb ; union __anonunion_u_36 u ; void const *ns ; unsigned int hash ; union __anonunion____missing_field_name_37 __annonCompField21 ; void *priv ; unsigned short flags ; umode_t mode ; unsigned int ino ; struct kernfs_iattrs *iattr ; }; struct kernfs_dir_ops { int (*mkdir)(struct kernfs_node * , char const * , umode_t ) ; int (*rmdir)(struct kernfs_node * ) ; int (*rename)(struct kernfs_node * , struct kernfs_node * , char const * ) ; }; struct kernfs_root { struct kernfs_node *kn ; struct ida ino_ida ; struct kernfs_dir_ops *dir_ops ; }; struct vm_operations_struct; struct kernfs_open_file { struct kernfs_node *kn ; struct file *file ; struct mutex mutex ; int event ; struct list_head list ; bool mmapped ; struct vm_operations_struct const *vm_ops ; }; struct kernfs_ops { int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; ssize_t (*read)(struct kernfs_open_file * , char * , size_t , loff_t ) ; ssize_t (*write)(struct kernfs_open_file * , char * , size_t , loff_t ) ; int (*mmap)(struct kernfs_open_file * , struct vm_area_struct * ) ; struct lock_class_key lockdep_key ; }; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; bool (*current_may_mount)(void) ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct timespec { __kernel_time_t tv_sec ; long tv_nsec ; }; struct timeval { __kernel_time_t tv_sec ; __kernel_suseconds_t tv_usec ; }; struct user_namespace; struct __anonstruct_kuid_t_38 { uid_t val ; }; typedef struct __anonstruct_kuid_t_38 kuid_t; struct __anonstruct_kgid_t_39 { gid_t val ; }; typedef struct __anonstruct_kgid_t_39 kgid_t; struct kstat { u64 ino ; dev_t dev ; umode_t mode ; unsigned int nlink ; kuid_t uid ; kgid_t gid ; dev_t rdev ; loff_t size ; struct timespec atime ; struct timespec mtime ; struct timespec ctime ; unsigned long blksize ; unsigned long long blocks ; }; struct bin_attribute; struct attribute { char const *name ; umode_t mode ; bool ignore_lockdep : 1 ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; umode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; struct bin_attribute **bin_attrs ; }; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(struct file * , struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; }; struct kref { atomic_t refcount ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; struct tvec_base *base ; void (*function)(unsigned long ) ; unsigned long data ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct hrtimer; enum hrtimer_restart; struct workqueue_struct; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct delayed_work { struct work_struct work ; struct timer_list timer ; struct workqueue_struct *wq ; int cpu ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct kernfs_node *sd ; struct kref kref ; struct delayed_work release ; unsigned int state_initialized : 1 ; unsigned int state_in_sysfs : 1 ; unsigned int state_add_uevent_sent : 1 ; unsigned int state_remove_uevent_sent : 1 ; unsigned int uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct inode; struct cdev { struct kobject kobj ; struct module *owner ; struct file_operations const *ops ; struct list_head list ; dev_t dev ; unsigned int count ; }; struct backing_dev_info; struct plist_head { struct list_head node_list ; }; struct plist_node { int prio ; struct list_head prio_list ; struct list_head node_list ; }; struct rw_semaphore; struct rw_semaphore { long count ; raw_spinlock_t wait_lock ; struct list_head wait_list ; struct lockdep_map dep_map ; }; struct notifier_block { int (*notifier_call)(struct notifier_block * , unsigned long , void * ) ; struct notifier_block *next ; int priority ; }; struct blocking_notifier_head { struct rw_semaphore rwsem ; struct notifier_block *head ; }; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct __anonstruct_nodemask_t_40 { unsigned long bits[16U] ; }; typedef struct __anonstruct_nodemask_t_40 nodemask_t; struct path; struct seq_file { char *buf ; size_t size ; size_t from ; size_t count ; size_t pad_until ; loff_t index ; loff_t read_pos ; u64 version ; struct mutex lock ; struct seq_operations const *op ; int poll_event ; struct user_namespace *user_ns ; void *private ; }; struct seq_operations { void *(*start)(struct seq_file * , loff_t * ) ; void (*stop)(struct seq_file * , void * ) ; void *(*next)(struct seq_file * , void * , loff_t * ) ; int (*show)(struct seq_file * , void * ) ; }; struct pinctrl; struct pinctrl_state; struct dev_pin_info { struct pinctrl *p ; struct pinctrl_state *default_state ; struct pinctrl_state *sleep_state ; struct pinctrl_state *idle_state ; }; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_late)(struct device * ) ; int (*resume_early)(struct device * ) ; int (*freeze_late)(struct device * ) ; int (*thaw_early)(struct device * ) ; int (*poweroff_late)(struct device * ) ; int (*restore_early)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct pm_subsys_data { spinlock_t lock ; unsigned int refcount ; struct list_head clock_list ; }; struct dev_pm_qos; struct dev_pm_info { pm_message_t power_state ; unsigned int can_wakeup : 1 ; unsigned int async_suspend : 1 ; bool is_prepared : 1 ; bool is_suspended : 1 ; bool ignore_children : 1 ; bool early_init : 1 ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; bool wakeup_path : 1 ; bool syscore : 1 ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; atomic_t usage_count ; atomic_t child_count ; unsigned int disable_depth : 3 ; unsigned int idle_notification : 1 ; unsigned int request_pending : 1 ; unsigned int deferred_resume : 1 ; unsigned int run_wake : 1 ; unsigned int runtime_auto : 1 ; unsigned int no_callbacks : 1 ; unsigned int irq_safe : 1 ; unsigned int use_autosuspend : 1 ; unsigned int timer_autosuspends : 1 ; unsigned int memalloc_noio : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; int autosuspend_delay ; unsigned long last_busy ; unsigned long active_jiffies ; unsigned long suspended_jiffies ; unsigned long accounting_timestamp ; struct pm_subsys_data *subsys_data ; struct dev_pm_qos *qos ; }; struct dev_pm_domain { struct dev_pm_ops ops ; }; struct ctl_table; struct __anonstruct_mm_context_t_105 { void *ldt ; int size ; unsigned short ia32_compat ; struct mutex lock ; void *vdso ; }; typedef struct __anonstruct_mm_context_t_105 mm_context_t; struct device_node; struct llist_node; struct llist_node { struct llist_node *next ; }; struct dma_map_ops; struct dev_archdata { struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct iommu_ops; struct iommu_group; struct device_attribute; struct bus_type { char const *name ; char const *dev_name ; struct device *dev_root ; struct device_attribute *dev_attrs ; struct attribute_group const **bus_groups ; struct attribute_group const **dev_groups ; struct attribute_group const **drv_groups ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*online)(struct device * ) ; int (*offline)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct iommu_ops *iommu_ops ; struct subsys_private *p ; struct lock_class_key lock_key ; }; struct device_type; struct of_device_id; struct acpi_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; struct of_device_id const *of_match_table ; struct acpi_device_id const *acpi_match_table ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct attribute_group const **dev_groups ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * , kuid_t * , kgid_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct acpi_device; struct acpi_dev_node { struct acpi_device *companion ; }; struct dma_coherent_mem; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; struct dev_pm_info power ; struct dev_pm_domain *pm_domain ; struct dev_pin_info *pins ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; struct device_node *of_node ; struct acpi_dev_node acpi_node ; dev_t devt ; u32 id ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; struct iommu_group *iommu_group ; bool offline_disabled : 1 ; bool offline : 1 ; }; struct wakeup_source { char const *name ; struct list_head entry ; spinlock_t lock ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; ktime_t start_prevent_time ; ktime_t prevent_sleep_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long expire_count ; unsigned long wakeup_count ; bool active : 1 ; bool autosleep_enabled : 1 ; }; struct pm_qos_request { struct plist_node node ; int pm_qos_class ; struct delayed_work work ; }; struct pm_qos_flags_request { struct list_head node ; s32 flags ; }; enum dev_pm_qos_req_type { DEV_PM_QOS_LATENCY = 1, DEV_PM_QOS_FLAGS = 2 } ; union __anonunion_data_133 { struct plist_node pnode ; struct pm_qos_flags_request flr ; }; struct dev_pm_qos_request { enum dev_pm_qos_req_type type ; union __anonunion_data_133 data ; struct device *dev ; }; enum pm_qos_type { PM_QOS_UNITIALIZED = 0, PM_QOS_MAX = 1, PM_QOS_MIN = 2 } ; struct pm_qos_constraints { struct plist_head list ; s32 target_value ; s32 default_value ; enum pm_qos_type type ; struct blocking_notifier_head *notifiers ; }; struct pm_qos_flags { struct list_head list ; s32 effective_flags ; }; struct dev_pm_qos { struct pm_qos_constraints latency ; struct pm_qos_flags flags ; struct dev_pm_qos_request *latency_req ; struct dev_pm_qos_request *flags_req ; }; struct iovec { void *iov_base ; __kernel_size_t iov_len ; }; struct arch_uprobe_task { unsigned long saved_scratch_register ; unsigned int saved_trap_nr ; unsigned int saved_tf ; }; enum uprobe_task_state { UTASK_RUNNING = 0, UTASK_SSTEP = 1, UTASK_SSTEP_ACK = 2, UTASK_SSTEP_TRAPPED = 3 } ; struct __anonstruct____missing_field_name_136 { struct arch_uprobe_task autask ; unsigned long vaddr ; }; struct __anonstruct____missing_field_name_137 { struct callback_head dup_xol_work ; unsigned long dup_xol_addr ; }; union __anonunion____missing_field_name_135 { struct __anonstruct____missing_field_name_136 __annonCompField34 ; struct __anonstruct____missing_field_name_137 __annonCompField35 ; }; struct uprobe; struct return_instance; struct uprobe_task { enum uprobe_task_state state ; union __anonunion____missing_field_name_135 __annonCompField36 ; struct uprobe *active_uprobe ; unsigned long xol_vaddr ; struct return_instance *return_instances ; unsigned int depth ; }; struct xol_area; struct uprobes_state { struct xol_area *xol_area ; }; struct address_space; union __anonunion____missing_field_name_138 { struct address_space *mapping ; void *s_mem ; }; union __anonunion____missing_field_name_140 { unsigned long index ; void *freelist ; bool pfmemalloc ; }; struct __anonstruct____missing_field_name_144 { unsigned int inuse : 16 ; unsigned int objects : 15 ; unsigned int frozen : 1 ; }; union __anonunion____missing_field_name_143 { atomic_t _mapcount ; struct __anonstruct____missing_field_name_144 __annonCompField39 ; int units ; }; struct __anonstruct____missing_field_name_142 { union __anonunion____missing_field_name_143 __annonCompField40 ; atomic_t _count ; }; union __anonunion____missing_field_name_141 { unsigned long counters ; struct __anonstruct____missing_field_name_142 __annonCompField41 ; unsigned int active ; }; struct __anonstruct____missing_field_name_139 { union __anonunion____missing_field_name_140 __annonCompField38 ; union __anonunion____missing_field_name_141 __annonCompField42 ; }; struct __anonstruct____missing_field_name_146 { struct page *next ; int pages ; int pobjects ; }; struct slab; union __anonunion____missing_field_name_145 { struct list_head lru ; struct __anonstruct____missing_field_name_146 __annonCompField44 ; struct list_head list ; struct slab *slab_page ; struct callback_head callback_head ; pgtable_t pmd_huge_pte ; }; union __anonunion____missing_field_name_147 { unsigned long private ; spinlock_t *ptl ; struct kmem_cache *slab_cache ; struct page *first_page ; }; struct page { unsigned long flags ; union __anonunion____missing_field_name_138 __annonCompField37 ; struct __anonstruct____missing_field_name_139 __annonCompField43 ; union __anonunion____missing_field_name_145 __annonCompField45 ; union __anonunion____missing_field_name_147 __annonCompField46 ; unsigned long debug_flags ; }; struct page_frag { struct page *page ; __u32 offset ; __u32 size ; }; struct __anonstruct_linear_149 { struct rb_node rb ; unsigned long rb_subtree_last ; }; union __anonunion_shared_148 { struct __anonstruct_linear_149 linear ; struct list_head nonlinear ; }; struct anon_vma; struct mempolicy; struct vm_area_struct { unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; struct vm_area_struct *vm_prev ; struct rb_node vm_rb ; unsigned long rb_subtree_gap ; struct mm_struct *vm_mm ; pgprot_t vm_page_prot ; unsigned long vm_flags ; union __anonunion_shared_148 shared ; struct list_head anon_vma_chain ; struct anon_vma *anon_vma ; struct vm_operations_struct const *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; struct mempolicy *vm_policy ; }; struct core_thread { struct task_struct *task ; struct core_thread *next ; }; struct core_state { atomic_t nr_threads ; struct core_thread dumper ; struct completion startup ; }; struct task_rss_stat { int events ; int count[3U] ; }; struct mm_rss_stat { atomic_long_t count[3U] ; }; struct kioctx_table; struct linux_binfmt; struct mmu_notifier_mm; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; struct vm_area_struct *mmap_cache ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; unsigned long mmap_base ; unsigned long mmap_legacy_base ; unsigned long task_size ; unsigned long highest_vm_end ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; atomic_long_t nr_ptes ; int map_count ; spinlock_t page_table_lock ; struct rw_semaphore mmap_sem ; struct list_head mmlist ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long pinned_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long def_flags ; unsigned long start_code ; unsigned long end_code ; unsigned long start_data ; unsigned long end_data ; unsigned long start_brk ; unsigned long brk ; unsigned long start_stack ; unsigned long arg_start ; unsigned long arg_end ; unsigned long env_start ; unsigned long env_end ; unsigned long saved_auxv[46U] ; struct mm_rss_stat rss_stat ; struct linux_binfmt *binfmt ; cpumask_var_t cpu_vm_mask_var ; mm_context_t context ; unsigned long flags ; struct core_state *core_state ; spinlock_t ioctx_lock ; struct kioctx_table *ioctx_table ; struct task_struct *owner ; struct file *exe_file ; struct mmu_notifier_mm *mmu_notifier_mm ; struct cpumask cpumask_allocation ; unsigned long numa_next_scan ; unsigned long numa_scan_offset ; int numa_scan_seq ; bool tlb_flush_pending ; struct uprobes_state uprobes_state ; }; struct shrink_control { gfp_t gfp_mask ; unsigned long nr_to_scan ; nodemask_t nodes_to_scan ; int nid ; }; struct shrinker { unsigned long (*count_objects)(struct shrinker * , struct shrink_control * ) ; unsigned long (*scan_objects)(struct shrinker * , struct shrink_control * ) ; int seeks ; long batch ; unsigned long flags ; struct list_head list ; atomic_long_t *nr_deferred ; }; struct file_ra_state; struct user_struct; struct writeback_control; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *page ; }; struct vm_operations_struct { void (*open)(struct vm_area_struct * ) ; void (*close)(struct vm_area_struct * ) ; int (*fault)(struct vm_area_struct * , struct vm_fault * ) ; int (*page_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*access)(struct vm_area_struct * , unsigned long , void * , int , int ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; int (*migrate)(struct vm_area_struct * , nodemask_t const * , nodemask_t const * , unsigned long ) ; int (*remap_pages)(struct vm_area_struct * , unsigned long , unsigned long , unsigned long ) ; }; struct scatterlist { unsigned long sg_magic ; unsigned long page_link ; unsigned int offset ; unsigned int length ; dma_addr_t dma_address ; unsigned int dma_length ; }; struct sg_table { struct scatterlist *sgl ; unsigned int nents ; unsigned int orig_nents ; }; typedef s32 dma_cookie_t; struct dql { unsigned int num_queued ; unsigned int adj_limit ; unsigned int last_obj_cnt ; unsigned int limit ; unsigned int num_completed ; unsigned int prev_ovlimit ; unsigned int prev_num_queued ; unsigned int prev_last_obj_cnt ; unsigned int lowest_slack ; unsigned long slack_start_time ; unsigned int max_limit ; unsigned int min_limit ; unsigned int slack_hold_time ; }; struct sem_undo_list; struct sysv_sem { struct sem_undo_list *undo_list ; }; typedef unsigned short __kernel_sa_family_t; struct cred; typedef __kernel_sa_family_t sa_family_t; struct sockaddr { sa_family_t sa_family ; char sa_data[14U] ; }; struct msghdr { void *msg_name ; int msg_namelen ; struct iovec *msg_iov ; __kernel_size_t msg_iovlen ; void *msg_control ; __kernel_size_t msg_controllen ; unsigned int msg_flags ; }; struct __anonstruct_sync_serial_settings_151 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; }; typedef struct __anonstruct_sync_serial_settings_151 sync_serial_settings; struct __anonstruct_te1_settings_152 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; unsigned int slot_map ; }; typedef struct __anonstruct_te1_settings_152 te1_settings; struct __anonstruct_raw_hdlc_proto_153 { unsigned short encoding ; unsigned short parity ; }; typedef struct __anonstruct_raw_hdlc_proto_153 raw_hdlc_proto; struct __anonstruct_fr_proto_154 { unsigned int t391 ; unsigned int t392 ; unsigned int n391 ; unsigned int n392 ; unsigned int n393 ; unsigned short lmi ; unsigned short dce ; }; typedef struct __anonstruct_fr_proto_154 fr_proto; struct __anonstruct_fr_proto_pvc_155 { unsigned int dlci ; }; typedef struct __anonstruct_fr_proto_pvc_155 fr_proto_pvc; struct __anonstruct_fr_proto_pvc_info_156 { unsigned int dlci ; char master[16U] ; }; typedef struct __anonstruct_fr_proto_pvc_info_156 fr_proto_pvc_info; struct __anonstruct_cisco_proto_157 { unsigned int interval ; unsigned int timeout ; }; typedef struct __anonstruct_cisco_proto_157 cisco_proto; struct ifmap { unsigned long mem_start ; unsigned long mem_end ; unsigned short base_addr ; unsigned char irq ; unsigned char dma ; unsigned char port ; }; union __anonunion_ifs_ifsu_158 { raw_hdlc_proto *raw_hdlc ; cisco_proto *cisco ; fr_proto *fr ; fr_proto_pvc *fr_pvc ; fr_proto_pvc_info *fr_pvc_info ; sync_serial_settings *sync ; te1_settings *te1 ; }; struct if_settings { unsigned int type ; unsigned int size ; union __anonunion_ifs_ifsu_158 ifs_ifsu ; }; union __anonunion_ifr_ifrn_159 { char ifrn_name[16U] ; }; union __anonunion_ifr_ifru_160 { struct sockaddr ifru_addr ; struct sockaddr ifru_dstaddr ; struct sockaddr ifru_broadaddr ; struct sockaddr ifru_netmask ; struct sockaddr ifru_hwaddr ; short ifru_flags ; int ifru_ivalue ; int ifru_mtu ; struct ifmap ifru_map ; char ifru_slave[16U] ; char ifru_newname[16U] ; void *ifru_data ; struct if_settings ifru_settings ; }; struct ifreq { union __anonunion_ifr_ifrn_159 ifr_ifrn ; union __anonunion_ifr_ifru_160 ifr_ifru ; }; struct hlist_bl_node; struct hlist_bl_head { struct hlist_bl_node *first ; }; struct hlist_bl_node { struct hlist_bl_node *next ; struct hlist_bl_node **pprev ; }; struct __anonstruct____missing_field_name_163 { spinlock_t lock ; unsigned int count ; }; union __anonunion____missing_field_name_162 { struct __anonstruct____missing_field_name_163 __annonCompField47 ; }; struct lockref { union __anonunion____missing_field_name_162 __annonCompField48 ; }; struct nameidata; struct vfsmount; struct __anonstruct____missing_field_name_165 { u32 hash ; u32 len ; }; union __anonunion____missing_field_name_164 { struct __anonstruct____missing_field_name_165 __annonCompField49 ; u64 hash_len ; }; struct qstr { union __anonunion____missing_field_name_164 __annonCompField50 ; unsigned char const *name ; }; struct dentry_operations; union __anonunion_d_u_166 { struct list_head d_child ; struct callback_head d_rcu ; }; struct dentry { unsigned int d_flags ; seqcount_t d_seq ; struct hlist_bl_node d_hash ; struct dentry *d_parent ; struct qstr d_name ; struct inode *d_inode ; unsigned char d_iname[32U] ; struct lockref d_lockref ; struct dentry_operations const *d_op ; struct super_block *d_sb ; unsigned long d_time ; void *d_fsdata ; struct list_head d_lru ; union __anonunion_d_u_166 d_u ; struct list_head d_subdirs ; struct hlist_node d_alias ; }; struct dentry_operations { int (*d_revalidate)(struct dentry * , unsigned int ) ; int (*d_weak_revalidate)(struct dentry * , unsigned int ) ; int (*d_hash)(struct dentry const * , struct qstr * ) ; int (*d_compare)(struct dentry const * , struct dentry const * , unsigned int , char const * , struct qstr const * ) ; int (*d_delete)(struct dentry const * ) ; void (*d_release)(struct dentry * ) ; void (*d_prune)(struct dentry * ) ; void (*d_iput)(struct dentry * , struct inode * ) ; char *(*d_dname)(struct dentry * , char * , int ) ; struct vfsmount *(*d_automount)(struct path * ) ; int (*d_manage)(struct dentry * , bool ) ; }; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct list_lru_node { spinlock_t lock ; struct list_head list ; long nr_items ; }; struct list_lru { struct list_lru_node *node ; nodemask_t active_nodes ; }; struct radix_tree_node; struct radix_tree_root { unsigned int height ; gfp_t gfp_mask ; struct radix_tree_node *rnode ; }; enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; unsigned int level ; struct hlist_head tasks[3U] ; struct callback_head rcu ; struct upid numbers[1U] ; }; struct pid_link { struct hlist_node node ; struct pid *pid ; }; struct kernel_cap_struct { __u32 cap[2U] ; }; typedef struct kernel_cap_struct kernel_cap_t; struct semaphore { raw_spinlock_t lock ; unsigned int count ; struct list_head wait_list ; }; struct fiemap_extent { __u64 fe_logical ; __u64 fe_physical ; __u64 fe_length ; __u64 fe_reserved64[2U] ; __u32 fe_flags ; __u32 fe_reserved[3U] ; }; enum migrate_mode { MIGRATE_ASYNC = 0, MIGRATE_SYNC_LIGHT = 1, MIGRATE_SYNC = 2 } ; struct block_device; struct io_context; struct cgroup_subsys_state; struct export_operations; struct kiocb; struct pipe_inode_info; struct poll_table_struct; struct kstatfs; struct swap_info_struct; struct iattr { unsigned int ia_valid ; umode_t ia_mode ; kuid_t ia_uid ; kgid_t ia_gid ; loff_t ia_size ; struct timespec ia_atime ; struct timespec ia_mtime ; struct timespec ia_ctime ; struct file *ia_file ; }; struct percpu_counter { raw_spinlock_t lock ; s64 count ; struct list_head list ; s32 *counters ; }; struct fs_disk_quota { __s8 d_version ; __s8 d_flags ; __u16 d_fieldmask ; __u32 d_id ; __u64 d_blk_hardlimit ; __u64 d_blk_softlimit ; __u64 d_ino_hardlimit ; __u64 d_ino_softlimit ; __u64 d_bcount ; __u64 d_icount ; __s32 d_itimer ; __s32 d_btimer ; __u16 d_iwarns ; __u16 d_bwarns ; __s32 d_padding2 ; __u64 d_rtb_hardlimit ; __u64 d_rtb_softlimit ; __u64 d_rtbcount ; __s32 d_rtbtimer ; __u16 d_rtbwarns ; __s16 d_padding3 ; char d_padding4[8U] ; }; struct fs_qfilestat { __u64 qfs_ino ; __u64 qfs_nblks ; __u32 qfs_nextents ; }; typedef struct fs_qfilestat fs_qfilestat_t; struct fs_quota_stat { __s8 qs_version ; __u16 qs_flags ; __s8 qs_pad ; fs_qfilestat_t qs_uquota ; fs_qfilestat_t qs_gquota ; __u32 qs_incoredqs ; __s32 qs_btimelimit ; __s32 qs_itimelimit ; __s32 qs_rtbtimelimit ; __u16 qs_bwarnlimit ; __u16 qs_iwarnlimit ; }; struct fs_qfilestatv { __u64 qfs_ino ; __u64 qfs_nblks ; __u32 qfs_nextents ; __u32 qfs_pad ; }; struct fs_quota_statv { __s8 qs_version ; __u8 qs_pad1 ; __u16 qs_flags ; __u32 qs_incoredqs ; struct fs_qfilestatv qs_uquota ; struct fs_qfilestatv qs_gquota ; struct fs_qfilestatv qs_pquota ; __s32 qs_btimelimit ; __s32 qs_itimelimit ; __s32 qs_rtbtimelimit ; __u16 qs_bwarnlimit ; __u16 qs_iwarnlimit ; __u64 qs_pad2[8U] ; }; struct dquot; typedef __kernel_uid32_t projid_t; struct __anonstruct_kprojid_t_168 { projid_t val ; }; typedef struct __anonstruct_kprojid_t_168 kprojid_t; struct if_dqinfo { __u64 dqi_bgrace ; __u64 dqi_igrace ; __u32 dqi_flags ; __u32 dqi_valid ; }; enum quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 } ; typedef long long qsize_t; union __anonunion____missing_field_name_169 { kuid_t uid ; kgid_t gid ; kprojid_t projid ; }; struct kqid { union __anonunion____missing_field_name_169 __annonCompField51 ; enum quota_type type ; }; struct mem_dqblk { qsize_t dqb_bhardlimit ; qsize_t dqb_bsoftlimit ; qsize_t dqb_curspace ; qsize_t dqb_rsvspace ; qsize_t dqb_ihardlimit ; qsize_t dqb_isoftlimit ; qsize_t dqb_curinodes ; time_t dqb_btime ; time_t dqb_itime ; }; struct quota_format_type; struct mem_dqinfo { struct quota_format_type *dqi_format ; int dqi_fmt_id ; struct list_head dqi_dirty_list ; unsigned long dqi_flags ; unsigned int dqi_bgrace ; unsigned int dqi_igrace ; qsize_t dqi_maxblimit ; qsize_t dqi_maxilimit ; void *dqi_priv ; }; struct dquot { struct hlist_node dq_hash ; struct list_head dq_inuse ; struct list_head dq_free ; struct list_head dq_dirty ; struct mutex dq_lock ; atomic_t dq_count ; wait_queue_head_t dq_wait_unused ; struct super_block *dq_sb ; struct kqid dq_id ; loff_t dq_off ; unsigned long dq_flags ; struct mem_dqblk dq_dqb ; }; struct quota_format_ops { int (*check_quota_file)(struct super_block * , int ) ; int (*read_file_info)(struct super_block * , int ) ; int (*write_file_info)(struct super_block * , int ) ; int (*free_file_info)(struct super_block * , int ) ; int (*read_dqblk)(struct dquot * ) ; int (*commit_dqblk)(struct dquot * ) ; int (*release_dqblk)(struct dquot * ) ; }; struct dquot_operations { int (*write_dquot)(struct dquot * ) ; struct dquot *(*alloc_dquot)(struct super_block * , int ) ; void (*destroy_dquot)(struct dquot * ) ; int (*acquire_dquot)(struct dquot * ) ; int (*release_dquot)(struct dquot * ) ; int (*mark_dirty)(struct dquot * ) ; int (*write_info)(struct super_block * , int ) ; qsize_t *(*get_reserved_space)(struct inode * ) ; }; struct quotactl_ops { int (*quota_on)(struct super_block * , int , int , struct path * ) ; int (*quota_on_meta)(struct super_block * , int , int ) ; int (*quota_off)(struct super_block * , int ) ; int (*quota_sync)(struct super_block * , int ) ; int (*get_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*set_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*get_dqblk)(struct super_block * , struct kqid , struct fs_disk_quota * ) ; int (*set_dqblk)(struct super_block * , struct kqid , struct fs_disk_quota * ) ; int (*get_xstate)(struct super_block * , struct fs_quota_stat * ) ; int (*set_xstate)(struct super_block * , unsigned int , int ) ; int (*get_xstatev)(struct super_block * , struct fs_quota_statv * ) ; }; struct quota_format_type { int qf_fmt_id ; struct quota_format_ops const *qf_ops ; struct module *qf_owner ; struct quota_format_type *qf_next ; }; struct quota_info { unsigned int flags ; struct mutex dqio_mutex ; struct mutex dqonoff_mutex ; struct rw_semaphore dqptr_sem ; struct inode *files[2U] ; struct mem_dqinfo info[2U] ; struct quota_format_ops const *ops[2U] ; }; union __anonunion_arg_171 { char *buf ; void *data ; }; struct __anonstruct_read_descriptor_t_170 { size_t written ; size_t count ; union __anonunion_arg_171 arg ; int error ; }; typedef struct __anonstruct_read_descriptor_t_170 read_descriptor_t; struct address_space_operations { int (*writepage)(struct page * , struct writeback_control * ) ; int (*readpage)(struct file * , struct page * ) ; int (*writepages)(struct address_space * , struct writeback_control * ) ; int (*set_page_dirty)(struct page * ) ; int (*readpages)(struct file * , struct address_space * , struct list_head * , unsigned int ) ; int (*write_begin)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page ** , void ** ) ; int (*write_end)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page * , void * ) ; sector_t (*bmap)(struct address_space * , sector_t ) ; void (*invalidatepage)(struct page * , unsigned int , unsigned int ) ; int (*releasepage)(struct page * , gfp_t ) ; void (*freepage)(struct page * ) ; ssize_t (*direct_IO)(int , struct kiocb * , struct iovec const * , loff_t , unsigned long ) ; int (*get_xip_mem)(struct address_space * , unsigned long , int , void ** , unsigned long * ) ; int (*migratepage)(struct address_space * , struct page * , struct page * , enum migrate_mode ) ; int (*launder_page)(struct page * ) ; int (*is_partially_uptodate)(struct page * , read_descriptor_t * , unsigned long ) ; void (*is_dirty_writeback)(struct page * , bool * , bool * ) ; int (*error_remove_page)(struct address_space * , struct page * ) ; int (*swap_activate)(struct swap_info_struct * , struct file * , sector_t * ) ; void (*swap_deactivate)(struct file * ) ; }; struct address_space { struct inode *host ; struct radix_tree_root page_tree ; spinlock_t tree_lock ; unsigned int i_mmap_writable ; struct rb_root i_mmap ; struct list_head i_mmap_nonlinear ; struct mutex i_mmap_mutex ; unsigned long nrpages ; unsigned long writeback_index ; struct address_space_operations const *a_ops ; unsigned long flags ; struct backing_dev_info *backing_dev_info ; spinlock_t private_lock ; struct list_head private_list ; void *private_data ; }; struct request_queue; struct hd_struct; struct gendisk; struct block_device { dev_t bd_dev ; int bd_openers ; struct inode *bd_inode ; struct super_block *bd_super ; struct mutex bd_mutex ; struct list_head bd_inodes ; void *bd_claiming ; void *bd_holder ; int bd_holders ; bool bd_write_holder ; struct list_head bd_holder_disks ; struct block_device *bd_contains ; unsigned int bd_block_size ; struct hd_struct *bd_part ; unsigned int bd_part_count ; int bd_invalidated ; struct gendisk *bd_disk ; struct request_queue *bd_queue ; struct list_head bd_list ; unsigned long bd_private ; int bd_fsfreeze_count ; struct mutex bd_fsfreeze_mutex ; }; struct posix_acl; struct inode_operations; union __anonunion____missing_field_name_172 { unsigned int const i_nlink ; unsigned int __i_nlink ; }; union __anonunion____missing_field_name_173 { struct hlist_head i_dentry ; struct callback_head i_rcu ; }; struct file_lock; union __anonunion____missing_field_name_174 { struct pipe_inode_info *i_pipe ; struct block_device *i_bdev ; struct cdev *i_cdev ; }; struct inode { umode_t i_mode ; unsigned short i_opflags ; kuid_t i_uid ; kgid_t i_gid ; unsigned int i_flags ; struct posix_acl *i_acl ; struct posix_acl *i_default_acl ; struct inode_operations const *i_op ; struct super_block *i_sb ; struct address_space *i_mapping ; void *i_security ; unsigned long i_ino ; union __anonunion____missing_field_name_172 __annonCompField52 ; dev_t i_rdev ; loff_t i_size ; struct timespec i_atime ; struct timespec i_mtime ; struct timespec i_ctime ; spinlock_t i_lock ; unsigned short i_bytes ; unsigned int i_blkbits ; blkcnt_t i_blocks ; unsigned long i_state ; struct mutex i_mutex ; unsigned long dirtied_when ; struct hlist_node i_hash ; struct list_head i_wb_list ; struct list_head i_lru ; struct list_head i_sb_list ; union __anonunion____missing_field_name_173 __annonCompField53 ; u64 i_version ; atomic_t i_count ; atomic_t i_dio_count ; atomic_t i_writecount ; struct file_operations const *i_fop ; struct file_lock *i_flock ; struct address_space i_data ; struct dquot *i_dquot[2U] ; struct list_head i_devices ; union __anonunion____missing_field_name_174 __annonCompField54 ; __u32 i_generation ; __u32 i_fsnotify_mask ; struct hlist_head i_fsnotify_marks ; atomic_t i_readcount ; void *i_private ; }; struct fown_struct { rwlock_t lock ; struct pid *pid ; enum pid_type pid_type ; kuid_t uid ; kuid_t euid ; int signum ; }; struct file_ra_state { unsigned long start ; unsigned int size ; unsigned int async_size ; unsigned int ra_pages ; unsigned int mmap_miss ; loff_t prev_pos ; }; union __anonunion_f_u_175 { struct llist_node fu_llist ; struct callback_head fu_rcuhead ; }; struct file { union __anonunion_f_u_175 f_u ; struct path f_path ; struct inode *f_inode ; struct file_operations const *f_op ; spinlock_t f_lock ; atomic_long_t f_count ; unsigned int f_flags ; fmode_t f_mode ; struct mutex f_pos_lock ; loff_t f_pos ; struct fown_struct f_owner ; struct cred const *f_cred ; struct file_ra_state f_ra ; u64 f_version ; void *f_security ; void *private_data ; struct list_head f_ep_links ; struct list_head f_tfile_llink ; struct address_space *f_mapping ; unsigned long f_mnt_write_state ; }; struct files_struct; typedef struct files_struct *fl_owner_t; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; }; struct lock_manager_operations { int (*lm_compare_owner)(struct file_lock * , struct file_lock * ) ; unsigned long (*lm_owner_key)(struct file_lock * ) ; void (*lm_notify)(struct file_lock * ) ; int (*lm_grant)(struct file_lock * , struct file_lock * , int ) ; void (*lm_break)(struct file_lock * ) ; int (*lm_change)(struct file_lock ** , int ) ; }; struct net; struct nlm_lockowner; struct nfs_lock_info { u32 state ; struct nlm_lockowner *owner ; struct list_head list ; }; struct nfs4_lock_state; struct nfs4_lock_info { struct nfs4_lock_state *owner ; }; struct fasync_struct; struct __anonstruct_afs_177 { struct list_head link ; int state ; }; union __anonunion_fl_u_176 { struct nfs_lock_info nfs_fl ; struct nfs4_lock_info nfs4_fl ; struct __anonstruct_afs_177 afs ; }; struct file_lock { struct file_lock *fl_next ; struct hlist_node fl_link ; struct list_head fl_block ; fl_owner_t fl_owner ; unsigned int fl_flags ; unsigned char fl_type ; unsigned int fl_pid ; int fl_link_cpu ; struct pid *fl_nspid ; wait_queue_head_t fl_wait ; struct file *fl_file ; loff_t fl_start ; loff_t fl_end ; struct fasync_struct *fl_fasync ; unsigned long fl_break_time ; unsigned long fl_downgrade_time ; struct file_lock_operations const *fl_ops ; struct lock_manager_operations const *fl_lmops ; union __anonunion_fl_u_176 fl_u ; }; struct fasync_struct { spinlock_t fa_lock ; int magic ; int fa_fd ; struct fasync_struct *fa_next ; struct file *fa_file ; struct callback_head fa_rcu ; }; struct sb_writers { struct percpu_counter counter[3U] ; wait_queue_head_t wait ; int frozen ; wait_queue_head_t wait_unfrozen ; struct lockdep_map lock_map[3U] ; }; struct super_operations; struct xattr_handler; struct mtd_info; struct super_block { struct list_head s_list ; dev_t s_dev ; unsigned char s_blocksize_bits ; unsigned long s_blocksize ; loff_t s_maxbytes ; struct file_system_type *s_type ; struct super_operations const *s_op ; struct dquot_operations const *dq_op ; struct quotactl_ops const *s_qcop ; struct export_operations const *s_export_op ; unsigned long s_flags ; unsigned long s_magic ; struct dentry *s_root ; struct rw_semaphore s_umount ; int s_count ; atomic_t s_active ; void *s_security ; struct xattr_handler const **s_xattr ; struct list_head s_inodes ; struct hlist_bl_head s_anon ; struct list_head s_mounts ; struct block_device *s_bdev ; struct backing_dev_info *s_bdi ; struct mtd_info *s_mtd ; struct hlist_node s_instances ; struct quota_info s_dquot ; struct sb_writers s_writers ; char s_id[32U] ; u8 s_uuid[16U] ; void *s_fs_info ; unsigned int s_max_links ; fmode_t s_mode ; u32 s_time_gran ; struct mutex s_vfs_rename_mutex ; char *s_subtype ; char *s_options ; struct dentry_operations const *s_d_op ; int cleancache_poolid ; struct shrinker s_shrink ; atomic_long_t s_remove_count ; int s_readonly_remount ; struct workqueue_struct *s_dio_done_wq ; struct list_lru s_dentry_lru ; struct list_lru s_inode_lru ; struct callback_head rcu ; }; struct fiemap_extent_info { unsigned int fi_flags ; unsigned int fi_extents_mapped ; unsigned int fi_extents_max ; struct fiemap_extent *fi_extents_start ; }; struct dir_context { int (*actor)(void * , char const * , int , loff_t , u64 , unsigned int ) ; loff_t pos ; }; struct file_operations { struct module *owner ; loff_t (*llseek)(struct file * , loff_t , int ) ; ssize_t (*read)(struct file * , char * , size_t , loff_t * ) ; ssize_t (*write)(struct file * , char const * , size_t , loff_t * ) ; ssize_t (*aio_read)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; ssize_t (*aio_write)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; int (*iterate)(struct file * , struct dir_context * ) ; unsigned int (*poll)(struct file * , struct poll_table_struct * ) ; long (*unlocked_ioctl)(struct file * , unsigned int , unsigned long ) ; long (*compat_ioctl)(struct file * , unsigned int , unsigned long ) ; int (*mmap)(struct file * , struct vm_area_struct * ) ; int (*open)(struct inode * , struct file * ) ; int (*flush)(struct file * , fl_owner_t ) ; int (*release)(struct inode * , struct file * ) ; int (*fsync)(struct file * , loff_t , loff_t , int ) ; int (*aio_fsync)(struct kiocb * , int ) ; int (*fasync)(int , struct file * , int ) ; int (*lock)(struct file * , int , struct file_lock * ) ; ssize_t (*sendpage)(struct file * , struct page * , int , size_t , loff_t * , int ) ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; int (*check_flags)(int ) ; int (*flock)(struct file * , int , struct file_lock * ) ; ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t , unsigned int ) ; ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*setlease)(struct file * , long , struct file_lock ** ) ; long (*fallocate)(struct file * , int , loff_t , loff_t ) ; int (*show_fdinfo)(struct seq_file * , struct file * ) ; }; struct inode_operations { struct dentry *(*lookup)(struct inode * , struct dentry * , unsigned int ) ; void *(*follow_link)(struct dentry * , struct nameidata * ) ; int (*permission)(struct inode * , int ) ; struct posix_acl *(*get_acl)(struct inode * , int ) ; int (*readlink)(struct dentry * , char * , int ) ; void (*put_link)(struct dentry * , struct nameidata * , void * ) ; int (*create)(struct inode * , struct dentry * , umode_t , bool ) ; int (*link)(struct dentry * , struct inode * , struct dentry * ) ; int (*unlink)(struct inode * , struct dentry * ) ; int (*symlink)(struct inode * , struct dentry * , char const * ) ; int (*mkdir)(struct inode * , struct dentry * , umode_t ) ; int (*rmdir)(struct inode * , struct dentry * ) ; int (*mknod)(struct inode * , struct dentry * , umode_t , dev_t ) ; int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ; int (*setattr)(struct dentry * , struct iattr * ) ; int (*getattr)(struct vfsmount * , struct dentry * , struct kstat * ) ; int (*setxattr)(struct dentry * , char const * , void const * , size_t , int ) ; ssize_t (*getxattr)(struct dentry * , char const * , void * , size_t ) ; ssize_t (*listxattr)(struct dentry * , char * , size_t ) ; int (*removexattr)(struct dentry * , char const * ) ; int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64 , u64 ) ; int (*update_time)(struct inode * , struct timespec * , int ) ; int (*atomic_open)(struct inode * , struct dentry * , struct file * , unsigned int , umode_t , int * ) ; int (*tmpfile)(struct inode * , struct dentry * , umode_t ) ; int (*set_acl)(struct inode * , struct posix_acl * , int ) ; }; struct super_operations { struct inode *(*alloc_inode)(struct super_block * ) ; void (*destroy_inode)(struct inode * ) ; void (*dirty_inode)(struct inode * , int ) ; int (*write_inode)(struct inode * , struct writeback_control * ) ; int (*drop_inode)(struct inode * ) ; void (*evict_inode)(struct inode * ) ; void (*put_super)(struct super_block * ) ; int (*sync_fs)(struct super_block * , int ) ; int (*freeze_fs)(struct super_block * ) ; int (*unfreeze_fs)(struct super_block * ) ; int (*statfs)(struct dentry * , struct kstatfs * ) ; int (*remount_fs)(struct super_block * , int * , char * ) ; void (*umount_begin)(struct super_block * ) ; int (*show_options)(struct seq_file * , struct dentry * ) ; int (*show_devname)(struct seq_file * , struct dentry * ) ; int (*show_path)(struct seq_file * , struct dentry * ) ; int (*show_stats)(struct seq_file * , struct dentry * ) ; ssize_t (*quota_read)(struct super_block * , int , char * , size_t , loff_t ) ; ssize_t (*quota_write)(struct super_block * , int , char const * , size_t , loff_t ) ; int (*bdev_try_to_free_page)(struct super_block * , struct page * , gfp_t ) ; long (*nr_cached_objects)(struct super_block * , int ) ; long (*free_cached_objects)(struct super_block * , long , int ) ; }; struct file_system_type { char const *name ; int fs_flags ; struct dentry *(*mount)(struct file_system_type * , int , char const * , void * ) ; void (*kill_sb)(struct super_block * ) ; struct module *owner ; struct file_system_type *next ; struct hlist_head fs_supers ; struct lock_class_key s_lock_key ; struct lock_class_key s_umount_key ; struct lock_class_key s_vfs_rename_key ; struct lock_class_key s_writers_key[3U] ; struct lock_class_key i_lock_key ; struct lock_class_key i_mutex_key ; struct lock_class_key i_mutex_dir_key ; }; typedef unsigned long cputime_t; struct __anonstruct_sigset_t_178 { unsigned long sig[1U] ; }; typedef struct __anonstruct_sigset_t_178 sigset_t; struct siginfo; typedef void __signalfn_t(int ); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; union sigval { int sival_int ; void *sival_ptr ; }; typedef union sigval sigval_t; struct __anonstruct__kill_180 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; }; struct __anonstruct__timer_181 { __kernel_timer_t _tid ; int _overrun ; char _pad[0U] ; sigval_t _sigval ; int _sys_private ; }; struct __anonstruct__rt_182 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; sigval_t _sigval ; }; struct __anonstruct__sigchld_183 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; int _status ; __kernel_clock_t _utime ; __kernel_clock_t _stime ; }; struct __anonstruct__sigfault_184 { void *_addr ; short _addr_lsb ; }; struct __anonstruct__sigpoll_185 { long _band ; int _fd ; }; struct __anonstruct__sigsys_186 { void *_call_addr ; int _syscall ; unsigned int _arch ; }; union __anonunion__sifields_179 { int _pad[28U] ; struct __anonstruct__kill_180 _kill ; struct __anonstruct__timer_181 _timer ; struct __anonstruct__rt_182 _rt ; struct __anonstruct__sigchld_183 _sigchld ; struct __anonstruct__sigfault_184 _sigfault ; struct __anonstruct__sigpoll_185 _sigpoll ; struct __anonstruct__sigsys_186 _sigsys ; }; struct siginfo { int si_signo ; int si_errno ; int si_code ; union __anonunion__sifields_179 _sifields ; }; typedef struct siginfo siginfo_t; struct sigpending { struct list_head list ; sigset_t signal ; }; struct sigaction { __sighandler_t sa_handler ; unsigned long sa_flags ; __sigrestore_t sa_restorer ; sigset_t sa_mask ; }; struct k_sigaction { struct sigaction sa ; }; struct seccomp_filter; struct seccomp { int mode ; struct seccomp_filter *filter ; }; struct rt_mutex_waiter; struct rlimit { __kernel_ulong_t rlim_cur ; __kernel_ulong_t rlim_max ; }; struct timerqueue_node { struct rb_node node ; ktime_t expires ; }; struct timerqueue_head { struct rb_root head ; struct timerqueue_node *next ; }; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; struct hrtimer { struct timerqueue_node node ; ktime_t _softexpires ; enum hrtimer_restart (*function)(struct hrtimer * ) ; struct hrtimer_clock_base *base ; unsigned long state ; int start_pid ; void *start_site ; char start_comm[16U] ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; int index ; clockid_t clockid ; struct timerqueue_head active ; ktime_t resolution ; ktime_t (*get_time)(void) ; ktime_t softirq_time ; ktime_t offset ; }; struct hrtimer_cpu_base { raw_spinlock_t lock ; unsigned int active_bases ; unsigned int clock_was_set ; ktime_t expires_next ; int hres_active ; int hang_detected ; unsigned long nr_events ; unsigned long nr_retries ; unsigned long nr_hangs ; ktime_t max_hang_time ; struct hrtimer_clock_base clock_base[4U] ; }; struct task_io_accounting { u64 rchar ; u64 wchar ; u64 syscr ; u64 syscw ; u64 read_bytes ; u64 write_bytes ; u64 cancelled_write_bytes ; }; struct latency_record { unsigned long backtrace[12U] ; unsigned int count ; unsigned long time ; unsigned long max ; }; struct nsproxy; struct ctl_table_root; struct ctl_table_header; struct ctl_dir; typedef int proc_handler(struct ctl_table * , int , void * , size_t * , loff_t * ); struct ctl_table_poll { atomic_t event ; wait_queue_head_t wait ; }; struct ctl_table { char const *procname ; void *data ; int maxlen ; umode_t mode ; struct ctl_table *child ; proc_handler *proc_handler ; struct ctl_table_poll *poll ; void *extra1 ; void *extra2 ; }; struct ctl_node { struct rb_node node ; struct ctl_table_header *header ; }; struct __anonstruct____missing_field_name_190 { struct ctl_table *ctl_table ; int used ; int count ; int nreg ; }; union __anonunion____missing_field_name_189 { struct __anonstruct____missing_field_name_190 __annonCompField55 ; struct callback_head rcu ; }; struct ctl_table_set; struct ctl_table_header { union __anonunion____missing_field_name_189 __annonCompField56 ; struct completion *unregistering ; struct ctl_table *ctl_table_arg ; struct ctl_table_root *root ; struct ctl_table_set *set ; struct ctl_dir *parent ; struct ctl_node *node ; }; struct ctl_dir { struct ctl_table_header header ; struct rb_root root ; }; struct ctl_table_set { int (*is_seen)(struct ctl_table_set * ) ; struct ctl_dir dir ; }; struct ctl_table_root { struct ctl_table_set default_set ; struct ctl_table_set *(*lookup)(struct ctl_table_root * , struct nsproxy * ) ; int (*permissions)(struct ctl_table_header * , struct ctl_table * ) ; }; struct assoc_array_ptr; struct assoc_array { struct assoc_array_ptr *root ; unsigned long nr_leaves_on_tree ; }; typedef int32_t key_serial_t; typedef uint32_t key_perm_t; struct key; struct signal_struct; struct key_type; struct keyring_index_key { struct key_type *type ; char const *description ; size_t desc_len ; }; union __anonunion____missing_field_name_191 { struct list_head graveyard_link ; struct rb_node serial_node ; }; struct key_user; union __anonunion____missing_field_name_192 { time_t expiry ; time_t revoked_at ; }; struct __anonstruct____missing_field_name_194 { struct key_type *type ; char *description ; }; union __anonunion____missing_field_name_193 { struct keyring_index_key index_key ; struct __anonstruct____missing_field_name_194 __annonCompField59 ; }; union __anonunion_type_data_195 { struct list_head link ; unsigned long x[2U] ; void *p[2U] ; int reject_error ; }; union __anonunion_payload_197 { unsigned long value ; void *rcudata ; void *data ; void *data2[2U] ; }; union __anonunion____missing_field_name_196 { union __anonunion_payload_197 payload ; struct assoc_array keys ; }; struct key { atomic_t usage ; key_serial_t serial ; union __anonunion____missing_field_name_191 __annonCompField57 ; struct rw_semaphore sem ; struct key_user *user ; void *security ; union __anonunion____missing_field_name_192 __annonCompField58 ; time_t last_used_at ; kuid_t uid ; kgid_t gid ; key_perm_t perm ; unsigned short quotalen ; unsigned short datalen ; unsigned long flags ; union __anonunion____missing_field_name_193 __annonCompField60 ; union __anonunion_type_data_195 type_data ; union __anonunion____missing_field_name_196 __annonCompField61 ; }; struct audit_context; struct group_info { atomic_t usage ; int ngroups ; int nblocks ; kgid_t small_block[32U] ; kgid_t *blocks[0U] ; }; struct cred { atomic_t usage ; atomic_t subscribers ; void *put_addr ; unsigned int magic ; kuid_t uid ; kgid_t gid ; kuid_t suid ; kgid_t sgid ; kuid_t euid ; kgid_t egid ; kuid_t fsuid ; kgid_t fsgid ; unsigned int securebits ; kernel_cap_t cap_inheritable ; kernel_cap_t cap_permitted ; kernel_cap_t cap_effective ; kernel_cap_t cap_bset ; unsigned char jit_keyring ; struct key *session_keyring ; struct key *process_keyring ; struct key *thread_keyring ; struct key *request_key_auth ; void *security ; struct user_struct *user ; struct user_namespace *user_ns ; struct group_info *group_info ; struct callback_head rcu ; }; struct futex_pi_state; struct robust_list_head; struct bio_list; struct fs_struct; struct perf_event_context; struct blk_plug; struct cfs_rq; struct task_group; struct sighand_struct { atomic_t count ; struct k_sigaction action[64U] ; spinlock_t siglock ; wait_queue_head_t signalfd_wqh ; }; struct pacct_struct { int ac_flag ; long ac_exitcode ; unsigned long ac_mem ; cputime_t ac_utime ; cputime_t ac_stime ; unsigned long ac_minflt ; unsigned long ac_majflt ; }; struct cpu_itimer { cputime_t expires ; cputime_t incr ; u32 error ; u32 incr_error ; }; struct cputime { cputime_t utime ; cputime_t stime ; }; struct task_cputime { cputime_t utime ; cputime_t stime ; unsigned long long sum_exec_runtime ; }; struct thread_group_cputimer { struct task_cputime cputime ; int running ; raw_spinlock_t lock ; }; struct autogroup; struct tty_struct; struct taskstats; struct tty_audit_buf; struct signal_struct { atomic_t sigcnt ; atomic_t live ; int nr_threads ; struct list_head thread_head ; wait_queue_head_t wait_chldexit ; struct task_struct *curr_target ; struct sigpending shared_pending ; int group_exit_code ; int notify_count ; struct task_struct *group_exit_task ; int group_stop_count ; unsigned int flags ; unsigned int is_child_subreaper : 1 ; unsigned int has_child_subreaper : 1 ; int posix_timer_id ; struct list_head posix_timers ; struct hrtimer real_timer ; struct pid *leader_pid ; ktime_t it_real_incr ; struct cpu_itimer it[2U] ; struct thread_group_cputimer cputimer ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct pid *tty_old_pgrp ; int leader ; struct tty_struct *tty ; struct autogroup *autogroup ; cputime_t utime ; cputime_t stime ; cputime_t cutime ; cputime_t cstime ; cputime_t gtime ; cputime_t cgtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; unsigned long cnvcsw ; unsigned long cnivcsw ; unsigned long min_flt ; unsigned long maj_flt ; unsigned long cmin_flt ; unsigned long cmaj_flt ; unsigned long inblock ; unsigned long oublock ; unsigned long cinblock ; unsigned long coublock ; unsigned long maxrss ; unsigned long cmaxrss ; struct task_io_accounting ioac ; unsigned long long sum_sched_runtime ; struct rlimit rlim[16U] ; struct pacct_struct pacct ; struct taskstats *stats ; unsigned int audit_tty ; unsigned int audit_tty_log_passwd ; struct tty_audit_buf *tty_audit_buf ; struct rw_semaphore group_rwsem ; oom_flags_t oom_flags ; short oom_score_adj ; short oom_score_adj_min ; struct mutex cred_guard_mutex ; }; struct user_struct { atomic_t __count ; atomic_t processes ; atomic_t files ; atomic_t sigpending ; atomic_t inotify_watches ; atomic_t inotify_devs ; atomic_t fanotify_listeners ; atomic_long_t epoll_watches ; unsigned long mq_bytes ; unsigned long locked_shm ; struct key *uid_keyring ; struct key *session_keyring ; struct hlist_node uidhash_node ; kuid_t uid ; atomic_long_t locked_vm ; }; struct reclaim_state; struct sched_info { unsigned long pcount ; unsigned long long run_delay ; unsigned long long last_arrival ; unsigned long long last_queued ; }; struct task_delay_info { spinlock_t lock ; unsigned int flags ; struct timespec blkio_start ; struct timespec blkio_end ; u64 blkio_delay ; u64 swapin_delay ; u32 blkio_count ; u32 swapin_count ; struct timespec freepages_start ; struct timespec freepages_end ; u64 freepages_delay ; u32 freepages_count ; }; struct uts_namespace; struct load_weight { unsigned long weight ; u32 inv_weight ; }; struct sched_avg { u32 runnable_avg_sum ; u32 runnable_avg_period ; u64 last_runnable_update ; s64 decay_count ; unsigned long load_avg_contrib ; }; struct sched_statistics { u64 wait_start ; u64 wait_max ; u64 wait_count ; u64 wait_sum ; u64 iowait_count ; u64 iowait_sum ; u64 sleep_start ; u64 sleep_max ; s64 sum_sleep_runtime ; u64 block_start ; u64 block_max ; u64 exec_max ; u64 slice_max ; u64 nr_migrations_cold ; u64 nr_failed_migrations_affine ; u64 nr_failed_migrations_running ; u64 nr_failed_migrations_hot ; u64 nr_forced_migrations ; u64 nr_wakeups ; u64 nr_wakeups_sync ; u64 nr_wakeups_migrate ; u64 nr_wakeups_local ; u64 nr_wakeups_remote ; u64 nr_wakeups_affine ; u64 nr_wakeups_affine_attempts ; u64 nr_wakeups_passive ; u64 nr_wakeups_idle ; }; struct sched_entity { struct load_weight load ; struct rb_node run_node ; struct list_head group_node ; unsigned int on_rq ; u64 exec_start ; u64 sum_exec_runtime ; u64 vruntime ; u64 prev_sum_exec_runtime ; u64 nr_migrations ; struct sched_statistics statistics ; struct sched_entity *parent ; struct cfs_rq *cfs_rq ; struct cfs_rq *my_q ; struct sched_avg avg ; }; struct rt_rq; struct sched_rt_entity { struct list_head run_list ; unsigned long timeout ; unsigned long watchdog_stamp ; unsigned int time_slice ; struct sched_rt_entity *back ; struct sched_rt_entity *parent ; struct rt_rq *rt_rq ; struct rt_rq *my_q ; }; struct sched_dl_entity { struct rb_node rb_node ; u64 dl_runtime ; u64 dl_deadline ; u64 dl_period ; u64 dl_bw ; s64 runtime ; u64 deadline ; unsigned int flags ; int dl_throttled ; int dl_new ; int dl_boosted ; struct hrtimer dl_timer ; }; struct mem_cgroup; struct memcg_batch_info { int do_batch ; struct mem_cgroup *memcg ; unsigned long nr_pages ; unsigned long memsw_nr_pages ; }; struct memcg_oom_info { struct mem_cgroup *memcg ; gfp_t gfp_mask ; int order ; unsigned int may_oom : 1 ; }; struct sched_class; struct css_set; struct compat_robust_list_head; struct numa_group; struct ftrace_ret_stack; struct task_struct { long volatile state ; void *stack ; atomic_t usage ; unsigned int flags ; unsigned int ptrace ; struct llist_node wake_entry ; int on_cpu ; struct task_struct *last_wakee ; unsigned long wakee_flips ; unsigned long wakee_flip_decay_ts ; int wake_cpu ; int on_rq ; int prio ; int static_prio ; int normal_prio ; unsigned int rt_priority ; struct sched_class const *sched_class ; struct sched_entity se ; struct sched_rt_entity rt ; struct task_group *sched_task_group ; struct sched_dl_entity dl ; struct hlist_head preempt_notifiers ; unsigned int btrace_seq ; unsigned int policy ; int nr_cpus_allowed ; cpumask_t cpus_allowed ; struct sched_info sched_info ; struct list_head tasks ; struct plist_node pushable_tasks ; struct rb_node pushable_dl_tasks ; struct mm_struct *mm ; struct mm_struct *active_mm ; unsigned int brk_randomized : 1 ; struct task_rss_stat rss_stat ; int exit_state ; int exit_code ; int exit_signal ; int pdeath_signal ; unsigned int jobctl ; unsigned int personality ; unsigned int in_execve : 1 ; unsigned int in_iowait : 1 ; unsigned int no_new_privs : 1 ; unsigned int sched_reset_on_fork : 1 ; unsigned int sched_contributes_to_load : 1 ; pid_t pid ; pid_t tgid ; struct task_struct *real_parent ; struct task_struct *parent ; struct list_head children ; struct list_head sibling ; struct task_struct *group_leader ; struct list_head ptraced ; struct list_head ptrace_entry ; struct pid_link pids[3U] ; struct list_head thread_group ; struct list_head thread_node ; struct completion *vfork_done ; int *set_child_tid ; int *clear_child_tid ; cputime_t utime ; cputime_t stime ; cputime_t utimescaled ; cputime_t stimescaled ; cputime_t gtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; struct timespec start_time ; struct timespec real_start_time ; unsigned long min_flt ; unsigned long maj_flt ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct cred const *real_cred ; struct cred const *cred ; char comm[16U] ; int link_count ; int total_link_count ; struct sysv_sem sysvsem ; unsigned long last_switch_count ; struct thread_struct thread ; struct fs_struct *fs ; struct files_struct *files ; struct nsproxy *nsproxy ; struct signal_struct *signal ; struct sighand_struct *sighand ; sigset_t blocked ; sigset_t real_blocked ; sigset_t saved_sigmask ; struct sigpending pending ; unsigned long sas_ss_sp ; size_t sas_ss_size ; int (*notifier)(void * ) ; void *notifier_data ; sigset_t *notifier_mask ; struct callback_head *task_works ; struct audit_context *audit_context ; kuid_t loginuid ; unsigned int sessionid ; struct seccomp seccomp ; u32 parent_exec_id ; u32 self_exec_id ; spinlock_t alloc_lock ; raw_spinlock_t pi_lock ; struct rb_root pi_waiters ; struct rb_node *pi_waiters_leftmost ; struct rt_mutex_waiter *pi_blocked_on ; struct task_struct *pi_top_task ; struct mutex_waiter *blocked_on ; unsigned int irq_events ; unsigned long hardirq_enable_ip ; unsigned long hardirq_disable_ip ; unsigned int hardirq_enable_event ; unsigned int hardirq_disable_event ; int hardirqs_enabled ; int hardirq_context ; unsigned long softirq_disable_ip ; unsigned long softirq_enable_ip ; unsigned int softirq_disable_event ; unsigned int softirq_enable_event ; int softirqs_enabled ; int softirq_context ; u64 curr_chain_key ; int lockdep_depth ; unsigned int lockdep_recursion ; struct held_lock held_locks[48U] ; gfp_t lockdep_reclaim_gfp ; void *journal_info ; struct bio_list *bio_list ; struct blk_plug *plug ; struct reclaim_state *reclaim_state ; struct backing_dev_info *backing_dev_info ; struct io_context *io_context ; unsigned long ptrace_message ; siginfo_t *last_siginfo ; struct task_io_accounting ioac ; u64 acct_rss_mem1 ; u64 acct_vm_mem1 ; cputime_t acct_timexpd ; nodemask_t mems_allowed ; seqcount_t mems_allowed_seq ; int cpuset_mem_spread_rotor ; int cpuset_slab_spread_rotor ; struct css_set *cgroups ; struct list_head cg_list ; struct robust_list_head *robust_list ; struct compat_robust_list_head *compat_robust_list ; struct list_head pi_state_list ; struct futex_pi_state *pi_state_cache ; struct perf_event_context *perf_event_ctxp[2U] ; struct mutex perf_event_mutex ; struct list_head perf_event_list ; struct mempolicy *mempolicy ; short il_next ; short pref_node_fork ; int numa_scan_seq ; unsigned int numa_scan_period ; unsigned int numa_scan_period_max ; int numa_preferred_nid ; int numa_migrate_deferred ; unsigned long numa_migrate_retry ; u64 node_stamp ; struct callback_head numa_work ; struct list_head numa_entry ; struct numa_group *numa_group ; unsigned long *numa_faults ; unsigned long total_numa_faults ; unsigned long *numa_faults_buffer ; unsigned long numa_faults_locality[2U] ; unsigned long numa_pages_migrated ; struct callback_head rcu ; struct pipe_inode_info *splice_pipe ; struct page_frag task_frag ; struct task_delay_info *delays ; int make_it_fail ; int nr_dirtied ; int nr_dirtied_pause ; unsigned long dirty_paused_when ; int latency_record_count ; struct latency_record latency_record[32U] ; unsigned long timer_slack_ns ; unsigned long default_timer_slack_ns ; int curr_ret_stack ; struct ftrace_ret_stack *ret_stack ; unsigned long long ftrace_timestamp ; atomic_t trace_overrun ; atomic_t tracing_graph_pause ; unsigned long trace ; unsigned long trace_recursion ; struct memcg_batch_info memcg_batch ; unsigned int memcg_kmem_skip_account ; struct memcg_oom_info memcg_oom ; struct uprobe_task *utask ; unsigned int sequential_io ; unsigned int sequential_io_avg ; }; typedef s32 compat_long_t; typedef u32 compat_uptr_t; struct compat_robust_list { compat_uptr_t next ; }; struct compat_robust_list_head { struct compat_robust_list list ; compat_long_t futex_offset ; compat_uptr_t list_op_pending ; }; enum ldv_21641 { SS_FREE = 0, SS_UNCONNECTED = 1, SS_CONNECTING = 2, SS_CONNECTED = 3, SS_DISCONNECTING = 4 } ; typedef enum ldv_21641 socket_state; struct socket_wq { wait_queue_head_t wait ; struct fasync_struct *fasync_list ; struct callback_head rcu ; }; struct proto_ops; struct socket { socket_state state ; short type ; unsigned long flags ; struct socket_wq *wq ; struct file *file ; struct sock *sk ; struct proto_ops const *ops ; }; struct proto_ops { int family ; struct module *owner ; int (*release)(struct socket * ) ; int (*bind)(struct socket * , struct sockaddr * , int ) ; int (*connect)(struct socket * , struct sockaddr * , int , int ) ; int (*socketpair)(struct socket * , struct socket * ) ; int (*accept)(struct socket * , struct socket * , int ) ; int (*getname)(struct socket * , struct sockaddr * , int * , int ) ; unsigned int (*poll)(struct file * , struct socket * , struct poll_table_struct * ) ; int (*ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*listen)(struct socket * , int ) ; int (*shutdown)(struct socket * , int ) ; int (*setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct socket * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct socket * , int , int , char * , int * ) ; int (*sendmsg)(struct kiocb * , struct socket * , struct msghdr * , size_t ) ; int (*recvmsg)(struct kiocb * , struct socket * , struct msghdr * , size_t , int ) ; int (*mmap)(struct file * , struct socket * , struct vm_area_struct * ) ; ssize_t (*sendpage)(struct socket * , struct page * , int , size_t , int ) ; ssize_t (*splice_read)(struct socket * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*set_peek_off)(struct sock * , int ) ; }; struct kmem_cache_cpu { void **freelist ; unsigned long tid ; struct page *page ; struct page *partial ; unsigned int stat[26U] ; }; struct kmem_cache_order_objects { unsigned long x ; }; struct memcg_cache_params; struct kmem_cache_node; struct kmem_cache { struct kmem_cache_cpu *cpu_slab ; unsigned long flags ; unsigned long min_partial ; int size ; int object_size ; int offset ; int cpu_partial ; struct kmem_cache_order_objects oo ; struct kmem_cache_order_objects max ; struct kmem_cache_order_objects min ; gfp_t allocflags ; int refcount ; void (*ctor)(void * ) ; int inuse ; int align ; int reserved ; char const *name ; struct list_head list ; struct kobject kobj ; struct memcg_cache_params *memcg_params ; int max_attr_size ; int remote_node_defrag_ratio ; struct kmem_cache_node *node[1024U] ; }; struct __anonstruct____missing_field_name_214 { struct callback_head callback_head ; struct kmem_cache *memcg_caches[0U] ; }; struct __anonstruct____missing_field_name_215 { struct mem_cgroup *memcg ; struct list_head list ; struct kmem_cache *root_cache ; bool dead ; atomic_t nr_pages ; struct work_struct destroy ; }; union __anonunion____missing_field_name_213 { struct __anonstruct____missing_field_name_214 __annonCompField63 ; struct __anonstruct____missing_field_name_215 __annonCompField64 ; }; struct memcg_cache_params { bool is_root_cache ; union __anonunion____missing_field_name_213 __annonCompField65 ; }; struct exception_table_entry { int insn ; int fixup ; }; struct in6_addr; struct sk_buff; struct dma_attrs { unsigned long flags[1U] ; }; enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; struct dma_map_ops { void *(*alloc)(struct device * , size_t , dma_addr_t * , gfp_t , struct dma_attrs * ) ; void (*free)(struct device * , size_t , void * , dma_addr_t , struct dma_attrs * ) ; int (*mmap)(struct device * , struct vm_area_struct * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; int (*get_sgtable)(struct device * , struct sg_table * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; dma_addr_t (*map_page)(struct device * , struct page * , unsigned long , size_t , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_page)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ) ; int (*map_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*sync_single_for_cpu)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_for_device)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; void (*sync_sg_for_device)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; int (*mapping_error)(struct device * , dma_addr_t ) ; int (*dma_supported)(struct device * , u64 ) ; int (*set_dma_mask)(struct device * , u64 ) ; int is_phys ; }; typedef u64 netdev_features_t; struct nf_conntrack { atomic_t use ; }; struct nf_bridge_info { atomic_t use ; unsigned int mask ; struct net_device *physindev ; struct net_device *physoutdev ; unsigned long data[4U] ; }; struct sk_buff_head { struct sk_buff *next ; struct sk_buff *prev ; __u32 qlen ; spinlock_t lock ; }; typedef unsigned int sk_buff_data_t; struct sec_path; struct __anonstruct____missing_field_name_219 { __u16 csum_start ; __u16 csum_offset ; }; union __anonunion____missing_field_name_218 { __wsum csum ; struct __anonstruct____missing_field_name_219 __annonCompField67 ; }; union __anonunion____missing_field_name_220 { unsigned int napi_id ; dma_cookie_t dma_cookie ; }; union __anonunion____missing_field_name_221 { __u32 mark ; __u32 dropcount ; __u32 reserved_tailroom ; }; struct sk_buff { struct sk_buff *next ; struct sk_buff *prev ; ktime_t tstamp ; struct sock *sk ; struct net_device *dev ; char cb[48U] ; unsigned long _skb_refdst ; struct sec_path *sp ; unsigned int len ; unsigned int data_len ; __u16 mac_len ; __u16 hdr_len ; union __anonunion____missing_field_name_218 __annonCompField68 ; __u32 priority ; __u8 local_df : 1 ; __u8 cloned : 1 ; __u8 ip_summed : 2 ; __u8 nohdr : 1 ; __u8 nfctinfo : 3 ; __u8 pkt_type : 3 ; __u8 fclone : 2 ; __u8 ipvs_property : 1 ; __u8 peeked : 1 ; __u8 nf_trace : 1 ; __be16 protocol ; void (*destructor)(struct sk_buff * ) ; struct nf_conntrack *nfct ; struct nf_bridge_info *nf_bridge ; int skb_iif ; __u32 rxhash ; __be16 vlan_proto ; __u16 vlan_tci ; __u16 tc_index ; __u16 tc_verd ; __u16 queue_mapping ; __u8 ndisc_nodetype : 2 ; __u8 pfmemalloc : 1 ; __u8 ooo_okay : 1 ; __u8 l4_rxhash : 1 ; __u8 wifi_acked_valid : 1 ; __u8 wifi_acked : 1 ; __u8 no_fcs : 1 ; __u8 head_frag : 1 ; __u8 encapsulation : 1 ; union __anonunion____missing_field_name_220 __annonCompField69 ; __u32 secmark ; union __anonunion____missing_field_name_221 __annonCompField70 ; __be16 inner_protocol ; __u16 inner_transport_header ; __u16 inner_network_header ; __u16 inner_mac_header ; __u16 transport_header ; __u16 network_header ; __u16 mac_header ; sk_buff_data_t tail ; sk_buff_data_t end ; unsigned char *head ; unsigned char *data ; unsigned int truesize ; atomic_t users ; }; struct dst_entry; struct rtable; struct ethhdr { unsigned char h_dest[6U] ; unsigned char h_source[6U] ; __be16 h_proto ; }; struct ethtool_cmd { __u32 cmd ; __u32 supported ; __u32 advertising ; __u16 speed ; __u8 duplex ; __u8 port ; __u8 phy_address ; __u8 transceiver ; __u8 autoneg ; __u8 mdio_support ; __u32 maxtxpkt ; __u32 maxrxpkt ; __u16 speed_hi ; __u8 eth_tp_mdix ; __u8 eth_tp_mdix_ctrl ; __u32 lp_advertising ; __u32 reserved[2U] ; }; struct ethtool_drvinfo { __u32 cmd ; char driver[32U] ; char version[32U] ; char fw_version[32U] ; char bus_info[32U] ; char reserved1[32U] ; char reserved2[12U] ; __u32 n_priv_flags ; __u32 n_stats ; __u32 testinfo_len ; __u32 eedump_len ; __u32 regdump_len ; }; struct ethtool_wolinfo { __u32 cmd ; __u32 supported ; __u32 wolopts ; __u8 sopass[6U] ; }; struct ethtool_regs { __u32 cmd ; __u32 version ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eeprom { __u32 cmd ; __u32 magic ; __u32 offset ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eee { __u32 cmd ; __u32 supported ; __u32 advertised ; __u32 lp_advertised ; __u32 eee_active ; __u32 eee_enabled ; __u32 tx_lpi_enabled ; __u32 tx_lpi_timer ; __u32 reserved[2U] ; }; struct ethtool_modinfo { __u32 cmd ; __u32 type ; __u32 eeprom_len ; __u32 reserved[8U] ; }; struct ethtool_coalesce { __u32 cmd ; __u32 rx_coalesce_usecs ; __u32 rx_max_coalesced_frames ; __u32 rx_coalesce_usecs_irq ; __u32 rx_max_coalesced_frames_irq ; __u32 tx_coalesce_usecs ; __u32 tx_max_coalesced_frames ; __u32 tx_coalesce_usecs_irq ; __u32 tx_max_coalesced_frames_irq ; __u32 stats_block_coalesce_usecs ; __u32 use_adaptive_rx_coalesce ; __u32 use_adaptive_tx_coalesce ; __u32 pkt_rate_low ; __u32 rx_coalesce_usecs_low ; __u32 rx_max_coalesced_frames_low ; __u32 tx_coalesce_usecs_low ; __u32 tx_max_coalesced_frames_low ; __u32 pkt_rate_high ; __u32 rx_coalesce_usecs_high ; __u32 rx_max_coalesced_frames_high ; __u32 tx_coalesce_usecs_high ; __u32 tx_max_coalesced_frames_high ; __u32 rate_sample_interval ; }; struct ethtool_ringparam { __u32 cmd ; __u32 rx_max_pending ; __u32 rx_mini_max_pending ; __u32 rx_jumbo_max_pending ; __u32 tx_max_pending ; __u32 rx_pending ; __u32 rx_mini_pending ; __u32 rx_jumbo_pending ; __u32 tx_pending ; }; struct ethtool_channels { __u32 cmd ; __u32 max_rx ; __u32 max_tx ; __u32 max_other ; __u32 max_combined ; __u32 rx_count ; __u32 tx_count ; __u32 other_count ; __u32 combined_count ; }; struct ethtool_pauseparam { __u32 cmd ; __u32 autoneg ; __u32 rx_pause ; __u32 tx_pause ; }; struct ethtool_test { __u32 cmd ; __u32 flags ; __u32 reserved ; __u32 len ; __u64 data[0U] ; }; struct ethtool_stats { __u32 cmd ; __u32 n_stats ; __u64 data[0U] ; }; struct ethtool_tcpip4_spec { __be32 ip4src ; __be32 ip4dst ; __be16 psrc ; __be16 pdst ; __u8 tos ; }; struct ethtool_ah_espip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 spi ; __u8 tos ; }; struct ethtool_usrip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 l4_4_bytes ; __u8 tos ; __u8 ip_ver ; __u8 proto ; }; union ethtool_flow_union { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; struct ethhdr ether_spec ; __u8 hdata[52U] ; }; struct ethtool_flow_ext { __u8 padding[2U] ; unsigned char h_dest[6U] ; __be16 vlan_etype ; __be16 vlan_tci ; __be32 data[2U] ; }; struct ethtool_rx_flow_spec { __u32 flow_type ; union ethtool_flow_union h_u ; struct ethtool_flow_ext h_ext ; union ethtool_flow_union m_u ; struct ethtool_flow_ext m_ext ; __u64 ring_cookie ; __u32 location ; }; struct ethtool_rxnfc { __u32 cmd ; __u32 flow_type ; __u64 data ; struct ethtool_rx_flow_spec fs ; __u32 rule_cnt ; __u32 rule_locs[0U] ; }; struct ethtool_flash { __u32 cmd ; __u32 region ; char data[128U] ; }; struct ethtool_dump { __u32 cmd ; __u32 version ; __u32 flag ; __u32 len ; __u8 data[0U] ; }; struct ethtool_ts_info { __u32 cmd ; __u32 so_timestamping ; __s32 phc_index ; __u32 tx_types ; __u32 tx_reserved[3U] ; __u32 rx_filters ; __u32 rx_reserved[3U] ; }; enum ethtool_phys_id_state { ETHTOOL_ID_INACTIVE = 0, ETHTOOL_ID_ACTIVE = 1, ETHTOOL_ID_ON = 2, ETHTOOL_ID_OFF = 3 } ; struct ethtool_ops { int (*get_settings)(struct net_device * , struct ethtool_cmd * ) ; int (*set_settings)(struct net_device * , struct ethtool_cmd * ) ; void (*get_drvinfo)(struct net_device * , struct ethtool_drvinfo * ) ; int (*get_regs_len)(struct net_device * ) ; void (*get_regs)(struct net_device * , struct ethtool_regs * , void * ) ; void (*get_wol)(struct net_device * , struct ethtool_wolinfo * ) ; int (*set_wol)(struct net_device * , struct ethtool_wolinfo * ) ; u32 (*get_msglevel)(struct net_device * ) ; void (*set_msglevel)(struct net_device * , u32 ) ; int (*nway_reset)(struct net_device * ) ; u32 (*get_link)(struct net_device * ) ; int (*get_eeprom_len)(struct net_device * ) ; int (*get_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; int (*set_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; void (*get_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; int (*set_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; void (*get_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; int (*set_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; void (*self_test)(struct net_device * , struct ethtool_test * , u64 * ) ; void (*get_strings)(struct net_device * , u32 , u8 * ) ; int (*set_phys_id)(struct net_device * , enum ethtool_phys_id_state ) ; void (*get_ethtool_stats)(struct net_device * , struct ethtool_stats * , u64 * ) ; int (*begin)(struct net_device * ) ; void (*complete)(struct net_device * ) ; u32 (*get_priv_flags)(struct net_device * ) ; int (*set_priv_flags)(struct net_device * , u32 ) ; int (*get_sset_count)(struct net_device * , int ) ; int (*get_rxnfc)(struct net_device * , struct ethtool_rxnfc * , u32 * ) ; int (*set_rxnfc)(struct net_device * , struct ethtool_rxnfc * ) ; int (*flash_device)(struct net_device * , struct ethtool_flash * ) ; int (*reset)(struct net_device * , u32 * ) ; u32 (*get_rxfh_indir_size)(struct net_device * ) ; int (*get_rxfh_indir)(struct net_device * , u32 * ) ; int (*set_rxfh_indir)(struct net_device * , u32 const * ) ; void (*get_channels)(struct net_device * , struct ethtool_channels * ) ; int (*set_channels)(struct net_device * , struct ethtool_channels * ) ; int (*get_dump_flag)(struct net_device * , struct ethtool_dump * ) ; int (*get_dump_data)(struct net_device * , struct ethtool_dump * , void * ) ; int (*set_dump)(struct net_device * , struct ethtool_dump * ) ; int (*get_ts_info)(struct net_device * , struct ethtool_ts_info * ) ; int (*get_module_info)(struct net_device * , struct ethtool_modinfo * ) ; int (*get_module_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_eee)(struct net_device * , struct ethtool_eee * ) ; int (*set_eee)(struct net_device * , struct ethtool_eee * ) ; }; struct prot_inuse; struct netns_core { struct ctl_table_header *sysctl_hdr ; int sysctl_somaxconn ; struct prot_inuse *inuse ; }; struct u64_stats_sync { }; struct ipstats_mib { u64 mibs[36U] ; struct u64_stats_sync syncp ; }; struct icmp_mib { unsigned long mibs[28U] ; }; struct icmpmsg_mib { atomic_long_t mibs[512U] ; }; struct icmpv6_mib { unsigned long mibs[6U] ; }; struct icmpv6msg_mib { atomic_long_t mibs[512U] ; }; struct tcp_mib { unsigned long mibs[16U] ; }; struct udp_mib { unsigned long mibs[8U] ; }; struct linux_mib { unsigned long mibs[97U] ; }; struct linux_xfrm_mib { unsigned long mibs[29U] ; }; struct proc_dir_entry; struct netns_mib { struct tcp_mib *tcp_statistics[1U] ; struct ipstats_mib *ip_statistics[1U] ; struct linux_mib *net_statistics[1U] ; struct udp_mib *udp_statistics[1U] ; struct udp_mib *udplite_statistics[1U] ; struct icmp_mib *icmp_statistics[1U] ; struct icmpmsg_mib *icmpmsg_statistics ; struct proc_dir_entry *proc_net_devsnmp6 ; struct udp_mib *udp_stats_in6[1U] ; struct udp_mib *udplite_stats_in6[1U] ; struct ipstats_mib *ipv6_statistics[1U] ; struct icmpv6_mib *icmpv6_statistics[1U] ; struct icmpv6msg_mib *icmpv6msg_statistics ; struct linux_xfrm_mib *xfrm_statistics[1U] ; }; struct netns_unix { int sysctl_max_dgram_qlen ; struct ctl_table_header *ctl ; }; struct netns_packet { struct mutex sklist_lock ; struct hlist_head sklist ; }; struct netns_frags { int nqueues ; struct list_head lru_list ; spinlock_t lru_lock ; struct percpu_counter mem ; int timeout ; int high_thresh ; int low_thresh ; }; struct tcpm_hash_bucket; struct ipv4_devconf; struct fib_rules_ops; struct fib_table; struct local_ports { seqlock_t lock ; int range[2U] ; }; struct inet_peer_base; struct xt_table; struct netns_ipv4 { struct ctl_table_header *forw_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *ipv4_hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *xfrm4_hdr ; struct ipv4_devconf *devconf_all ; struct ipv4_devconf *devconf_dflt ; struct fib_rules_ops *rules_ops ; bool fib_has_custom_rules ; struct fib_table *fib_local ; struct fib_table *fib_main ; struct fib_table *fib_default ; int fib_num_tclassid_users ; struct hlist_head *fib_table_hash ; struct sock *fibnl ; struct sock **icmp_sk ; struct inet_peer_base *peers ; struct tcpm_hash_bucket *tcp_metrics_hash ; unsigned int tcp_metrics_hash_log ; struct netns_frags frags ; struct xt_table *iptable_filter ; struct xt_table *iptable_mangle ; struct xt_table *iptable_raw ; struct xt_table *arptable_filter ; struct xt_table *iptable_security ; struct xt_table *nat_table ; int sysctl_icmp_echo_ignore_all ; int sysctl_icmp_echo_ignore_broadcasts ; int sysctl_icmp_ignore_bogus_error_responses ; int sysctl_icmp_ratelimit ; int sysctl_icmp_ratemask ; int sysctl_icmp_errors_use_inbound_ifaddr ; struct local_ports sysctl_local_ports ; int sysctl_tcp_ecn ; int sysctl_ip_no_pmtu_disc ; int sysctl_ip_fwd_use_pmtu ; kgid_t sysctl_ping_group_range[2U] ; atomic_t dev_addr_genid ; struct list_head mr_tables ; struct fib_rules_ops *mr_rules_ops ; atomic_t rt_genid ; }; struct neighbour; struct dst_ops { unsigned short family ; __be16 protocol ; unsigned int gc_thresh ; int (*gc)(struct dst_ops * ) ; struct dst_entry *(*check)(struct dst_entry * , __u32 ) ; unsigned int (*default_advmss)(struct dst_entry const * ) ; unsigned int (*mtu)(struct dst_entry const * ) ; u32 *(*cow_metrics)(struct dst_entry * , unsigned long ) ; void (*destroy)(struct dst_entry * ) ; void (*ifdown)(struct dst_entry * , struct net_device * , int ) ; struct dst_entry *(*negative_advice)(struct dst_entry * ) ; void (*link_failure)(struct sk_buff * ) ; void (*update_pmtu)(struct dst_entry * , struct sock * , struct sk_buff * , u32 ) ; void (*redirect)(struct dst_entry * , struct sock * , struct sk_buff * ) ; int (*local_out)(struct sk_buff * ) ; struct neighbour *(*neigh_lookup)(struct dst_entry const * , struct sk_buff * , void const * ) ; struct kmem_cache *kmem_cachep ; struct percpu_counter pcpuc_entries ; }; struct netns_sysctl_ipv6 { struct ctl_table_header *hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *icmp_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *xfrm6_hdr ; int bindv6only ; int flush_delay ; int ip6_rt_max_size ; int ip6_rt_gc_min_interval ; int ip6_rt_gc_timeout ; int ip6_rt_gc_interval ; int ip6_rt_gc_elasticity ; int ip6_rt_mtu_expires ; int ip6_rt_min_advmss ; int flowlabel_consistency ; int icmpv6_time ; int anycast_src_echo_reply ; }; struct ipv6_devconf; struct rt6_info; struct rt6_statistics; struct fib6_table; struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl ; struct ipv6_devconf *devconf_all ; struct ipv6_devconf *devconf_dflt ; struct inet_peer_base *peers ; struct netns_frags frags ; struct xt_table *ip6table_filter ; struct xt_table *ip6table_mangle ; struct xt_table *ip6table_raw ; struct xt_table *ip6table_security ; struct xt_table *ip6table_nat ; struct rt6_info *ip6_null_entry ; struct rt6_statistics *rt6_stats ; struct timer_list ip6_fib_timer ; struct hlist_head *fib_table_hash ; struct fib6_table *fib6_main_tbl ; struct dst_ops ip6_dst_ops ; unsigned int ip6_rt_gc_expire ; unsigned long ip6_rt_last_gc ; struct rt6_info *ip6_prohibit_entry ; struct rt6_info *ip6_blk_hole_entry ; struct fib6_table *fib6_local_tbl ; struct fib_rules_ops *fib6_rules_ops ; struct sock **icmp_sk ; struct sock *ndisc_sk ; struct sock *tcp_sk ; struct sock *igmp_sk ; struct list_head mr6_tables ; struct fib_rules_ops *mr6_rules_ops ; atomic_t dev_addr_genid ; atomic_t rt_genid ; }; struct netns_nf_frag { struct netns_sysctl_ipv6 sysctl ; struct netns_frags frags ; }; struct sctp_mib; struct netns_sctp { struct sctp_mib *sctp_statistics[1U] ; struct proc_dir_entry *proc_net_sctp ; struct ctl_table_header *sysctl_header ; struct sock *ctl_sock ; struct list_head local_addr_list ; struct list_head addr_waitq ; struct timer_list addr_wq_timer ; struct list_head auto_asconf_splist ; spinlock_t addr_wq_lock ; spinlock_t local_addr_lock ; unsigned int rto_initial ; unsigned int rto_min ; unsigned int rto_max ; int rto_alpha ; int rto_beta ; int max_burst ; int cookie_preserve_enable ; char *sctp_hmac_alg ; unsigned int valid_cookie_life ; unsigned int sack_timeout ; unsigned int hb_interval ; int max_retrans_association ; int max_retrans_path ; int max_retrans_init ; int pf_retrans ; int sndbuf_policy ; int rcvbuf_policy ; int default_auto_asconf ; int addip_enable ; int addip_noauth ; int prsctp_enable ; int auth_enable ; int scope_policy ; int rwnd_upd_shift ; unsigned long max_autoclose ; }; struct netns_dccp { struct sock *v4_ctl_sk ; struct sock *v6_ctl_sk ; }; union __anonunion_in6_u_224 { __u8 u6_addr8[16U] ; __be16 u6_addr16[8U] ; __be32 u6_addr32[4U] ; }; struct in6_addr { union __anonunion_in6_u_224 in6_u ; }; struct nlattr; struct nf_logger; struct netns_nf { struct proc_dir_entry *proc_netfilter ; struct nf_logger const *nf_loggers[13U] ; struct ctl_table_header *nf_log_dir_header ; }; struct ebt_table; struct netns_xt { struct list_head tables[13U] ; bool notrack_deprecated_warning ; struct ebt_table *broute_table ; struct ebt_table *frame_filter ; struct ebt_table *frame_nat ; bool ulog_warn_deprecated ; bool ebt_ulog_warn_deprecated ; }; struct hlist_nulls_node; struct hlist_nulls_head { struct hlist_nulls_node *first ; }; struct hlist_nulls_node { struct hlist_nulls_node *next ; struct hlist_nulls_node **pprev ; }; struct nf_proto_net { struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; struct ctl_table_header *ctl_compat_header ; struct ctl_table *ctl_compat_table ; unsigned int users ; }; struct nf_generic_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_tcp_net { struct nf_proto_net pn ; unsigned int timeouts[14U] ; unsigned int tcp_loose ; unsigned int tcp_be_liberal ; unsigned int tcp_max_retrans ; }; struct nf_udp_net { struct nf_proto_net pn ; unsigned int timeouts[2U] ; }; struct nf_icmp_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_ip_net { struct nf_generic_net generic ; struct nf_tcp_net tcp ; struct nf_udp_net udp ; struct nf_icmp_net icmp ; struct nf_icmp_net icmpv6 ; struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; }; struct ip_conntrack_stat; struct nf_ct_event_notifier; struct nf_exp_event_notifier; struct netns_ct { atomic_t count ; unsigned int expect_count ; struct ctl_table_header *sysctl_header ; struct ctl_table_header *acct_sysctl_header ; struct ctl_table_header *tstamp_sysctl_header ; struct ctl_table_header *event_sysctl_header ; struct ctl_table_header *helper_sysctl_header ; char *slabname ; unsigned int sysctl_log_invalid ; unsigned int sysctl_events_retry_timeout ; int sysctl_events ; int sysctl_acct ; int sysctl_auto_assign_helper ; bool auto_assign_helper_warned ; int sysctl_tstamp ; int sysctl_checksum ; unsigned int htable_size ; struct kmem_cache *nf_conntrack_cachep ; struct hlist_nulls_head *hash ; struct hlist_head *expect_hash ; struct hlist_nulls_head unconfirmed ; struct hlist_nulls_head dying ; struct hlist_nulls_head tmpl ; struct ip_conntrack_stat *stat ; struct nf_ct_event_notifier *nf_conntrack_event_cb ; struct nf_exp_event_notifier *nf_expect_event_cb ; struct nf_ip_net nf_ct_proto ; unsigned int labels_used ; u8 label_words ; struct hlist_head *nat_bysource ; unsigned int nat_htable_size ; }; struct nft_af_info; struct netns_nftables { struct list_head af_info ; struct list_head commit_list ; struct nft_af_info *ipv4 ; struct nft_af_info *ipv6 ; struct nft_af_info *inet ; struct nft_af_info *arp ; struct nft_af_info *bridge ; u8 gencursor ; u8 genctr ; }; struct xfrm_policy_hash { struct hlist_head *table ; unsigned int hmask ; }; struct netns_xfrm { struct list_head state_all ; struct hlist_head *state_bydst ; struct hlist_head *state_bysrc ; struct hlist_head *state_byspi ; unsigned int state_hmask ; unsigned int state_num ; struct work_struct state_hash_work ; struct hlist_head state_gc_list ; struct work_struct state_gc_work ; struct list_head policy_all ; struct hlist_head *policy_byidx ; unsigned int policy_idx_hmask ; struct hlist_head policy_inexact[6U] ; struct xfrm_policy_hash policy_bydst[6U] ; unsigned int policy_count[6U] ; struct work_struct policy_hash_work ; struct sock *nlsk ; struct sock *nlsk_stash ; u32 sysctl_aevent_etime ; u32 sysctl_aevent_rseqth ; int sysctl_larval_drop ; u32 sysctl_acq_expires ; struct ctl_table_header *sysctl_hdr ; struct dst_ops xfrm4_dst_ops ; struct dst_ops xfrm6_dst_ops ; spinlock_t xfrm_state_lock ; spinlock_t xfrm_policy_sk_bundle_lock ; rwlock_t xfrm_policy_lock ; struct mutex xfrm_cfg_mutex ; }; struct net_generic; struct netns_ipvs; struct net { atomic_t passive ; atomic_t count ; spinlock_t rules_mod_lock ; struct list_head list ; struct list_head cleanup_list ; struct list_head exit_list ; struct user_namespace *user_ns ; unsigned int proc_inum ; struct proc_dir_entry *proc_net ; struct proc_dir_entry *proc_net_stat ; struct ctl_table_set sysctls ; struct sock *rtnl ; struct sock *genl_sock ; struct list_head dev_base_head ; struct hlist_head *dev_name_head ; struct hlist_head *dev_index_head ; unsigned int dev_base_seq ; int ifindex ; unsigned int dev_unreg_count ; struct list_head rules_ops ; struct net_device *loopback_dev ; struct netns_core core ; struct netns_mib mib ; struct netns_packet packet ; struct netns_unix unx ; struct netns_ipv4 ipv4 ; struct netns_ipv6 ipv6 ; struct netns_sctp sctp ; struct netns_dccp dccp ; struct netns_nf nf ; struct netns_xt xt ; struct netns_ct ct ; struct netns_nftables nft ; struct netns_nf_frag nf_frag ; struct sock *nfnl ; struct sock *nfnl_stash ; struct sk_buff_head wext_nlevents ; struct net_generic *gen ; struct netns_xfrm xfrm ; struct netns_ipvs *ipvs ; struct sock *diag_nlsk ; atomic_t fnhe_genid ; }; struct dsa_chip_data { struct device *mii_bus ; int sw_addr ; char *port_names[12U] ; s8 *rtable ; }; struct dsa_platform_data { struct device *netdev ; int nr_chips ; struct dsa_chip_data *chip ; }; struct dsa_switch; struct dsa_switch_tree { struct dsa_platform_data *pd ; struct net_device *master_netdev ; __be16 tag_protocol ; s8 cpu_switch ; s8 cpu_port ; int link_poll_needed ; struct work_struct link_poll_work ; struct timer_list link_poll_timer ; struct dsa_switch *ds[4U] ; }; struct dsa_switch_driver; struct mii_bus; struct dsa_switch { struct dsa_switch_tree *dst ; int index ; struct dsa_chip_data *pd ; struct dsa_switch_driver *drv ; struct mii_bus *master_mii_bus ; u32 dsa_port_mask ; u32 phys_port_mask ; struct mii_bus *slave_mii_bus ; struct net_device *ports[12U] ; }; struct dsa_switch_driver { struct list_head list ; __be16 tag_protocol ; int priv_size ; char *(*probe)(struct mii_bus * , int ) ; int (*setup)(struct dsa_switch * ) ; int (*set_addr)(struct dsa_switch * , u8 * ) ; int (*phy_read)(struct dsa_switch * , int , int ) ; int (*phy_write)(struct dsa_switch * , int , int , u16 ) ; void (*poll_link)(struct dsa_switch * ) ; void (*get_strings)(struct dsa_switch * , int , uint8_t * ) ; void (*get_ethtool_stats)(struct dsa_switch * , int , uint64_t * ) ; int (*get_sset_count)(struct dsa_switch * ) ; }; struct ieee_ets { __u8 willing ; __u8 ets_cap ; __u8 cbs ; __u8 tc_tx_bw[8U] ; __u8 tc_rx_bw[8U] ; __u8 tc_tsa[8U] ; __u8 prio_tc[8U] ; __u8 tc_reco_bw[8U] ; __u8 tc_reco_tsa[8U] ; __u8 reco_prio_tc[8U] ; }; struct ieee_maxrate { __u64 tc_maxrate[8U] ; }; struct ieee_pfc { __u8 pfc_cap ; __u8 pfc_en ; __u8 mbc ; __u16 delay ; __u64 requests[8U] ; __u64 indications[8U] ; }; struct cee_pg { __u8 willing ; __u8 error ; __u8 pg_en ; __u8 tcs_supported ; __u8 pg_bw[8U] ; __u8 prio_pg[8U] ; }; struct cee_pfc { __u8 willing ; __u8 error ; __u8 pfc_en ; __u8 tcs_supported ; }; struct dcb_app { __u8 selector ; __u8 priority ; __u16 protocol ; }; struct dcb_peer_app_info { __u8 willing ; __u8 error ; }; struct dcbnl_rtnl_ops { int (*ieee_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_setets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_getmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_setmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_getpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_setpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_getapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_setapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_delapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_peer_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_peer_getpfc)(struct net_device * , struct ieee_pfc * ) ; u8 (*getstate)(struct net_device * ) ; u8 (*setstate)(struct net_device * , u8 ) ; void (*getpermhwaddr)(struct net_device * , u8 * ) ; void (*setpgtccfgtx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgtx)(struct net_device * , int , u8 ) ; void (*setpgtccfgrx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgrx)(struct net_device * , int , u8 ) ; void (*getpgtccfgtx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgtx)(struct net_device * , int , u8 * ) ; void (*getpgtccfgrx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgrx)(struct net_device * , int , u8 * ) ; void (*setpfccfg)(struct net_device * , int , u8 ) ; void (*getpfccfg)(struct net_device * , int , u8 * ) ; u8 (*setall)(struct net_device * ) ; u8 (*getcap)(struct net_device * , int , u8 * ) ; int (*getnumtcs)(struct net_device * , int , u8 * ) ; int (*setnumtcs)(struct net_device * , int , u8 ) ; u8 (*getpfcstate)(struct net_device * ) ; void (*setpfcstate)(struct net_device * , u8 ) ; void (*getbcncfg)(struct net_device * , int , u32 * ) ; void (*setbcncfg)(struct net_device * , int , u32 ) ; void (*getbcnrp)(struct net_device * , int , u8 * ) ; void (*setbcnrp)(struct net_device * , int , u8 ) ; u8 (*setapp)(struct net_device * , u8 , u16 , u8 ) ; u8 (*getapp)(struct net_device * , u8 , u16 ) ; u8 (*getfeatcfg)(struct net_device * , int , u8 * ) ; u8 (*setfeatcfg)(struct net_device * , int , u8 ) ; u8 (*getdcbx)(struct net_device * ) ; u8 (*setdcbx)(struct net_device * , u8 ) ; int (*peer_getappinfo)(struct net_device * , struct dcb_peer_app_info * , u16 * ) ; int (*peer_getapptable)(struct net_device * , struct dcb_app * ) ; int (*cee_peer_getpg)(struct net_device * , struct cee_pg * ) ; int (*cee_peer_getpfc)(struct net_device * , struct cee_pfc * ) ; }; struct taskstats { __u16 version ; __u32 ac_exitcode ; __u8 ac_flag ; __u8 ac_nice ; __u64 cpu_count ; __u64 cpu_delay_total ; __u64 blkio_count ; __u64 blkio_delay_total ; __u64 swapin_count ; __u64 swapin_delay_total ; __u64 cpu_run_real_total ; __u64 cpu_run_virtual_total ; char ac_comm[32U] ; __u8 ac_sched ; __u8 ac_pad[3U] ; __u32 ac_uid ; __u32 ac_gid ; __u32 ac_pid ; __u32 ac_ppid ; __u32 ac_btime ; __u64 ac_etime ; __u64 ac_utime ; __u64 ac_stime ; __u64 ac_minflt ; __u64 ac_majflt ; __u64 coremem ; __u64 virtmem ; __u64 hiwater_rss ; __u64 hiwater_vm ; __u64 read_char ; __u64 write_char ; __u64 read_syscalls ; __u64 write_syscalls ; __u64 read_bytes ; __u64 write_bytes ; __u64 cancelled_write_bytes ; __u64 nvcsw ; __u64 nivcsw ; __u64 ac_utimescaled ; __u64 ac_stimescaled ; __u64 cpu_scaled_run_real_total ; __u64 freepages_count ; __u64 freepages_delay_total ; }; struct xattr_handler { char const *prefix ; int flags ; size_t (*list)(struct dentry * , char * , size_t , char const * , size_t , int ) ; int (*get)(struct dentry * , char const * , void * , size_t , int ) ; int (*set)(struct dentry * , char const * , void const * , size_t , int , int ) ; }; struct simple_xattrs { struct list_head head ; spinlock_t lock ; }; struct percpu_ref; typedef void percpu_ref_func_t(struct percpu_ref * ); struct percpu_ref { atomic_t count ; unsigned int *pcpu_count ; percpu_ref_func_t *release ; percpu_ref_func_t *confirm_kill ; struct callback_head rcu ; }; struct cgroupfs_root; struct cgroup_subsys; struct cgroup; struct cgroup_subsys_state { struct cgroup *cgroup ; struct cgroup_subsys *ss ; struct percpu_ref refcnt ; struct cgroup_subsys_state *parent ; unsigned long flags ; struct callback_head callback_head ; struct work_struct destroy_work ; }; struct cgroup_name { struct callback_head callback_head ; char name[] ; }; struct cgroup { unsigned long flags ; int id ; int nr_css ; struct list_head sibling ; struct list_head children ; struct list_head files ; struct cgroup *parent ; struct dentry *dentry ; u64 serial_nr ; struct cgroup_name *name ; struct cgroup_subsys_state *subsys[12U] ; struct cgroupfs_root *root ; struct list_head cset_links ; struct list_head release_list ; struct list_head pidlists ; struct mutex pidlist_mutex ; struct cgroup_subsys_state dummy_css ; struct callback_head callback_head ; struct work_struct destroy_work ; struct simple_xattrs xattrs ; }; struct cgroupfs_root { struct super_block *sb ; unsigned long subsys_mask ; int hierarchy_id ; struct cgroup top_cgroup ; int number_of_cgroups ; struct list_head root_list ; unsigned long flags ; struct idr cgroup_idr ; char release_agent_path[4096U] ; char name[64U] ; }; struct css_set { atomic_t refcount ; struct hlist_node hlist ; struct list_head tasks ; struct list_head cgrp_links ; struct cgroup_subsys_state *subsys[12U] ; struct callback_head callback_head ; }; struct cftype { char name[64U] ; int private ; umode_t mode ; size_t max_write_len ; unsigned int flags ; struct cgroup_subsys *ss ; u64 (*read_u64)(struct cgroup_subsys_state * , struct cftype * ) ; s64 (*read_s64)(struct cgroup_subsys_state * , struct cftype * ) ; int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; int (*write_u64)(struct cgroup_subsys_state * , struct cftype * , u64 ) ; int (*write_s64)(struct cgroup_subsys_state * , struct cftype * , s64 ) ; int (*write_string)(struct cgroup_subsys_state * , struct cftype * , char const * ) ; int (*trigger)(struct cgroup_subsys_state * , unsigned int ) ; }; struct cftype_set { struct list_head node ; struct cftype *cfts ; }; struct cgroup_taskset; struct cgroup_subsys { struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state * ) ; int (*css_online)(struct cgroup_subsys_state * ) ; void (*css_offline)(struct cgroup_subsys_state * ) ; void (*css_free)(struct cgroup_subsys_state * ) ; int (*can_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*cancel_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*fork)(struct task_struct * ) ; void (*exit)(struct cgroup_subsys_state * , struct cgroup_subsys_state * , struct task_struct * ) ; void (*bind)(struct cgroup_subsys_state * ) ; int subsys_id ; int disabled ; int early_init ; bool broken_hierarchy ; bool warned_broken_hierarchy ; char const *name ; struct cgroupfs_root *root ; struct list_head cftsets ; struct cftype *base_cftypes ; struct cftype_set base_cftset ; struct module *module ; }; struct netprio_map { struct callback_head rcu ; u32 priomap_len ; u32 priomap[] ; }; struct xfrm_policy; struct xfrm_state; struct mnt_namespace; struct ipc_namespace; struct nsproxy { atomic_t count ; struct uts_namespace *uts_ns ; struct ipc_namespace *ipc_ns ; struct mnt_namespace *mnt_ns ; struct pid_namespace *pid_ns_for_children ; struct net *net_ns ; }; struct nlmsghdr { __u32 nlmsg_len ; __u16 nlmsg_type ; __u16 nlmsg_flags ; __u32 nlmsg_seq ; __u32 nlmsg_pid ; }; struct nlattr { __u16 nla_len ; __u16 nla_type ; }; struct netlink_callback { struct sk_buff *skb ; struct nlmsghdr const *nlh ; int (*dump)(struct sk_buff * , struct netlink_callback * ) ; int (*done)(struct netlink_callback * ) ; void *data ; struct module *module ; u16 family ; u16 min_dump_alloc ; unsigned int prev_seq ; unsigned int seq ; long args[6U] ; }; struct ndmsg { __u8 ndm_family ; __u8 ndm_pad1 ; __u16 ndm_pad2 ; __s32 ndm_ifindex ; __u16 ndm_state ; __u8 ndm_flags ; __u8 ndm_type ; }; struct rtnl_link_stats64 { __u64 rx_packets ; __u64 tx_packets ; __u64 rx_bytes ; __u64 tx_bytes ; __u64 rx_errors ; __u64 tx_errors ; __u64 rx_dropped ; __u64 tx_dropped ; __u64 multicast ; __u64 collisions ; __u64 rx_length_errors ; __u64 rx_over_errors ; __u64 rx_crc_errors ; __u64 rx_frame_errors ; __u64 rx_fifo_errors ; __u64 rx_missed_errors ; __u64 tx_aborted_errors ; __u64 tx_carrier_errors ; __u64 tx_fifo_errors ; __u64 tx_heartbeat_errors ; __u64 tx_window_errors ; __u64 rx_compressed ; __u64 tx_compressed ; }; struct ifla_vf_info { __u32 vf ; __u8 mac[32U] ; __u32 vlan ; __u32 qos ; __u32 tx_rate ; __u32 spoofchk ; __u32 linkstate ; }; struct netpoll_info; struct phy_device; struct wireless_dev; enum netdev_tx { __NETDEV_TX_MIN = (-0x7FFFFFFF-1), NETDEV_TX_OK = 0, NETDEV_TX_BUSY = 16, NETDEV_TX_LOCKED = 32 } ; typedef enum netdev_tx netdev_tx_t; struct net_device_stats { unsigned long rx_packets ; unsigned long tx_packets ; unsigned long rx_bytes ; unsigned long tx_bytes ; unsigned long rx_errors ; unsigned long tx_errors ; unsigned long rx_dropped ; unsigned long tx_dropped ; unsigned long multicast ; unsigned long collisions ; unsigned long rx_length_errors ; unsigned long rx_over_errors ; unsigned long rx_crc_errors ; unsigned long rx_frame_errors ; unsigned long rx_fifo_errors ; unsigned long rx_missed_errors ; unsigned long tx_aborted_errors ; unsigned long tx_carrier_errors ; unsigned long tx_fifo_errors ; unsigned long tx_heartbeat_errors ; unsigned long tx_window_errors ; unsigned long rx_compressed ; unsigned long tx_compressed ; }; struct neigh_parms; struct netdev_hw_addr_list { struct list_head list ; int count ; }; struct hh_cache { u16 hh_len ; u16 __pad ; seqlock_t hh_lock ; unsigned long hh_data[16U] ; }; struct header_ops { int (*create)(struct sk_buff * , struct net_device * , unsigned short , void const * , void const * , unsigned int ) ; int (*parse)(struct sk_buff const * , unsigned char * ) ; int (*rebuild)(struct sk_buff * ) ; int (*cache)(struct neighbour const * , struct hh_cache * , __be16 ) ; void (*cache_update)(struct hh_cache * , struct net_device const * , unsigned char const * ) ; }; struct napi_struct { struct list_head poll_list ; unsigned long state ; int weight ; unsigned int gro_count ; int (*poll)(struct napi_struct * , int ) ; spinlock_t poll_lock ; int poll_owner ; struct net_device *dev ; struct sk_buff *gro_list ; struct sk_buff *skb ; struct list_head dev_list ; struct hlist_node napi_hash_node ; unsigned int napi_id ; }; enum rx_handler_result { RX_HANDLER_CONSUMED = 0, RX_HANDLER_ANOTHER = 1, RX_HANDLER_EXACT = 2, RX_HANDLER_PASS = 3 } ; typedef enum rx_handler_result rx_handler_result_t; typedef rx_handler_result_t rx_handler_func_t(struct sk_buff ** ); struct Qdisc; struct netdev_queue { struct net_device *dev ; struct Qdisc *qdisc ; struct Qdisc *qdisc_sleeping ; struct kobject kobj ; int numa_node ; spinlock_t _xmit_lock ; int xmit_lock_owner ; unsigned long trans_start ; unsigned long trans_timeout ; unsigned long state ; struct dql dql ; }; struct rps_map { unsigned int len ; struct callback_head rcu ; u16 cpus[0U] ; }; struct rps_dev_flow { u16 cpu ; u16 filter ; unsigned int last_qtail ; }; struct rps_dev_flow_table { unsigned int mask ; struct callback_head rcu ; struct rps_dev_flow flows[0U] ; }; struct netdev_rx_queue { struct rps_map *rps_map ; struct rps_dev_flow_table *rps_flow_table ; struct kobject kobj ; struct net_device *dev ; }; struct xps_map { unsigned int len ; unsigned int alloc_len ; struct callback_head rcu ; u16 queues[0U] ; }; struct xps_dev_maps { struct callback_head rcu ; struct xps_map *cpu_map[0U] ; }; struct netdev_tc_txq { u16 count ; u16 offset ; }; struct netdev_fcoe_hbainfo { char manufacturer[64U] ; char serial_number[64U] ; char hardware_version[64U] ; char driver_version[64U] ; char optionrom_version[64U] ; char firmware_version[64U] ; char model[256U] ; char model_description[256U] ; }; struct netdev_phys_port_id { unsigned char id[32U] ; unsigned char id_len ; }; struct net_device_ops { int (*ndo_init)(struct net_device * ) ; void (*ndo_uninit)(struct net_device * ) ; int (*ndo_open)(struct net_device * ) ; int (*ndo_stop)(struct net_device * ) ; netdev_tx_t (*ndo_start_xmit)(struct sk_buff * , struct net_device * ) ; u16 (*ndo_select_queue)(struct net_device * , struct sk_buff * , void * , u16 (*)(struct net_device * , struct sk_buff * ) ) ; void (*ndo_change_rx_flags)(struct net_device * , int ) ; void (*ndo_set_rx_mode)(struct net_device * ) ; int (*ndo_set_mac_address)(struct net_device * , void * ) ; int (*ndo_validate_addr)(struct net_device * ) ; int (*ndo_do_ioctl)(struct net_device * , struct ifreq * , int ) ; int (*ndo_set_config)(struct net_device * , struct ifmap * ) ; int (*ndo_change_mtu)(struct net_device * , int ) ; int (*ndo_neigh_setup)(struct net_device * , struct neigh_parms * ) ; void (*ndo_tx_timeout)(struct net_device * ) ; struct rtnl_link_stats64 *(*ndo_get_stats64)(struct net_device * , struct rtnl_link_stats64 * ) ; struct net_device_stats *(*ndo_get_stats)(struct net_device * ) ; int (*ndo_vlan_rx_add_vid)(struct net_device * , __be16 , u16 ) ; int (*ndo_vlan_rx_kill_vid)(struct net_device * , __be16 , u16 ) ; void (*ndo_poll_controller)(struct net_device * ) ; int (*ndo_netpoll_setup)(struct net_device * , struct netpoll_info * , gfp_t ) ; void (*ndo_netpoll_cleanup)(struct net_device * ) ; int (*ndo_busy_poll)(struct napi_struct * ) ; int (*ndo_set_vf_mac)(struct net_device * , int , u8 * ) ; int (*ndo_set_vf_vlan)(struct net_device * , int , u16 , u8 ) ; int (*ndo_set_vf_tx_rate)(struct net_device * , int , int ) ; int (*ndo_set_vf_spoofchk)(struct net_device * , int , bool ) ; int (*ndo_get_vf_config)(struct net_device * , int , struct ifla_vf_info * ) ; int (*ndo_set_vf_link_state)(struct net_device * , int , int ) ; int (*ndo_set_vf_port)(struct net_device * , int , struct nlattr ** ) ; int (*ndo_get_vf_port)(struct net_device * , int , struct sk_buff * ) ; int (*ndo_setup_tc)(struct net_device * , u8 ) ; int (*ndo_fcoe_enable)(struct net_device * ) ; int (*ndo_fcoe_disable)(struct net_device * ) ; int (*ndo_fcoe_ddp_setup)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_ddp_done)(struct net_device * , u16 ) ; int (*ndo_fcoe_ddp_target)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_get_hbainfo)(struct net_device * , struct netdev_fcoe_hbainfo * ) ; int (*ndo_fcoe_get_wwn)(struct net_device * , u64 * , int ) ; int (*ndo_rx_flow_steer)(struct net_device * , struct sk_buff const * , u16 , u32 ) ; int (*ndo_add_slave)(struct net_device * , struct net_device * ) ; int (*ndo_del_slave)(struct net_device * , struct net_device * ) ; netdev_features_t (*ndo_fix_features)(struct net_device * , netdev_features_t ) ; int (*ndo_set_features)(struct net_device * , netdev_features_t ) ; int (*ndo_neigh_construct)(struct neighbour * ) ; void (*ndo_neigh_destroy)(struct neighbour * ) ; int (*ndo_fdb_add)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * , u16 ) ; int (*ndo_fdb_del)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * ) ; int (*ndo_fdb_dump)(struct sk_buff * , struct netlink_callback * , struct net_device * , int ) ; int (*ndo_bridge_setlink)(struct net_device * , struct nlmsghdr * ) ; int (*ndo_bridge_getlink)(struct sk_buff * , u32 , u32 , struct net_device * , u32 ) ; int (*ndo_bridge_dellink)(struct net_device * , struct nlmsghdr * ) ; int (*ndo_change_carrier)(struct net_device * , bool ) ; int (*ndo_get_phys_port_id)(struct net_device * , struct netdev_phys_port_id * ) ; void (*ndo_add_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void (*ndo_del_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void *(*ndo_dfwd_add_station)(struct net_device * , struct net_device * ) ; void (*ndo_dfwd_del_station)(struct net_device * , void * ) ; netdev_tx_t (*ndo_dfwd_start_xmit)(struct sk_buff * , struct net_device * , void * ) ; }; enum ldv_27999 { NETREG_UNINITIALIZED = 0, NETREG_REGISTERED = 1, NETREG_UNREGISTERING = 2, NETREG_UNREGISTERED = 3, NETREG_RELEASED = 4, NETREG_DUMMY = 5 } ; enum ldv_28000 { RTNL_LINK_INITIALIZED = 0, RTNL_LINK_INITIALIZING = 1 } ; struct __anonstruct_adj_list_235 { struct list_head upper ; struct list_head lower ; }; struct __anonstruct_all_adj_list_236 { struct list_head upper ; struct list_head lower ; }; struct iw_handler_def; struct iw_public_data; struct forwarding_accel_ops; struct vlan_info; struct tipc_bearer; struct in_device; struct dn_dev; struct inet6_dev; struct cpu_rmap; struct pcpu_lstats; struct pcpu_sw_netstats; struct pcpu_dstats; struct pcpu_vstats; union __anonunion____missing_field_name_237 { void *ml_priv ; struct pcpu_lstats *lstats ; struct pcpu_sw_netstats *tstats ; struct pcpu_dstats *dstats ; struct pcpu_vstats *vstats ; }; struct garp_port; struct mrp_port; struct rtnl_link_ops; struct net_device { char name[16U] ; struct hlist_node name_hlist ; char *ifalias ; unsigned long mem_end ; unsigned long mem_start ; unsigned long base_addr ; int irq ; unsigned long state ; struct list_head dev_list ; struct list_head napi_list ; struct list_head unreg_list ; struct list_head close_list ; struct __anonstruct_adj_list_235 adj_list ; struct __anonstruct_all_adj_list_236 all_adj_list ; netdev_features_t features ; netdev_features_t hw_features ; netdev_features_t wanted_features ; netdev_features_t vlan_features ; netdev_features_t hw_enc_features ; netdev_features_t mpls_features ; int ifindex ; int iflink ; struct net_device_stats stats ; atomic_long_t rx_dropped ; struct iw_handler_def const *wireless_handlers ; struct iw_public_data *wireless_data ; struct net_device_ops const *netdev_ops ; struct ethtool_ops const *ethtool_ops ; struct forwarding_accel_ops const *fwd_ops ; struct header_ops const *header_ops ; unsigned int flags ; unsigned int priv_flags ; unsigned short gflags ; unsigned short padded ; unsigned char operstate ; unsigned char link_mode ; unsigned char if_port ; unsigned char dma ; unsigned int mtu ; unsigned short type ; unsigned short hard_header_len ; unsigned short needed_headroom ; unsigned short needed_tailroom ; unsigned char perm_addr[32U] ; unsigned char addr_assign_type ; unsigned char addr_len ; unsigned short neigh_priv_len ; unsigned short dev_id ; spinlock_t addr_list_lock ; struct netdev_hw_addr_list uc ; struct netdev_hw_addr_list mc ; struct netdev_hw_addr_list dev_addrs ; struct kset *queues_kset ; bool uc_promisc ; unsigned int promiscuity ; unsigned int allmulti ; struct vlan_info *vlan_info ; struct dsa_switch_tree *dsa_ptr ; struct tipc_bearer *tipc_ptr ; void *atalk_ptr ; struct in_device *ip_ptr ; struct dn_dev *dn_ptr ; struct inet6_dev *ip6_ptr ; void *ax25_ptr ; struct wireless_dev *ieee80211_ptr ; unsigned long last_rx ; unsigned char *dev_addr ; struct netdev_rx_queue *_rx ; unsigned int num_rx_queues ; unsigned int real_num_rx_queues ; rx_handler_func_t *rx_handler ; void *rx_handler_data ; struct netdev_queue *ingress_queue ; unsigned char broadcast[32U] ; struct netdev_queue *_tx ; unsigned int num_tx_queues ; unsigned int real_num_tx_queues ; struct Qdisc *qdisc ; unsigned long tx_queue_len ; spinlock_t tx_global_lock ; struct xps_dev_maps *xps_maps ; struct cpu_rmap *rx_cpu_rmap ; unsigned long trans_start ; int watchdog_timeo ; struct timer_list watchdog_timer ; int *pcpu_refcnt ; struct list_head todo_list ; struct hlist_node index_hlist ; struct list_head link_watch_list ; enum ldv_27999 reg_state : 8 ; bool dismantle ; enum ldv_28000 rtnl_link_state : 16 ; void (*destructor)(struct net_device * ) ; struct netpoll_info *npinfo ; struct net *nd_net ; union __anonunion____missing_field_name_237 __annonCompField74 ; struct garp_port *garp_port ; struct mrp_port *mrp_port ; struct device dev ; struct attribute_group const *sysfs_groups[4U] ; struct attribute_group const *sysfs_rx_queue_group ; struct rtnl_link_ops const *rtnl_link_ops ; unsigned int gso_max_size ; u16 gso_max_segs ; struct dcbnl_rtnl_ops const *dcbnl_ops ; u8 num_tc ; struct netdev_tc_txq tc_to_txq[16U] ; u8 prio_tc_map[16U] ; unsigned int fcoe_ddp_xid ; struct netprio_map *priomap ; struct phy_device *phydev ; struct lock_class_key *qdisc_tx_busylock ; int group ; struct pm_qos_request pm_qos_req ; }; struct pcpu_sw_netstats { u64 rx_packets ; u64 rx_bytes ; u64 tx_packets ; u64 tx_bytes ; struct u64_stats_sync syncp ; }; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; struct kernel_param; struct kernel_param_ops { unsigned int flags ; int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion____missing_field_name_242 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct kernel_param_ops const *ops ; u16 perm ; s16 level ; union __anonunion____missing_field_name_242 __annonCompField75 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct tracepoint; struct tracepoint_func { void *func ; void *data ; }; struct tracepoint { char const *name ; struct static_key key ; void (*regfunc)(void) ; void (*unregfunc)(void) ; struct tracepoint_func *funcs ; }; struct mod_arch_specific { }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; struct completion *kobj_completion ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2, MODULE_STATE_UNFORMED = 3 } ; struct module_ref { unsigned long incs ; unsigned long decs ; }; struct module_sect_attrs; struct module_notes_attrs; struct ftrace_event_call; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; bool sig_ok ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; char *args ; void *percpu ; unsigned int percpu_size ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; struct jump_entry *jump_entries ; unsigned int num_jump_entries ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct ftrace_event_call **trace_events ; unsigned int num_trace_events ; unsigned int num_ftrace_callsites ; unsigned long *ftrace_callsites ; struct list_head source_list ; struct list_head target_list ; void (*exit)(void) ; struct module_ref *refptr ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct res_counter { unsigned long long usage ; unsigned long long max_usage ; unsigned long long limit ; unsigned long long soft_limit ; unsigned long long failcnt ; spinlock_t lock ; struct res_counter *parent ; }; struct kioctx; typedef int kiocb_cancel_fn(struct kiocb * ); union __anonunion_ki_obj_243 { void *user ; struct task_struct *tsk ; }; struct eventfd_ctx; struct kiocb { struct file *ki_filp ; struct kioctx *ki_ctx ; kiocb_cancel_fn *ki_cancel ; void *private ; union __anonunion_ki_obj_243 ki_obj ; __u64 ki_user_data ; loff_t ki_pos ; size_t ki_nbytes ; struct list_head ki_list ; struct eventfd_ctx *ki_eventfd ; }; struct sock_filter { __u16 code ; __u8 jt ; __u8 jf ; __u32 k ; }; union __anonunion____missing_field_name_244 { struct sock_filter insns[0U] ; struct work_struct work ; }; struct sk_filter { atomic_t refcnt ; unsigned int len ; struct callback_head rcu ; unsigned int (*bpf_func)(struct sk_buff const * , struct sock_filter const * ) ; union __anonunion____missing_field_name_244 __annonCompField76 ; }; struct poll_table_struct { void (*_qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ; unsigned long _key ; }; struct nla_policy { u16 type ; u16 len ; }; struct rtnl_link_ops { struct list_head list ; char const *kind ; size_t priv_size ; void (*setup)(struct net_device * ) ; int maxtype ; struct nla_policy const *policy ; int (*validate)(struct nlattr ** , struct nlattr ** ) ; int (*newlink)(struct net * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; int (*changelink)(struct net_device * , struct nlattr ** , struct nlattr ** ) ; void (*dellink)(struct net_device * , struct list_head * ) ; size_t (*get_size)(struct net_device const * ) ; int (*fill_info)(struct sk_buff * , struct net_device const * ) ; size_t (*get_xstats_size)(struct net_device const * ) ; int (*fill_xstats)(struct sk_buff * , struct net_device const * ) ; unsigned int (*get_num_tx_queues)(void) ; unsigned int (*get_num_rx_queues)(void) ; int slave_maxtype ; struct nla_policy const *slave_policy ; int (*slave_validate)(struct nlattr ** , struct nlattr ** ) ; int (*slave_changelink)(struct net_device * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; size_t (*get_slave_size)(struct net_device const * , struct net_device const * ) ; int (*fill_slave_info)(struct sk_buff * , struct net_device const * , struct net_device const * ) ; }; struct neigh_table; struct neigh_parms { struct net *net ; struct net_device *dev ; struct neigh_parms *next ; int (*neigh_setup)(struct neighbour * ) ; void (*neigh_cleanup)(struct neighbour * ) ; struct neigh_table *tbl ; void *sysctl_table ; int dead ; atomic_t refcnt ; struct callback_head callback_head ; int reachable_time ; int data[12U] ; unsigned long data_state[1U] ; }; struct neigh_statistics { unsigned long allocs ; unsigned long destroys ; unsigned long hash_grows ; unsigned long res_failed ; unsigned long lookups ; unsigned long hits ; unsigned long rcv_probes_mcast ; unsigned long rcv_probes_ucast ; unsigned long periodic_gc_runs ; unsigned long forced_gc_runs ; unsigned long unres_discards ; }; struct neigh_ops; struct neighbour { struct neighbour *next ; struct neigh_table *tbl ; struct neigh_parms *parms ; unsigned long confirmed ; unsigned long updated ; rwlock_t lock ; atomic_t refcnt ; struct sk_buff_head arp_queue ; unsigned int arp_queue_len_bytes ; struct timer_list timer ; unsigned long used ; atomic_t probes ; __u8 flags ; __u8 nud_state ; __u8 type ; __u8 dead ; seqlock_t ha_lock ; unsigned char ha[32U] ; struct hh_cache hh ; int (*output)(struct neighbour * , struct sk_buff * ) ; struct neigh_ops const *ops ; struct callback_head rcu ; struct net_device *dev ; u8 primary_key[0U] ; }; struct neigh_ops { int family ; void (*solicit)(struct neighbour * , struct sk_buff * ) ; void (*error_report)(struct neighbour * , struct sk_buff * ) ; int (*output)(struct neighbour * , struct sk_buff * ) ; int (*connected_output)(struct neighbour * , struct sk_buff * ) ; }; struct pneigh_entry { struct pneigh_entry *next ; struct net *net ; struct net_device *dev ; u8 flags ; u8 key[0U] ; }; struct neigh_hash_table { struct neighbour **hash_buckets ; unsigned int hash_shift ; __u32 hash_rnd[4U] ; struct callback_head rcu ; }; struct neigh_table { struct neigh_table *next ; int family ; int entry_size ; int key_len ; __u32 (*hash)(void const * , struct net_device const * , __u32 * ) ; int (*constructor)(struct neighbour * ) ; int (*pconstructor)(struct pneigh_entry * ) ; void (*pdestructor)(struct pneigh_entry * ) ; void (*proxy_redo)(struct sk_buff * ) ; char *id ; struct neigh_parms parms ; int gc_interval ; int gc_thresh1 ; int gc_thresh2 ; int gc_thresh3 ; unsigned long last_flush ; struct delayed_work gc_work ; struct timer_list proxy_timer ; struct sk_buff_head proxy_queue ; atomic_t entries ; rwlock_t lock ; unsigned long last_rand ; struct neigh_statistics *stats ; struct neigh_hash_table *nht ; struct pneigh_entry **phash_buckets ; }; struct dn_route; union __anonunion____missing_field_name_249 { struct dst_entry *next ; struct rtable *rt_next ; struct rt6_info *rt6_next ; struct dn_route *dn_next ; }; struct dst_entry { struct callback_head callback_head ; struct dst_entry *child ; struct net_device *dev ; struct dst_ops *ops ; unsigned long _metrics ; unsigned long expires ; struct dst_entry *path ; struct dst_entry *from ; struct xfrm_state *xfrm ; int (*input)(struct sk_buff * ) ; int (*output)(struct sk_buff * ) ; unsigned short flags ; unsigned short pending_confirm ; short error ; short obsolete ; unsigned short header_len ; unsigned short trailer_len ; __u32 tclassid ; long __pad_to_align_refcnt[2U] ; atomic_t __refcnt ; int __use ; unsigned long lastuse ; union __anonunion____missing_field_name_249 __annonCompField77 ; }; struct __anonstruct_socket_lock_t_250 { spinlock_t slock ; int owned ; wait_queue_head_t wq ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_socket_lock_t_250 socket_lock_t; struct proto; typedef __u32 __portpair; typedef __u64 __addrpair; struct __anonstruct____missing_field_name_252 { __be32 skc_daddr ; __be32 skc_rcv_saddr ; }; union __anonunion____missing_field_name_251 { __addrpair skc_addrpair ; struct __anonstruct____missing_field_name_252 __annonCompField78 ; }; union __anonunion____missing_field_name_253 { unsigned int skc_hash ; __u16 skc_u16hashes[2U] ; }; struct __anonstruct____missing_field_name_255 { __be16 skc_dport ; __u16 skc_num ; }; union __anonunion____missing_field_name_254 { __portpair skc_portpair ; struct __anonstruct____missing_field_name_255 __annonCompField81 ; }; union __anonunion____missing_field_name_256 { struct hlist_node skc_bind_node ; struct hlist_nulls_node skc_portaddr_node ; }; union __anonunion____missing_field_name_257 { struct hlist_node skc_node ; struct hlist_nulls_node skc_nulls_node ; }; struct sock_common { union __anonunion____missing_field_name_251 __annonCompField79 ; union __anonunion____missing_field_name_253 __annonCompField80 ; union __anonunion____missing_field_name_254 __annonCompField82 ; unsigned short skc_family ; unsigned char volatile skc_state ; unsigned char skc_reuse : 4 ; unsigned char skc_reuseport : 4 ; int skc_bound_dev_if ; union __anonunion____missing_field_name_256 __annonCompField83 ; struct proto *skc_prot ; struct net *skc_net ; struct in6_addr skc_v6_daddr ; struct in6_addr skc_v6_rcv_saddr ; int skc_dontcopy_begin[0U] ; union __anonunion____missing_field_name_257 __annonCompField84 ; int skc_tx_queue_mapping ; atomic_t skc_refcnt ; int skc_dontcopy_end[0U] ; }; struct cg_proto; struct __anonstruct_sk_backlog_258 { atomic_t rmem_alloc ; int len ; struct sk_buff *head ; struct sk_buff *tail ; }; struct sock { struct sock_common __sk_common ; socket_lock_t sk_lock ; struct sk_buff_head sk_receive_queue ; struct __anonstruct_sk_backlog_258 sk_backlog ; int sk_forward_alloc ; __u32 sk_rxhash ; unsigned int sk_napi_id ; unsigned int sk_ll_usec ; atomic_t sk_drops ; int sk_rcvbuf ; struct sk_filter *sk_filter ; struct socket_wq *sk_wq ; struct xfrm_policy *sk_policy[2U] ; unsigned long sk_flags ; struct dst_entry *sk_rx_dst ; struct dst_entry *sk_dst_cache ; spinlock_t sk_dst_lock ; atomic_t sk_wmem_alloc ; atomic_t sk_omem_alloc ; int sk_sndbuf ; struct sk_buff_head sk_write_queue ; unsigned int sk_shutdown : 2 ; unsigned int sk_no_check : 2 ; unsigned int sk_userlocks : 4 ; unsigned int sk_protocol : 8 ; unsigned int sk_type : 16 ; int sk_wmem_queued ; gfp_t sk_allocation ; u32 sk_pacing_rate ; u32 sk_max_pacing_rate ; netdev_features_t sk_route_caps ; netdev_features_t sk_route_nocaps ; int sk_gso_type ; unsigned int sk_gso_max_size ; u16 sk_gso_max_segs ; int sk_rcvlowat ; unsigned long sk_lingertime ; struct sk_buff_head sk_error_queue ; struct proto *sk_prot_creator ; rwlock_t sk_callback_lock ; int sk_err ; int sk_err_soft ; unsigned short sk_ack_backlog ; unsigned short sk_max_ack_backlog ; __u32 sk_priority ; __u32 sk_cgrp_prioidx ; struct pid *sk_peer_pid ; struct cred const *sk_peer_cred ; long sk_rcvtimeo ; long sk_sndtimeo ; void *sk_protinfo ; struct timer_list sk_timer ; ktime_t sk_stamp ; struct socket *sk_socket ; void *sk_user_data ; struct page_frag sk_frag ; struct sk_buff *sk_send_head ; __s32 sk_peek_off ; int sk_write_pending ; void *sk_security ; __u32 sk_mark ; u32 sk_classid ; struct cg_proto *sk_cgrp ; void (*sk_state_change)(struct sock * ) ; void (*sk_data_ready)(struct sock * , int ) ; void (*sk_write_space)(struct sock * ) ; void (*sk_error_report)(struct sock * ) ; int (*sk_backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*sk_destruct)(struct sock * ) ; }; struct request_sock_ops; struct timewait_sock_ops; struct inet_hashinfo; struct raw_hashinfo; struct udp_table; union __anonunion_h_259 { struct inet_hashinfo *hashinfo ; struct udp_table *udp_table ; struct raw_hashinfo *raw_hash ; }; struct proto { void (*close)(struct sock * , long ) ; int (*connect)(struct sock * , struct sockaddr * , int ) ; int (*disconnect)(struct sock * , int ) ; struct sock *(*accept)(struct sock * , int , int * ) ; int (*ioctl)(struct sock * , int , unsigned long ) ; int (*init)(struct sock * ) ; void (*destroy)(struct sock * ) ; void (*shutdown)(struct sock * , int ) ; int (*setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_ioctl)(struct sock * , unsigned int , unsigned long ) ; int (*sendmsg)(struct kiocb * , struct sock * , struct msghdr * , size_t ) ; int (*recvmsg)(struct kiocb * , struct sock * , struct msghdr * , size_t , int , int , int * ) ; int (*sendpage)(struct sock * , struct page * , int , size_t , int ) ; int (*bind)(struct sock * , struct sockaddr * , int ) ; int (*backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*release_cb)(struct sock * ) ; void (*mtu_reduced)(struct sock * ) ; void (*hash)(struct sock * ) ; void (*unhash)(struct sock * ) ; void (*rehash)(struct sock * ) ; int (*get_port)(struct sock * , unsigned short ) ; void (*clear_sk)(struct sock * , int ) ; unsigned int inuse_idx ; bool (*stream_memory_free)(struct sock const * ) ; void (*enter_memory_pressure)(struct sock * ) ; atomic_long_t *memory_allocated ; struct percpu_counter *sockets_allocated ; int *memory_pressure ; long *sysctl_mem ; int *sysctl_wmem ; int *sysctl_rmem ; int max_header ; bool no_autobind ; struct kmem_cache *slab ; unsigned int obj_size ; int slab_flags ; struct percpu_counter *orphan_count ; struct request_sock_ops *rsk_prot ; struct timewait_sock_ops *twsk_prot ; union __anonunion_h_259 h ; struct module *owner ; char name[32U] ; struct list_head node ; int (*init_cgroup)(struct mem_cgroup * , struct cgroup_subsys * ) ; void (*destroy_cgroup)(struct mem_cgroup * ) ; struct cg_proto *(*proto_cgroup)(struct mem_cgroup * ) ; }; struct cg_proto { struct res_counter memory_allocated ; struct percpu_counter sockets_allocated ; int memory_pressure ; long sysctl_mem[3U] ; unsigned long flags ; struct mem_cgroup *memcg ; }; struct ieee80211_mcs_info { u8 rx_mask[10U] ; __le16 rx_highest ; u8 tx_params ; u8 reserved[3U] ; }; struct ieee80211_ht_cap { __le16 cap_info ; u8 ampdu_params_info ; struct ieee80211_mcs_info mcs ; __le16 extended_ht_cap_info ; __le32 tx_BF_cap_info ; u8 antenna_selection_info ; }; struct ieee80211_ht_operation { u8 primary_chan ; u8 ht_param ; __le16 operation_mode ; __le16 stbc_param ; u8 basic_set[16U] ; }; struct ieee80211_vht_mcs_info { __le16 rx_mcs_map ; __le16 rx_highest ; __le16 tx_mcs_map ; __le16 tx_highest ; }; struct ieee80211_vht_cap { __le32 vht_cap_info ; struct ieee80211_vht_mcs_info supp_mcs ; }; struct ieee80211_vht_operation { u8 chan_width ; u8 center_freq_seg1_idx ; u8 center_freq_seg2_idx ; __le16 basic_mcs_set ; }; struct __anonstruct_chans_294 { u8 first_channel ; u8 num_channels ; s8 max_power ; }; struct __anonstruct_ext_295 { u8 reg_extension_id ; u8 reg_class ; u8 coverage_class ; }; union __anonunion____missing_field_name_293 { struct __anonstruct_chans_294 chans ; struct __anonstruct_ext_295 ext ; }; struct ieee80211_country_ie_triplet { union __anonunion____missing_field_name_293 __annonCompField85 ; }; struct firmware { size_t size ; u8 const *data ; struct page **pages ; void *priv ; }; typedef unsigned long kernel_ulong_t; struct acpi_device_id { __u8 id[9U] ; kernel_ulong_t driver_data ; }; struct of_device_id { char name[32U] ; char type[32U] ; char compatible[128U] ; void const *data ; }; typedef u32 phandle; struct property { char *name ; int length ; void *value ; struct property *next ; unsigned long _flags ; unsigned int unique_id ; }; struct device_node { char const *name ; char const *type ; phandle phandle ; char const *full_name ; struct property *properties ; struct property *deadprops ; struct device_node *parent ; struct device_node *child ; struct device_node *sibling ; struct device_node *next ; struct device_node *allnext ; struct proc_dir_entry *pde ; struct kref kref ; unsigned long _flags ; void *data ; }; enum nl80211_iftype { NL80211_IFTYPE_UNSPECIFIED = 0, NL80211_IFTYPE_ADHOC = 1, NL80211_IFTYPE_STATION = 2, NL80211_IFTYPE_AP = 3, NL80211_IFTYPE_AP_VLAN = 4, NL80211_IFTYPE_WDS = 5, NL80211_IFTYPE_MONITOR = 6, NL80211_IFTYPE_MESH_POINT = 7, NL80211_IFTYPE_P2P_CLIENT = 8, NL80211_IFTYPE_P2P_GO = 9, NL80211_IFTYPE_P2P_DEVICE = 10, NUM_NL80211_IFTYPES = 11, NL80211_IFTYPE_MAX = 10 } ; enum nl80211_reg_initiator { NL80211_REGDOM_SET_BY_CORE = 0, NL80211_REGDOM_SET_BY_USER = 1, NL80211_REGDOM_SET_BY_DRIVER = 2, NL80211_REGDOM_SET_BY_COUNTRY_IE = 3 } ; enum nl80211_dfs_regions { NL80211_DFS_UNSET = 0, NL80211_DFS_FCC = 1, NL80211_DFS_ETSI = 2, NL80211_DFS_JP = 3 } ; enum nl80211_user_reg_hint_type { NL80211_USER_REG_HINT_USER = 0, NL80211_USER_REG_HINT_CELL_BASE = 1 } ; enum nl80211_chan_width { NL80211_CHAN_WIDTH_20_NOHT = 0, NL80211_CHAN_WIDTH_20 = 1, NL80211_CHAN_WIDTH_40 = 2, NL80211_CHAN_WIDTH_80 = 3, NL80211_CHAN_WIDTH_80P80 = 4, NL80211_CHAN_WIDTH_160 = 5, NL80211_CHAN_WIDTH_5 = 6, NL80211_CHAN_WIDTH_10 = 7 } ; enum nl80211_bss_scan_width { NL80211_BSS_CHAN_WIDTH_20 = 0, NL80211_BSS_CHAN_WIDTH_10 = 1, NL80211_BSS_CHAN_WIDTH_5 = 2 } ; enum nl80211_auth_type { NL80211_AUTHTYPE_OPEN_SYSTEM = 0, NL80211_AUTHTYPE_SHARED_KEY = 1, NL80211_AUTHTYPE_FT = 2, NL80211_AUTHTYPE_NETWORK_EAP = 3, NL80211_AUTHTYPE_SAE = 4, __NL80211_AUTHTYPE_NUM = 5, NL80211_AUTHTYPE_MAX = 4, NL80211_AUTHTYPE_AUTOMATIC = 5 } ; enum nl80211_mfp { NL80211_MFP_NO = 0, NL80211_MFP_REQUIRED = 1 } ; struct nl80211_wowlan_tcp_data_seq { __u32 start ; __u32 offset ; __u32 len ; }; struct nl80211_wowlan_tcp_data_token { __u32 offset ; __u32 len ; __u8 token_stream[] ; }; struct nl80211_wowlan_tcp_data_token_feature { __u32 min_len ; __u32 max_len ; __u32 bufsize ; }; enum nl80211_dfs_state { NL80211_DFS_USABLE = 0, NL80211_DFS_UNAVAILABLE = 1, NL80211_DFS_AVAILABLE = 2 } ; struct nl80211_vendor_cmd_info { __u32 vendor_id ; __u32 subcmd ; }; enum environment_cap { ENVIRON_ANY = 0, ENVIRON_INDOOR = 1, ENVIRON_OUTDOOR = 2 } ; struct regulatory_request { struct callback_head callback_head ; int wiphy_idx ; enum nl80211_reg_initiator initiator ; enum nl80211_user_reg_hint_type user_reg_hint_type ; char alpha2[2U] ; enum nl80211_dfs_regions dfs_region ; bool intersect ; bool processed ; enum environment_cap country_ie_env ; struct list_head list ; }; struct ieee80211_freq_range { u32 start_freq_khz ; u32 end_freq_khz ; u32 max_bandwidth_khz ; }; struct ieee80211_power_rule { u32 max_antenna_gain ; u32 max_eirp ; }; struct ieee80211_reg_rule { struct ieee80211_freq_range freq_range ; struct ieee80211_power_rule power_rule ; u32 flags ; }; struct ieee80211_regdomain { struct callback_head callback_head ; u32 n_reg_rules ; char alpha2[2U] ; enum nl80211_dfs_regions dfs_region ; struct ieee80211_reg_rule reg_rules[7] ; }; struct wiphy; enum ieee80211_band { IEEE80211_BAND_2GHZ = 0, IEEE80211_BAND_5GHZ = 1, IEEE80211_BAND_60GHZ = 2, IEEE80211_NUM_BANDS = 3 } ; struct ieee80211_channel { enum ieee80211_band band ; u16 center_freq ; u16 hw_value ; u32 flags ; int max_antenna_gain ; int max_power ; int max_reg_power ; bool beacon_found ; u32 orig_flags ; int orig_mag ; int orig_mpwr ; enum nl80211_dfs_state dfs_state ; unsigned long dfs_state_entered ; }; struct ieee80211_rate { u32 flags ; u16 bitrate ; u16 hw_value ; u16 hw_value_short ; }; struct ieee80211_sta_ht_cap { u16 cap ; bool ht_supported ; u8 ampdu_factor ; u8 ampdu_density ; struct ieee80211_mcs_info mcs ; }; struct ieee80211_sta_vht_cap { bool vht_supported ; u32 cap ; struct ieee80211_vht_mcs_info vht_mcs ; }; struct ieee80211_supported_band { struct ieee80211_channel *channels ; struct ieee80211_rate *bitrates ; enum ieee80211_band band ; int n_channels ; int n_bitrates ; struct ieee80211_sta_ht_cap ht_cap ; struct ieee80211_sta_vht_cap vht_cap ; }; struct vif_params { int use_4addr ; u8 macaddr[6U] ; }; struct cfg80211_chan_def { struct ieee80211_channel *chan ; enum nl80211_chan_width width ; u32 center_freq1 ; u32 center_freq2 ; }; struct cfg80211_crypto_settings { u32 wpa_versions ; u32 cipher_group ; int n_ciphers_pairwise ; u32 ciphers_pairwise[5U] ; int n_akm_suites ; u32 akm_suites[2U] ; bool control_port ; __be16 control_port_ethertype ; bool control_port_no_encrypt ; }; struct mac_address { u8 addr[6U] ; }; struct cfg80211_ssid { u8 ssid[32U] ; u8 ssid_len ; }; struct cfg80211_scan_request { struct cfg80211_ssid *ssids ; int n_ssids ; u32 n_channels ; enum nl80211_bss_scan_width scan_width ; u8 const *ie ; size_t ie_len ; u32 flags ; u32 rates[3U] ; struct wireless_dev *wdev ; struct wiphy *wiphy ; unsigned long scan_start ; bool aborted ; bool notified ; bool no_cck ; struct ieee80211_channel *channels[0U] ; }; enum cfg80211_signal_type { CFG80211_SIGNAL_TYPE_NONE = 0, CFG80211_SIGNAL_TYPE_MBM = 1, CFG80211_SIGNAL_TYPE_UNSPEC = 2 } ; struct cfg80211_ibss_params { u8 *ssid ; u8 *bssid ; struct cfg80211_chan_def chandef ; u8 *ie ; u8 ssid_len ; u8 ie_len ; u16 beacon_interval ; u32 basic_rates ; bool channel_fixed ; bool privacy ; bool control_port ; bool userspace_handles_dfs ; int mcast_rate[3U] ; struct ieee80211_ht_cap ht_capa ; struct ieee80211_ht_cap ht_capa_mask ; }; struct cfg80211_connect_params { struct ieee80211_channel *channel ; u8 *bssid ; u8 *ssid ; size_t ssid_len ; enum nl80211_auth_type auth_type ; u8 *ie ; size_t ie_len ; bool privacy ; enum nl80211_mfp mfp ; struct cfg80211_crypto_settings crypto ; u8 const *key ; u8 key_len ; u8 key_idx ; u32 flags ; int bg_scan_period ; struct ieee80211_ht_cap ht_capa ; struct ieee80211_ht_cap ht_capa_mask ; struct ieee80211_vht_cap vht_capa ; struct ieee80211_vht_cap vht_capa_mask ; }; struct cfg80211_pkt_pattern { u8 *mask ; u8 *pattern ; int pattern_len ; int pkt_offset ; }; struct cfg80211_wowlan_tcp { struct socket *sock ; __be32 src ; __be32 dst ; u16 src_port ; u16 dst_port ; u8 dst_mac[6U] ; int payload_len ; u8 const *payload ; struct nl80211_wowlan_tcp_data_seq payload_seq ; u32 data_interval ; u32 wake_len ; u8 const *wake_data ; u8 const *wake_mask ; u32 tokens_size ; struct nl80211_wowlan_tcp_data_token payload_tok ; }; struct cfg80211_wowlan { bool any ; bool disconnect ; bool magic_pkt ; bool gtk_rekey_failure ; bool eap_identity_req ; bool four_way_handshake ; bool rfkill_release ; struct cfg80211_pkt_pattern *patterns ; struct cfg80211_wowlan_tcp *tcp ; int n_patterns ; }; struct cfg80211_dscp_exception { u8 dscp ; u8 up ; }; struct cfg80211_dscp_range { u8 low ; u8 high ; }; struct cfg80211_qos_map { u8 num_des ; struct cfg80211_dscp_exception dscp_exception[21U] ; struct cfg80211_dscp_range up[8U] ; }; struct ieee80211_iface_limit { u16 max ; u16 types ; }; struct ieee80211_iface_combination { struct ieee80211_iface_limit const *limits ; u32 num_different_channels ; u16 max_interfaces ; u8 n_limits ; bool beacon_int_infra_match ; u8 radar_detect_widths ; }; struct ieee80211_txrx_stypes { u16 tx ; u16 rx ; }; struct wiphy_wowlan_tcp_support { struct nl80211_wowlan_tcp_data_token_feature const *tok ; u32 data_payload_max ; u32 data_interval_max ; u32 wake_payload_max ; bool seq ; }; struct wiphy_wowlan_support { u32 flags ; int n_patterns ; int pattern_max_len ; int pattern_min_len ; int max_pkt_offset ; struct wiphy_wowlan_tcp_support const *tcp ; }; struct wiphy_coalesce_support { int n_rules ; int max_delay ; int n_patterns ; int pattern_max_len ; int pattern_min_len ; int max_pkt_offset ; }; struct wiphy_vendor_command { struct nl80211_vendor_cmd_info info ; u32 flags ; int (*doit)(struct wiphy * , struct wireless_dev * , void const * , int ) ; }; struct wiphy { u8 perm_addr[6U] ; u8 addr_mask[6U] ; struct mac_address *addresses ; struct ieee80211_txrx_stypes const *mgmt_stypes ; struct ieee80211_iface_combination const *iface_combinations ; int n_iface_combinations ; u16 software_iftypes ; u16 n_addresses ; u16 interface_modes ; u16 max_acl_mac_addrs ; u32 flags ; u32 regulatory_flags ; u32 features ; u32 ap_sme_capa ; enum cfg80211_signal_type signal_type ; int bss_priv_size ; u8 max_scan_ssids ; u8 max_sched_scan_ssids ; u8 max_match_sets ; u16 max_scan_ie_len ; u16 max_sched_scan_ie_len ; int n_cipher_suites ; u32 const *cipher_suites ; u8 retry_short ; u8 retry_long ; u32 frag_threshold ; u32 rts_threshold ; u8 coverage_class ; char fw_version[32U] ; u32 hw_version ; struct wiphy_wowlan_support const *wowlan ; struct cfg80211_wowlan *wowlan_config ; u16 max_remain_on_channel_duration ; u8 max_num_pmkids ; u32 available_antennas_tx ; u32 available_antennas_rx ; u32 probe_resp_offload ; u8 const *extended_capabilities ; u8 const *extended_capabilities_mask ; u8 extended_capabilities_len ; void const *privid ; struct ieee80211_supported_band *bands[3U] ; void (*reg_notifier)(struct wiphy * , struct regulatory_request * ) ; struct ieee80211_regdomain const *regd ; struct device dev ; bool registered ; struct dentry *debugfsdir ; struct ieee80211_ht_cap const *ht_capa_mod_mask ; struct ieee80211_vht_cap const *vht_capa_mod_mask ; struct net *_net ; struct iw_handler_def const *wext ; struct wiphy_coalesce_support const *coalesce ; struct wiphy_vendor_command const *vendor_commands ; struct nl80211_vendor_cmd_info const *vendor_events ; int n_vendor_commands ; int n_vendor_events ; char priv[0U] ; }; struct cfg80211_conn; struct cfg80211_internal_bss; struct cfg80211_cached_keys; struct __anonstruct_wext_300 { struct cfg80211_ibss_params ibss ; struct cfg80211_connect_params connect ; struct cfg80211_cached_keys *keys ; u8 *ie ; size_t ie_len ; u8 bssid[6U] ; u8 prev_bssid[6U] ; u8 ssid[32U] ; s8 default_key ; s8 default_mgmt_key ; bool prev_bssid_valid ; }; struct wireless_dev { struct wiphy *wiphy ; enum nl80211_iftype iftype ; struct list_head list ; struct net_device *netdev ; u32 identifier ; struct list_head mgmt_registrations ; spinlock_t mgmt_registrations_lock ; struct mutex mtx ; bool use_4addr ; bool p2p_started ; u8 address[6U] ; u8 ssid[32U] ; u8 ssid_len ; u8 mesh_id_len ; u8 mesh_id_up_len ; struct cfg80211_conn *conn ; struct cfg80211_cached_keys *connect_keys ; struct list_head event_list ; spinlock_t event_lock ; struct cfg80211_internal_bss *current_bss ; struct cfg80211_chan_def preset_chandef ; struct ieee80211_channel *channel ; bool ibss_fixed ; bool ibss_dfs_possible ; bool ps ; int ps_timeout ; int beacon_interval ; u32 ap_unexpected_nlportid ; bool cac_started ; unsigned long cac_start_time ; struct __anonstruct_wext_300 wext ; }; enum mwifiex_bss_role { MWIFIEX_BSS_ROLE_STA = 0, MWIFIEX_BSS_ROLE_UAP = 1, MWIFIEX_BSS_ROLE_ANY = 255 } ; struct mwifiex_fw_image { u8 *helper_buf ; u32 helper_len ; u8 *fw_buf ; u32 fw_len ; }; struct mwifiex_wait_queue { wait_queue_head_t wait ; int status ; }; struct mwifiex_txinfo { u32 status_code ; u8 flags ; u8 bss_num ; u8 bss_type ; u32 pkt_len ; }; enum mwifiex_wmm_ac_e { WMM_AC_BK = 0, WMM_AC_BE = 1, WMM_AC_VI = 2, WMM_AC_VO = 3 } ; struct ieee_types_wmm_ac_parameters { u8 aci_aifsn_bitmap ; u8 ecw_bitmap ; __le16 tx_op_limit ; }; struct mwifiex_multicast_list { u32 mode ; u32 num_multicast_addr ; u8 mac_list[32U][6U] ; }; struct subsc_evt_cfg { u8 abs_value ; u8 evt_freq ; }; struct mwifiex_ds_misc_subsc_evt { u16 action ; u16 events ; struct subsc_evt_cfg bcn_l_rssi_cfg ; struct subsc_evt_cfg bcn_h_rssi_cfg ; }; struct mwifiex_chan_scan_param_set { u8 radio_type ; u8 chan_number ; u8 chan_scan_mode_bitmap ; __le16 min_scan_time ; __le16 max_scan_time ; }; struct mwifiex_ie_type_key_param_set { __le16 type ; __le16 length ; __le16 key_type_id ; __le16 key_info ; __le16 key_len ; u8 key[50U] ; }; struct host_cmd_ds_802_11_key_material { __le16 action ; struct mwifiex_ie_type_key_param_set key_param_set ; }; struct ieee_types_cf_param_set { u8 element_id ; u8 len ; u8 cfp_cnt ; u8 cfp_period ; __le16 cfp_max_duration ; __le16 cfp_duration_remaining ; }; struct ieee_types_ibss_param_set { u8 element_id ; u8 len ; __le16 atim_window ; }; union ieee_types_ss_param_set { struct ieee_types_cf_param_set cf_param_set ; struct ieee_types_ibss_param_set ibss_param_set ; }; struct ieee_types_fh_param_set { u8 element_id ; u8 len ; __le16 dwell_time ; u8 hop_set ; u8 hop_pattern ; u8 hop_index ; }; struct ieee_types_ds_param_set { u8 element_id ; u8 len ; u8 current_chan ; }; union ieee_types_phy_param_set { struct ieee_types_fh_param_set fh_param_set ; struct ieee_types_ds_param_set ds_param_set ; }; struct ieee_types_oper_mode_ntf { u8 element_id ; u8 len ; u8 oper_mode ; }; struct mwifiex_hs_config_param { __le32 conditions ; u8 gpio ; u8 gap ; }; struct ieee_types_vendor_header { u8 element_id ; u8 len ; u8 oui[4U] ; u8 oui_subtype ; u8 version ; }; struct ieee_types_wmm_parameter { struct ieee_types_vendor_header vend_hdr ; u8 qos_info_bitmap ; u8 reserved ; struct ieee_types_wmm_ac_parameters ac_params[4U] ; }; struct mwifiex_wmm_ac_status { u8 disabled ; u8 flow_required ; u8 flow_created ; }; struct mwifiex_ie { __le16 ie_index ; __le16 mgmt_subtype_mask ; __le16 ie_length ; u8 ie_buffer[256U] ; }; struct mwifiex_adapter; struct mwifiex_dbg { u32 num_cmd_host_to_card_failure ; u32 num_cmd_sleep_cfm_host_to_card_failure ; u32 num_tx_host_to_card_failure ; u32 num_event_deauth ; u32 num_event_disassoc ; u32 num_event_link_lost ; u32 num_cmd_deauth ; u32 num_cmd_assoc_success ; u32 num_cmd_assoc_failure ; u32 num_tx_timeout ; u32 num_cmd_timeout ; u16 timeout_cmd_id ; u16 timeout_cmd_act ; u16 last_cmd_id[5U] ; u16 last_cmd_act[5U] ; u16 last_cmd_index ; u16 last_cmd_resp_id[5U] ; u16 last_cmd_resp_index ; u16 last_event[5U] ; u16 last_event_index ; }; enum MWIFIEX_HARDWARE_STATUS { MWIFIEX_HW_STATUS_READY = 0, MWIFIEX_HW_STATUS_INITIALIZING = 1, MWIFIEX_HW_STATUS_FW_READY = 2, MWIFIEX_HW_STATUS_INIT_DONE = 3, MWIFIEX_HW_STATUS_RESET = 4, MWIFIEX_HW_STATUS_CLOSING = 5, MWIFIEX_HW_STATUS_NOT_READY = 6 } ; struct mwifiex_tx_param { u32 next_pkt_len ; }; struct mwifiex_add_ba_param { u32 tx_win_size ; u32 rx_win_size ; u32 timeout ; }; struct mwifiex_tx_aggr { u8 ampdu_user ; u8 ampdu_ap ; u8 amsdu ; }; struct mwifiex_tid_tbl { struct list_head ra_list ; }; struct mwifiex_wmm_desc { struct mwifiex_tid_tbl tid_tbl_ptr[8U] ; u32 packets_out[8U] ; spinlock_t ra_list_spinlock ; struct mwifiex_wmm_ac_status ac_status[4U] ; enum mwifiex_wmm_ac_e ac_down_graded_vals[4U] ; u32 drv_pkt_delay_max ; u8 queue_priority[4U] ; u32 user_pri_pkt_tx_ctrl[8U] ; atomic_t tx_pkts_queued ; atomic_t highest_queued_prio ; }; struct mwifiex_802_11_security { u8 wpa_enabled ; u8 wpa2_enabled ; u8 wapi_enabled ; u8 wapi_key_on ; u8 wep_enabled ; u32 authentication_mode ; u8 is_authtype_auto ; u32 encryption_mode ; }; struct ieee_types_header { u8 element_id ; u8 len ; }; struct ieee_types_vendor_specific { struct ieee_types_vendor_header vend_hdr ; u8 data[248U] ; }; struct ieee_types_generic { struct ieee_types_header ieee_hdr ; u8 data[254U] ; }; struct mwifiex_bssdescriptor { u8 mac_address[6U] ; struct cfg80211_ssid ssid ; u32 privacy ; s32 rssi ; u32 channel ; u32 freq ; u16 beacon_period ; u8 erp_flags ; u32 bss_mode ; u8 supported_rates[14U] ; u8 data_rates[14U] ; u16 bss_band ; u64 fw_tsf ; u64 timestamp ; union ieee_types_phy_param_set phy_param_set ; union ieee_types_ss_param_set ss_param_set ; u16 cap_info_bitmap ; struct ieee_types_wmm_parameter wmm_ie ; u8 disable_11n ; struct ieee80211_ht_cap *bcn_ht_cap ; u16 ht_cap_offset ; struct ieee80211_ht_operation *bcn_ht_oper ; u16 ht_info_offset ; u8 *bcn_bss_co_2040 ; u16 bss_co_2040_offset ; u8 *bcn_ext_cap ; u16 ext_cap_offset ; struct ieee80211_vht_cap *bcn_vht_cap ; u16 vht_cap_offset ; struct ieee80211_vht_operation *bcn_vht_oper ; u16 vht_info_offset ; struct ieee_types_oper_mode_ntf *oper_mode ; u16 oper_mode_offset ; u8 disable_11ac ; struct ieee_types_vendor_specific *bcn_wpa_ie ; u16 wpa_offset ; struct ieee_types_generic *bcn_rsn_ie ; u16 rsn_offset ; struct ieee_types_generic *bcn_wapi_ie ; u16 wapi_offset ; u8 *beacon_buf ; u32 beacon_buf_size ; u8 sensed_11h ; u8 local_constraint ; u8 chan_sw_ie_present ; }; struct mwifiex_current_bss_params { struct mwifiex_bssdescriptor bss_descriptor ; u8 wmm_enabled ; u8 wmm_uapsd_enabled ; u8 band ; u32 num_of_rates ; u8 data_rates[14U] ; }; struct mwifiex_sleep_params { u16 sp_error ; u16 sp_offset ; u16 sp_stable_time ; u8 sp_cal_control ; u8 sp_ext_sleep_clk ; u16 sp_reserved ; }; struct mwifiex_sleep_period { u16 period ; u16 reserved ; }; struct mwifiex_wep_key { u32 length ; u32 key_index ; u32 key_length ; u8 key_material[16U] ; }; struct mwifiex_chan_freq_power { u16 channel ; u32 freq ; u16 max_tx_power ; u8 unsupported ; }; struct mwifiex_802_11d_domain_reg { u8 country_code[3U] ; u8 no_of_triplet ; struct ieee80211_country_ie_triplet triplet[83U] ; }; struct mwifiex_vendor_spec_cfg_ie { u16 mask ; u16 flag ; u8 ie[256U] ; }; struct wps { u8 session_enable ; }; struct mwifiex_roc_cfg { u64 cookie ; struct ieee80211_channel chan ; }; struct mwifiex_private; struct mwifiex_private { struct mwifiex_adapter *adapter ; u8 bss_type ; u8 bss_role ; u8 bss_priority ; u8 bss_num ; u8 bss_started ; u8 frame_type ; u8 curr_addr[6U] ; u8 media_connected ; u32 num_tx_timeout ; u8 tx_timeout_cnt ; struct net_device *netdev ; struct net_device_stats stats ; u16 curr_pkt_filter ; u32 bss_mode ; u32 pkt_tx_ctrl ; u16 tx_power_level ; u8 max_tx_power_level ; u8 min_tx_power_level ; u8 tx_rate ; u8 tx_htinfo ; u8 rxpd_htinfo ; u8 rxpd_rate ; u16 rate_bitmap ; u16 bitmap_rates[10U] ; u32 data_rate ; u8 is_data_rate_auto ; u16 bcn_avg_factor ; u16 data_avg_factor ; s16 data_rssi_last ; s16 data_nf_last ; s16 data_rssi_avg ; s16 data_nf_avg ; s16 bcn_rssi_last ; s16 bcn_nf_last ; s16 bcn_rssi_avg ; s16 bcn_nf_avg ; struct mwifiex_bssdescriptor *attempted_bss_desc ; struct cfg80211_ssid prev_ssid ; u8 prev_bssid[6U] ; struct mwifiex_current_bss_params curr_bss_params ; u16 beacon_period ; u8 dtim_period ; u16 listen_interval ; u16 atim_window ; u8 adhoc_channel ; u8 adhoc_is_link_sensed ; u8 adhoc_state ; struct mwifiex_802_11_security sec_info ; struct mwifiex_wep_key wep_key[4U] ; u16 wep_key_curr_index ; u8 wpa_ie[256U] ; u8 wpa_ie_len ; u8 wpa_is_gtk_set ; struct host_cmd_ds_802_11_key_material aes_key ; u8 wapi_ie[256U] ; u8 wapi_ie_len ; u8 *wps_ie ; u8 wps_ie_len ; u8 wmm_required ; u8 wmm_enabled ; u8 wmm_qosinfo ; struct mwifiex_wmm_desc wmm ; atomic_t wmm_tx_pending[4U] ; struct list_head sta_list ; spinlock_t sta_list_spinlock ; struct list_head tx_ba_stream_tbl_ptr ; spinlock_t tx_ba_stream_tbl_lock ; struct mwifiex_tx_aggr aggr_prio_tbl[8U] ; struct mwifiex_add_ba_param add_ba_param ; u16 rx_seq[8U] ; struct list_head rx_reorder_tbl_ptr ; spinlock_t rx_reorder_tbl_lock ; spinlock_t rx_pkt_lock ; u8 assoc_rsp_buf[500U] ; u32 assoc_rsp_size ; u8 gen_ie_buf[256U] ; u8 gen_ie_buf_len ; struct mwifiex_vendor_spec_cfg_ie vs_ie[8U] ; u8 assoc_tlv_buf[256U] ; u8 assoc_tlv_buf_len ; u8 *curr_bcn_buf ; u32 curr_bcn_size ; spinlock_t curr_bcn_buf_lock ; struct wireless_dev *wdev ; struct mwifiex_chan_freq_power cfp ; char version_str[128U] ; struct dentry *dfs_dev_dir ; u8 nick_name[16U] ; u16 current_key_index ; struct semaphore async_sem ; u8 report_scan_result ; struct cfg80211_scan_request *scan_request ; u8 cfg_bssid[6U] ; struct wps wps ; u8 scan_block ; s32 cqm_rssi_thold ; u32 cqm_rssi_hyst ; u8 subsc_evt_rssi_state ; struct mwifiex_ds_misc_subsc_evt async_subsc_evt_storage ; struct mwifiex_ie mgmt_ie[16U] ; u16 beacon_idx ; u16 proberesp_idx ; u16 assocresp_idx ; u16 rsn_idx ; struct timer_list scan_delay_timer ; u8 ap_11n_enabled ; u8 ap_11ac_enabled ; u32 mgmt_frame_mask ; struct mwifiex_roc_cfg roc_cfg ; bool scan_aborting ; u8 csa_chan ; unsigned long csa_expire_time ; u8 del_list_idx ; bool hs2_enabled ; }; struct mwifiex_bss_prio_node { struct list_head list ; struct mwifiex_private *priv ; }; struct mwifiex_bss_prio_tbl { struct list_head bss_prio_head ; spinlock_t bss_prio_lock ; struct mwifiex_bss_prio_node *bss_prio_cur ; }; struct cmd_ctrl_node { struct list_head list ; struct mwifiex_private *priv ; u32 cmd_oid ; u32 cmd_flag ; struct sk_buff *cmd_skb ; struct sk_buff *resp_skb ; void *data_buf ; u32 wait_q_enabled ; struct sk_buff *skb ; u8 *condition ; u8 cmd_wait_q_woken ; }; struct mwifiex_if_ops { int (*init_if)(struct mwifiex_adapter * ) ; void (*cleanup_if)(struct mwifiex_adapter * ) ; int (*check_fw_status)(struct mwifiex_adapter * , u32 ) ; int (*prog_fw)(struct mwifiex_adapter * , struct mwifiex_fw_image * ) ; int (*register_dev)(struct mwifiex_adapter * ) ; void (*unregister_dev)(struct mwifiex_adapter * ) ; int (*enable_int)(struct mwifiex_adapter * ) ; void (*disable_int)(struct mwifiex_adapter * ) ; int (*process_int_status)(struct mwifiex_adapter * ) ; int (*host_to_card)(struct mwifiex_adapter * , u8 , struct sk_buff * , struct mwifiex_tx_param * ) ; int (*wakeup)(struct mwifiex_adapter * ) ; int (*wakeup_complete)(struct mwifiex_adapter * ) ; void (*update_mp_end_port)(struct mwifiex_adapter * , u16 ) ; void (*cleanup_mpa_buf)(struct mwifiex_adapter * ) ; int (*cmdrsp_complete)(struct mwifiex_adapter * , struct sk_buff * ) ; int (*event_complete)(struct mwifiex_adapter * , struct sk_buff * ) ; int (*data_complete)(struct mwifiex_adapter * ) ; int (*init_fw_port)(struct mwifiex_adapter * ) ; int (*dnld_fw)(struct mwifiex_adapter * , struct mwifiex_fw_image * ) ; void (*card_reset)(struct mwifiex_adapter * ) ; int (*clean_pcie_ring)(struct mwifiex_adapter * ) ; }; struct mwifiex_adapter { u8 iface_type ; struct mwifiex_private *priv[3U] ; u8 priv_num ; struct firmware const *firmware ; char fw_name[32U] ; int winner ; struct device *dev ; struct wiphy *wiphy ; bool surprise_removed ; u32 fw_release_number ; u16 init_wait_q_woken ; wait_queue_head_t init_wait_q ; void *card ; struct mwifiex_if_ops if_ops ; atomic_t rx_pending ; atomic_t tx_pending ; atomic_t cmd_pending ; struct workqueue_struct *workqueue ; struct work_struct main_work ; struct mwifiex_bss_prio_tbl bss_prio_tbl[3U] ; spinlock_t mwifiex_lock ; spinlock_t main_proc_lock ; u32 mwifiex_processing ; u16 tx_buf_size ; u16 curr_tx_buf_size ; u32 ioport ; enum MWIFIEX_HARDWARE_STATUS hw_status ; u16 number_of_antenna ; u32 fw_cap_info ; spinlock_t int_lock ; u8 int_status ; u32 event_cause ; struct sk_buff *event_skb ; u8 upld_buf[2312U] ; u8 data_sent ; u8 cmd_sent ; u8 cmd_resp_received ; u8 event_received ; u8 data_received ; u16 seq_num ; struct cmd_ctrl_node *cmd_pool ; struct cmd_ctrl_node *curr_cmd ; spinlock_t mwifiex_cmd_lock ; u32 num_cmd_timeout ; u16 last_init_cmd ; struct timer_list cmd_timer ; struct list_head cmd_free_q ; spinlock_t cmd_free_q_lock ; struct list_head cmd_pending_q ; spinlock_t cmd_pending_q_lock ; struct list_head scan_pending_q ; spinlock_t scan_pending_q_lock ; struct sk_buff_head usb_rx_data_q ; u32 scan_processing ; u16 region_code ; struct mwifiex_802_11d_domain_reg domain_reg ; u16 scan_probes ; u32 scan_mode ; u16 specific_scan_time ; u16 active_scan_time ; u16 passive_scan_time ; u8 fw_bands ; u8 adhoc_start_band ; u8 config_bands ; struct mwifiex_chan_scan_param_set *scan_channels ; u8 tx_lock_flag ; struct mwifiex_sleep_params sleep_params ; struct mwifiex_sleep_period sleep_period ; u16 ps_mode ; u32 ps_state ; u8 need_to_wakeup ; u16 multiple_dtim ; u16 local_listen_interval ; u16 null_pkt_interval ; struct sk_buff *sleep_cfm ; u16 bcn_miss_time_out ; u16 adhoc_awake_period ; u8 is_deep_sleep ; u8 delay_null_pkt ; u16 delay_to_ps ; u16 enhanced_ps_mode ; u8 pm_wakeup_card_req ; u16 gen_null_pkt ; u16 pps_uapsd_mode ; u32 pm_wakeup_fw_try ; u8 is_hs_configured ; struct mwifiex_hs_config_param hs_cfg ; u8 hs_activated ; u16 hs_activate_wait_q_woken ; wait_queue_head_t hs_activate_wait_q ; bool is_suspended ; u8 event_body[1024U] ; u32 hw_dot_11n_dev_cap ; u8 hw_dev_mcs_support ; u8 adhoc_11n_enabled ; u8 sec_chan_offset ; struct mwifiex_dbg dbg ; u8 arp_filter[68U] ; u32 arp_filter_size ; u16 cmd_wait_q_required ; struct mwifiex_wait_queue cmd_wait_q ; u8 scan_wait_q_woken ; spinlock_t queue_lock ; struct completion fw_load ; u8 country_code[3U] ; u16 max_mgmt_ie_index ; u8 scan_delay_cnt ; u8 empty_tx_q_cnt ; struct firmware const *cal_data ; struct device_node *dt_node ; u32 is_hw_11ac_capable ; u32 hw_dot_11ac_dev_cap ; u32 hw_dot_11ac_mcs_support ; u32 usr_dot_11ac_dev_cap_bg ; u32 usr_dot_11ac_dev_cap_a ; u32 usr_dot_11ac_mcs_support ; atomic_t is_tx_received ; atomic_t pending_bridged_pkts ; struct semaphore *card_sem ; }; struct ldv_struct_EMGentry_15 { int signal_pending ; }; struct ldv_struct_dummy_resourceless_instance_5 { struct net_device *arg0 ; int signal_pending ; }; struct ldv_struct_timer_instance_7 { struct timer_list *arg0 ; int signal_pending ; }; typedef int ldv_func_ret_type___0; typedef int ldv_func_ret_type___1; typedef int ldv_func_ret_type___2; enum hrtimer_restart; enum skb_free_reason { SKB_REASON_CONSUMED = 0, SKB_REASON_DROPPED = 1 } ; struct mwifiex_rxinfo { u8 bss_num ; u8 bss_type ; struct sk_buff *parent ; u8 use_count ; }; struct mwifiex_opt_sleep_confirm { __le16 command ; __le16 size ; __le16 seq_num ; __le16 result ; __le16 action ; __le16 resp_ctrl ; }; enum hrtimer_restart; struct region_code_mapping { u8 code ; u8 region[3U] ; }; enum hrtimer_restart; struct mwifiex_ds_hs_cfg { u32 is_invoke_hostcmd ; u32 conditions ; u32 gpio ; u32 gap ; }; struct mwifiex_ds_auto_ds { u16 auto_ds ; u16 idle_time ; }; union __anonunion_param_288 { u32 ps_mode ; struct mwifiex_ds_hs_cfg hs_cfg ; struct mwifiex_ds_auto_ds auto_deep_sleep ; u32 sleep_period ; }; struct mwifiex_ds_pm_cfg { union __anonunion_param_288 param ; }; struct mwifiex_ds_misc_cmd { u32 len ; u8 cmd[2048U] ; }; struct mwifiex_ie_types_header { __le16 type ; __le16 len ; }; struct mwifiex_ps_param { __le16 null_pkt_interval ; __le16 multiple_dtims ; __le16 bcn_miss_timeout ; __le16 local_listen_interval ; __le16 adhoc_wake_period ; __le16 mode ; __le16 delay_to_ps ; }; struct mwifiex_ie_types_auto_ds_param { struct mwifiex_ie_types_header header ; __le16 deep_sleep_timeout ; }; struct mwifiex_ie_types_ps_param { struct mwifiex_ie_types_header header ; struct mwifiex_ps_param param ; }; union __anonunion_params_291 { struct mwifiex_ps_param opt_ps ; __le16 ps_bitmap ; }; struct host_cmd_ds_802_11_ps_mode_enh { __le16 action ; union __anonunion_params_291 params ; }; struct host_cmd_ds_get_hw_spec { __le16 hw_if_version ; __le16 version ; __le16 reserved ; __le16 num_of_mcast_adr ; u8 permanent_addr[6U] ; __le16 region_code ; __le16 number_of_antenna ; __le32 fw_release_number ; __le32 reserved_1 ; __le32 reserved_2 ; __le32 reserved_3 ; __le32 fw_cap_info ; __le32 dot_11n_dev_cap ; u8 dev_mcs_support ; __le16 mp_end_port ; __le16 mgmt_buf_count ; __le32 reserved_5 ; __le32 reserved_6 ; __le32 dot_11ac_dev_cap ; __le32 dot_11ac_mcs_support ; }; struct host_cmd_ds_802_11_rssi_info { __le16 action ; __le16 ndata ; __le16 nbcn ; __le16 reserved[9U] ; long long reserved_1 ; }; struct host_cmd_ds_802_11_rssi_info_rsp { __le16 action ; __le16 ndata ; __le16 nbcn ; __le16 data_rssi_last ; __le16 data_nf_last ; __le16 data_rssi_avg ; __le16 data_nf_avg ; __le16 bcn_rssi_last ; __le16 bcn_nf_last ; __le16 bcn_rssi_avg ; __le16 bcn_nf_avg ; long long tsf_bcn ; }; struct host_cmd_ds_802_11_mac_address { __le16 action ; u8 mac_addr[6U] ; }; struct host_cmd_ds_mac_control { __le16 action ; __le16 reserved ; }; struct host_cmd_ds_mac_multicast_adr { __le16 action ; __le16 num_of_adrs ; u8 mac_list[32U][6U] ; }; struct host_cmd_ds_802_11_deauthenticate { u8 mac_addr[6U] ; __le16 reason_code ; }; struct host_cmd_ds_802_11_associate { u8 peer_sta_addr[6U] ; __le16 cap_info_bitmap ; __le16 listen_interval ; __le16 beacon_period ; u8 dtim_period ; }; struct ieee_types_assoc_rsp { __le16 cap_info_bitmap ; __le16 status_code ; __le16 a_id ; u8 ie_buffer[1U] ; }; struct host_cmd_ds_802_11_associate_rsp { struct ieee_types_assoc_rsp assoc_rsp ; }; struct host_cmd_ds_802_11_ad_hoc_start { u8 ssid[32U] ; u8 bss_mode ; __le16 beacon_period ; u8 dtim_period ; union ieee_types_ss_param_set ss_param_set ; union ieee_types_phy_param_set phy_param_set ; u16 reserved1 ; __le16 cap_info_bitmap ; u8 data_rate[14U] ; }; struct host_cmd_ds_802_11_ad_hoc_result { u8 pad[3U] ; u8 bssid[6U] ; }; struct adhoc_bss_desc { u8 bssid[6U] ; u8 ssid[32U] ; u8 bss_mode ; __le16 beacon_period ; u8 dtim_period ; u8 time_stamp[8U] ; u8 local_time[8U] ; union ieee_types_phy_param_set phy_param_set ; union ieee_types_ss_param_set ss_param_set ; __le16 cap_info_bitmap ; u8 data_rates[14U] ; }; struct host_cmd_ds_802_11_ad_hoc_join { struct adhoc_bss_desc bss_descriptor ; u16 reserved1 ; u16 reserved2 ; }; struct host_cmd_ds_802_11_get_log { __le32 mcast_tx_frame ; __le32 failed ; __le32 retry ; __le32 multi_retry ; __le32 frame_dup ; __le32 rts_success ; __le32 rts_failure ; __le32 ack_failure ; __le32 rx_frag ; __le32 mcast_rx_frame ; __le32 fcs_error ; __le32 tx_frame ; __le32 reserved ; __le32 wep_icv_err_cnt[4U] ; }; struct host_cmd_ds_tx_rate_query { u8 tx_rate ; u8 ht_info ; }; struct hs_activate_param { __le16 resp_ctrl ; }; union __anonunion_params_292 { struct mwifiex_hs_config_param hs_config ; struct hs_activate_param hs_activate ; }; struct host_cmd_ds_802_11_hs_cfg_enh { __le16 action ; union __anonunion_params_292 params ; }; struct host_cmd_ds_802_11_snmp_mib { __le16 query_type ; __le16 oid ; __le16 buf_size ; u8 value[1U] ; }; struct host_cmd_ds_tx_rate_cfg { __le16 action ; __le16 cfg_index ; }; struct host_cmd_ds_txpwr_cfg { __le16 action ; __le16 cfg_index ; __le32 mode ; }; struct host_cmd_ds_rf_tx_pwr { __le16 action ; __le16 cur_level ; u8 max_power ; u8 min_power ; }; struct host_cmd_ds_rf_ant_mimo { __le16 action_tx ; __le16 tx_ant_mode ; __le16 action_rx ; __le16 rx_ant_mode ; }; struct host_cmd_ds_rf_ant_siso { __le16 action ; __le16 ant_mode ; }; struct host_cmd_ds_802_11_scan { u8 bss_mode ; u8 bssid[6U] ; u8 tlv_buffer[1U] ; }; struct host_cmd_ds_802_11_scan_rsp { __le16 bss_descript_size ; u8 number_of_sets ; u8 bss_desc_and_tlv_buffer[1U] ; }; struct host_cmd_ds_802_11_bg_scan_query { u8 flush ; }; struct host_cmd_ds_802_11_bg_scan_query_rsp { __le32 report_condition ; struct host_cmd_ds_802_11_scan_rsp scan_resp ; }; struct mwifiex_ietypes_domain_param_set { struct mwifiex_ie_types_header header ; u8 country_code[3U] ; struct ieee80211_country_ie_triplet triplet[1U] ; }; struct host_cmd_ds_802_11d_domain_info { __le16 action ; struct mwifiex_ietypes_domain_param_set domain ; }; struct host_cmd_ds_802_11d_domain_info_rsp { __le16 action ; struct mwifiex_ietypes_domain_param_set domain ; }; struct host_cmd_ds_11n_addba_req { u8 add_req_result ; u8 peer_mac_addr[6U] ; u8 dialog_token ; __le16 block_ack_param_set ; __le16 block_ack_tmo ; __le16 ssn ; }; struct host_cmd_ds_11n_addba_rsp { u8 add_rsp_result ; u8 peer_mac_addr[6U] ; u8 dialog_token ; __le16 status_code ; __le16 block_ack_param_set ; __le16 block_ack_tmo ; __le16 ssn ; }; struct host_cmd_ds_11n_delba { u8 del_result ; u8 peer_mac_addr[6U] ; __le16 del_ba_param_set ; __le16 reason_code ; u8 reserved ; }; struct host_cmd_ds_11n_cfg { __le16 action ; __le16 ht_tx_cap ; __le16 ht_tx_info ; __le16 misc_config ; }; struct host_cmd_ds_txbuf_cfg { __le16 action ; __le16 buff_size ; __le16 mp_end_port ; __le16 reserved3 ; }; struct host_cmd_ds_amsdu_aggr_ctrl { __le16 action ; __le16 enable ; __le16 curr_buf_size ; }; struct host_cmd_ds_sta_deauth { u8 mac[6U] ; __le16 reason ; }; struct host_cmd_ds_wmm_get_status { u8 queue_status_tlv[64U] ; u8 wmm_param_tlv[28U] ; }; struct host_cmd_ds_mac_reg_access { __le16 action ; __le16 offset ; __le32 value ; }; struct host_cmd_ds_bbp_reg_access { __le16 action ; __le16 offset ; u8 value ; u8 reserved[3U] ; }; struct host_cmd_ds_rf_reg_access { __le16 action ; __le16 offset ; u8 value ; u8 reserved[3U] ; }; struct host_cmd_ds_pmic_reg_access { __le16 action ; __le16 offset ; u8 value ; u8 reserved[3U] ; }; struct host_cmd_ds_802_11_eeprom_access { __le16 action ; __le16 offset ; __le16 byte_count ; u8 value ; }; struct host_cmd_ds_sys_config { __le16 action ; u8 tlv[0U] ; }; struct host_cmd_11ac_vht_cfg { __le16 action ; u8 band_config ; u8 misc_config ; __le32 cap_info ; __le32 mcs_tx_set ; __le32 mcs_rx_set ; }; struct host_cmd_ds_version_ext { u8 version_str_sel ; char version_str[128U] ; }; struct host_cmd_ds_mgmt_frame_reg { __le16 action ; __le32 mask ; }; struct host_cmd_ds_p2p_mode_cfg { __le16 action ; __le16 mode ; }; struct host_cmd_ds_remain_on_chan { __le16 action ; u8 status ; u8 reserved ; u8 band_cfg ; u8 channel ; __le32 duration ; }; struct host_cmd_ds_802_11_ibss_status { __le16 action ; __le16 enable ; u8 bssid[6U] ; __le16 beacon_interval ; __le16 atim_window ; __le16 use_g_rate_protect ; }; struct mwifiex_fw_mef_entry { u8 mode ; u8 action ; __le16 exprsize ; u8 expr[0U] ; }; struct host_cmd_ds_mef_cfg { __le32 criteria ; __le16 num_entries ; struct mwifiex_fw_mef_entry mef_entry[0U] ; }; struct host_cmd_ds_set_bss_mode { u8 con_type ; }; struct host_cmd_ds_pcie_details { u32 txbd_addr_lo ; u32 txbd_addr_hi ; u32 txbd_count ; u32 rxbd_addr_lo ; u32 rxbd_addr_hi ; u32 rxbd_count ; u32 evtbd_addr_lo ; u32 evtbd_addr_hi ; u32 evtbd_count ; u32 sleep_cookie_addr_lo ; u32 sleep_cookie_addr_hi ; }; struct host_cmd_ds_802_11_subsc_evt { __le16 action ; __le16 events ; }; struct coalesce_filt_field_param { u8 operation ; u8 operand_len ; __le16 offset ; u8 operand_byte_stream[4U] ; }; struct coalesce_receive_filt_rule { struct mwifiex_ie_types_header header ; u8 num_of_fields ; u8 pkt_type ; __le16 max_coalescing_delay ; struct coalesce_filt_field_param params[0U] ; }; struct host_cmd_ds_coalesce_cfg { __le16 action ; __le16 num_of_rules ; struct coalesce_receive_filt_rule rule[0U] ; }; union __anonunion_params_293 { struct host_cmd_ds_get_hw_spec hw_spec ; struct host_cmd_ds_mac_control mac_ctrl ; struct host_cmd_ds_802_11_mac_address mac_addr ; struct host_cmd_ds_mac_multicast_adr mc_addr ; struct host_cmd_ds_802_11_get_log get_log ; struct host_cmd_ds_802_11_rssi_info rssi_info ; struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp ; struct host_cmd_ds_802_11_snmp_mib smib ; struct host_cmd_ds_tx_rate_query tx_rate ; struct host_cmd_ds_tx_rate_cfg tx_rate_cfg ; struct host_cmd_ds_txpwr_cfg txp_cfg ; struct host_cmd_ds_rf_tx_pwr txp ; struct host_cmd_ds_rf_ant_mimo ant_mimo ; struct host_cmd_ds_rf_ant_siso ant_siso ; struct host_cmd_ds_802_11_ps_mode_enh psmode_enh ; struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg ; struct host_cmd_ds_802_11_scan scan ; struct host_cmd_ds_802_11_scan_rsp scan_resp ; struct host_cmd_ds_802_11_bg_scan_query bg_scan_query ; struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp ; struct host_cmd_ds_802_11_associate associate ; struct host_cmd_ds_802_11_associate_rsp associate_rsp ; struct host_cmd_ds_802_11_deauthenticate deauth ; struct host_cmd_ds_802_11_ad_hoc_start adhoc_start ; struct host_cmd_ds_802_11_ad_hoc_result adhoc_result ; struct host_cmd_ds_802_11_ad_hoc_join adhoc_join ; struct host_cmd_ds_802_11d_domain_info domain_info ; struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp ; struct host_cmd_ds_11n_addba_req add_ba_req ; struct host_cmd_ds_11n_addba_rsp add_ba_rsp ; struct host_cmd_ds_11n_delba del_ba ; struct host_cmd_ds_txbuf_cfg tx_buf ; struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl ; struct host_cmd_ds_11n_cfg htcfg ; struct host_cmd_ds_wmm_get_status get_wmm_status ; struct host_cmd_ds_802_11_key_material key_material ; struct host_cmd_ds_version_ext verext ; struct host_cmd_ds_mgmt_frame_reg reg_mask ; struct host_cmd_ds_remain_on_chan roc_cfg ; struct host_cmd_ds_p2p_mode_cfg mode_cfg ; struct host_cmd_ds_802_11_ibss_status ibss_coalescing ; struct host_cmd_ds_mef_cfg mef_cfg ; struct host_cmd_ds_mac_reg_access mac_reg ; struct host_cmd_ds_bbp_reg_access bbp_reg ; struct host_cmd_ds_rf_reg_access rf_reg ; struct host_cmd_ds_pmic_reg_access pmic_reg ; struct host_cmd_ds_set_bss_mode bss_mode ; struct host_cmd_ds_pcie_details pcie_host_spec ; struct host_cmd_ds_802_11_eeprom_access eeprom ; struct host_cmd_ds_802_11_subsc_evt subsc_evt ; struct host_cmd_ds_sys_config uap_sys_config ; struct host_cmd_ds_sta_deauth sta_deauth ; struct host_cmd_11ac_vht_cfg vht_cfg ; struct host_cmd_ds_coalesce_cfg coalesce_cfg ; }; struct host_cmd_ds_command { __le16 command ; __le16 size ; __le16 seq_num ; __le16 result ; union __anonunion_params_293 params ; }; enum hrtimer_restart; struct mwifiex_ds_rx_reorder_tbl { u16 tid ; u8 ta[6U] ; u32 start_win ; u32 win_size ; u32 buffer[64U] ; }; struct mwifiex_ds_tx_ba_stream_tbl { u16 tid ; u8 ra[6U] ; }; struct mwifiex_debug_info { u32 int_counter ; u32 packets_out[8U] ; u32 tx_buf_size ; u32 curr_tx_buf_size ; u32 tx_tbl_num ; struct mwifiex_ds_tx_ba_stream_tbl tx_tbl[2U] ; u32 rx_tbl_num ; struct mwifiex_ds_rx_reorder_tbl rx_tbl[16U] ; u16 ps_mode ; u32 ps_state ; u8 is_deep_sleep ; u8 pm_wakeup_card_req ; u32 pm_wakeup_fw_try ; u8 is_hs_configured ; u8 hs_activated ; u32 num_cmd_host_to_card_failure ; u32 num_cmd_sleep_cfm_host_to_card_failure ; u32 num_tx_host_to_card_failure ; u32 num_event_deauth ; u32 num_event_disassoc ; u32 num_event_link_lost ; u32 num_cmd_deauth ; u32 num_cmd_assoc_success ; u32 num_cmd_assoc_failure ; u32 num_tx_timeout ; u32 num_cmd_timeout ; u16 timeout_cmd_id ; u16 timeout_cmd_act ; u16 last_cmd_id[5U] ; u16 last_cmd_act[5U] ; u16 last_cmd_index ; u16 last_cmd_resp_id[5U] ; u16 last_cmd_resp_index ; u16 last_event[5U] ; u16 last_event_index ; u8 data_sent ; u8 cmd_sent ; u8 cmd_resp_received ; u8 event_received ; }; struct rxpd { u8 bss_type ; u8 bss_num ; __le16 rx_pkt_length ; __le16 rx_pkt_offset ; __le16 rx_pkt_type ; __le16 seq_num ; u8 priority ; u8 rx_rate ; s8 snr ; s8 nf ; u8 ht_info ; u8 reserved ; }; enum hrtimer_restart; struct txpd { u8 bss_type ; u8 bss_num ; __le16 tx_pkt_length ; __le16 tx_pkt_offset ; __le16 tx_pkt_type ; __le32 tx_control ; u8 priority ; u8 flags ; u8 pkt_delay_2ms ; u8 reserved1 ; }; enum hrtimer_restart; struct mwifiex_ie_types_data { struct mwifiex_ie_types_header header ; u8 data[1U] ; }; struct mwifiex_ie_types_wmm_param_set { struct mwifiex_ie_types_header header ; u8 wmm_ie[1U] ; }; struct mwifiex_ie_types_wmm_queue_status { struct mwifiex_ie_types_header header ; u8 queue_index ; u8 disabled ; __le16 medium_time ; u8 flow_required ; u8 flow_created ; u32 reserved ; }; struct mwifiex_ra_list_tbl { struct list_head list ; struct sk_buff_head skb_head ; u8 ra[6U] ; u32 is_11n_enabled ; u16 max_amsdu ; u16 ba_pkt_count ; u8 ba_packet_thr ; u16 total_pkt_count ; }; enum mwifiex_ba_status { BA_SETUP_NONE = 0, BA_SETUP_INPROGRESS = 1, BA_SETUP_COMPLETE = 2 } ; struct mwifiex_tx_ba_stream_tbl { struct list_head list ; int tid ; u8 ra[6U] ; enum mwifiex_ba_status ba_status ; }; struct mwifiex_sta_node { struct list_head list ; u8 mac_addr[6U] ; u8 is_wmm_enabled ; u8 is_11n_enabled ; u8 ampdu_sta[8U] ; u16 rx_seq[8U] ; u16 max_amsdu ; }; enum hrtimer_restart; struct mwifiex_ds_11n_tx_cfg { u16 tx_htcap ; u16 tx_htinfo ; u16 misc_config ; }; struct mwifiex_ds_11n_amsdu_aggr_ctrl { u16 enable ; u16 curr_buf_size ; }; struct mwifiex_ie_types_chan_list_param_set { struct mwifiex_ie_types_header header ; struct mwifiex_chan_scan_param_set chan_scan_param[1U] ; }; struct mwifiex_ie_types_htcap { struct mwifiex_ie_types_header header ; struct ieee80211_ht_cap ht_cap ; }; struct mwifiex_ie_types_htinfo { struct mwifiex_ie_types_header header ; struct ieee80211_ht_operation ht_oper ; }; struct mwifiex_ie_types_2040bssco { struct mwifiex_ie_types_header header ; u8 bss_co_2040 ; }; struct mwifiex_ie_types_extcap { struct mwifiex_ie_types_header header ; u8 ext_capab[0U] ; }; struct mwifiex_rx_reorder_tbl; struct reorder_tmr_cnxt { struct timer_list timer ; struct mwifiex_rx_reorder_tbl *ptr ; struct mwifiex_private *priv ; }; struct mwifiex_rx_reorder_tbl { struct list_head list ; int tid ; u8 ta[6U] ; int start_win ; int win_size ; void **rx_reorder_ptr ; struct reorder_tmr_cnxt timer_context ; u8 flags ; }; enum hrtimer_restart; struct mwifiex_11ac_vht_cfg { u8 band_config ; u8 misc_config ; u32 cap_info ; u32 mcs_tx_set ; u32 mcs_rx_set ; }; struct mwifiex_ie_types_vhtcap { struct mwifiex_ie_types_header header ; struct ieee80211_vht_cap vht_cap ; }; struct mwifiex_ie_types_oper_mode_ntf { struct mwifiex_ie_types_header header ; u8 oper_mode ; }; struct mwifiex_ie_types_vht_oper { struct mwifiex_ie_types_header header ; u8 chan_width ; u8 chan_center_freq_1 ; u8 chan_center_freq_2 ; __le16 basic_mcs_map ; }; enum hrtimer_restart; struct rfc_1042_hdr { u8 llc_dsap ; u8 llc_ssap ; u8 llc_ctrl ; u8 snap_oui[3U] ; __be16 snap_type ; }; struct tx_packet_hdr { struct ethhdr eth803_hdr ; struct rfc_1042_hdr rfc1042_hdr ; }; enum hrtimer_restart; struct host_cmd_ds_11n_batimeout { u8 tid ; u8 peer_mac_addr[6U] ; u8 origninator ; }; typedef __u64 __le64; enum hrtimer_restart; struct cfg80211_bss_ies { u64 tsf ; struct callback_head callback_head ; int len ; u8 data[] ; }; struct cfg80211_bss { struct ieee80211_channel *channel ; enum nl80211_bss_scan_width scan_width ; struct cfg80211_bss_ies const *ies ; struct cfg80211_bss_ies const *beacon_ies ; struct cfg80211_bss_ies const *proberesp_ies ; struct cfg80211_bss *hidden_beacon_bss ; s32 signal ; u16 beacon_interval ; u16 capability ; u8 bssid[6U] ; u8 priv[0U] ; }; struct chan_band_param_set { u8 radio_type ; u8 chan_number ; }; struct mwifiex_ie_types_chan_band_list_param_set { struct mwifiex_ie_types_header header ; struct chan_band_param_set chan_band_param[1U] ; }; struct mwifiex_ie_types_rates_param_set { struct mwifiex_ie_types_header header ; u8 rates[1U] ; }; struct mwifiex_ie_types_num_probes { struct mwifiex_ie_types_header header ; __le16 num_probes ; }; struct mwifiex_ie_types_wildcard_ssid_params { struct mwifiex_ie_types_header header ; u8 max_ssid_length ; u8 ssid[1U] ; }; struct mwifiex_ie_types_tsf_timestamp { struct mwifiex_ie_types_header header ; u8 tsf_data[1U] ; }; struct mwifiex_ie_types_vendor_param_set { struct mwifiex_ie_types_header header ; u8 ie[256U] ; }; struct mwifiex_bcn_param { u8 bssid[6U] ; u8 rssi ; __le64 timestamp ; __le16 beacon_period ; __le16 cap_info_bitmap ; }; struct mwifiex_scan_cmd_config { u8 bss_mode ; u8 specific_bssid[6U] ; u32 tlv_buf_len ; u8 tlv_buf[1U] ; }; struct mwifiex_user_scan_chan { u8 chan_number ; u8 radio_type ; u8 scan_type ; u8 reserved ; u32 scan_time ; }; struct mwifiex_user_scan_cfg { u8 bss_mode ; u8 num_probes ; u8 reserved ; u8 specific_bssid[6U] ; struct cfg80211_ssid *ssid_list ; u8 num_ssids ; struct mwifiex_user_scan_chan chan_list[50U] ; }; struct ie_body { u8 grp_key_oui[4U] ; u8 ptk_cnt[2U] ; u8 ptk_body[4U] ; }; struct mwifiex_bss_priv { u8 band ; u64 fw_tsf ; }; union mwifiex_scan_cmd_config_tlv { struct mwifiex_scan_cmd_config config ; u8 config_alloc_buf[549U] ; }; enum hrtimer_restart; struct mwifiex_ie_types_ssid_param_set { struct mwifiex_ie_types_header header ; u8 ssid[1U] ; }; struct mwifiex_cf_param_set { u8 cfp_cnt ; u8 cfp_period ; __le16 cfp_max_duration ; __le16 cfp_duration_remaining ; }; struct mwifiex_ibss_param_set { __le16 atim_window ; }; union __anonunion_cf_ibss_289 { struct mwifiex_cf_param_set cf_param_set[1U] ; struct mwifiex_ibss_param_set ibss_param_set[1U] ; }; struct mwifiex_ie_types_ss_param_set { struct mwifiex_ie_types_header header ; union __anonunion_cf_ibss_289 cf_ibss ; }; struct mwifiex_fh_param_set { __le16 dwell_time ; u8 hop_set ; u8 hop_pattern ; u8 hop_index ; }; struct mwifiex_ds_param_set { u8 current_chan ; }; union __anonunion_fh_ds_290 { struct mwifiex_fh_param_set fh_param_set[1U] ; struct mwifiex_ds_param_set ds_param_set[1U] ; }; struct mwifiex_ie_types_phy_param_set { struct mwifiex_ie_types_header header ; union __anonunion_fh_ds_290 fh_ds ; }; struct mwifiex_ie_types_auth_type { struct mwifiex_ie_types_header header ; __le16 auth_type ; }; struct mwifiex_ie_types_rsn_param_set { struct mwifiex_ie_types_header header ; u8 rsn_ie[1U] ; }; typedef int pao_T__; typedef int pao_T_____0; enum hrtimer_restart; struct netdev_hw_addr { struct list_head list ; unsigned char addr[32U] ; unsigned char type ; bool global_use ; int sync_cnt ; int refcount ; int synced ; struct callback_head callback_head ; }; enum nl80211_channel_type { NL80211_CHAN_NO_HT = 0, NL80211_CHAN_HT20 = 1, NL80211_CHAN_HT40MINUS = 2, NL80211_CHAN_HT40PLUS = 3 } ; struct key_params { u8 *key ; u8 *seq ; int key_len ; int seq_len ; u32 cipher ; }; struct mwifiex_ds_get_stats { u32 mcast_tx_frame ; u32 failed ; u32 retry ; u32 multi_retry ; u32 frame_dup ; u32 rts_success ; u32 rts_failure ; u32 ack_failure ; u32 rx_frag ; u32 mcast_rx_frame ; u32 fcs_error ; u32 tx_frame ; u32 wep_icv_error[4U] ; }; struct mwifiex_ver_ext { u32 version_str_sel ; char version_str[128U] ; }; struct mwifiex_bss_info { u32 bss_mode ; struct cfg80211_ssid ssid ; u32 bss_chan ; u8 country_code[3U] ; u32 media_connected ; u32 max_power_level ; u32 min_power_level ; u32 adhoc_state ; int bcn_nf_last ; u32 wep_status ; u32 is_hs_configured ; u32 is_deep_sleep ; u8 bssid[6U] ; }; struct mwifiex_ds_encrypt_key { u32 key_disable ; u32 key_index ; u32 key_len ; u8 key_material[32U] ; u8 mac_addr[6U] ; u32 is_wapi_key ; u8 pn[16U] ; u8 is_igtk_key ; }; struct mwifiex_power_cfg { u32 is_power_auto ; u32 power_level ; }; struct mwifiex_ds_reg_rw { __le32 type ; __le32 offset ; __le32 value ; }; struct mwifiex_ds_read_eeprom { __le16 offset ; __le16 byte_count ; u8 value[256U] ; }; struct mwifiex_ds_misc_gen_ie { u32 type ; u32 len ; u8 ie_data[256U] ; }; struct mwifiex_power_group { u8 modulation_class ; u8 first_rate_code ; u8 last_rate_code ; s8 power_step ; s8 power_min ; s8 power_max ; u8 ht_bandwidth ; u8 reserved ; }; struct mwifiex_types_power_group { __le16 type ; __le16 length ; }; union __anonunion_ver_321 { u32 l ; u8 c[4U] ; }; typedef u64 phys_addr_t; typedef phys_addr_t resource_size_t; enum hrtimer_restart; struct resource { resource_size_t start ; resource_size_t end ; char const *name ; unsigned long flags ; struct resource *parent ; struct resource *sibling ; struct resource *child ; }; struct pci_dev; struct pci_bus; struct mwifiex_ds_ant_cfg { u32 tx_ant ; u32 rx_ant ; }; struct mwifiex_mef_filter { u16 repeat ; u16 offset ; s8 byte_seq[7U] ; u8 filt_type ; u8 filt_action ; }; struct mwifiex_mef_entry { u8 mode ; u8 action ; struct mwifiex_mef_filter filter[10U] ; }; struct mwifiex_ds_mef_cfg { u32 criteria ; u16 num_entries ; struct mwifiex_mef_entry *mef_entry ; }; struct filt_field_param { u8 operation ; u8 operand_len ; u16 offset ; u8 operand_byte_stream[4U] ; }; struct mwifiex_coalesce_rule { u16 max_coalescing_delay ; u8 num_of_fields ; u8 pkt_type ; struct filt_field_param params[4U] ; }; struct mwifiex_ds_coalesce_cfg { u16 num_of_rules ; struct mwifiex_coalesce_rule rule[8U] ; }; struct mwifiex_cmac_param { u8 ipn[8U] ; u8 key[16U] ; }; struct mwifiex_rate_scope { __le16 type ; __le16 length ; __le16 hr_dsss_rate_bitmap ; __le16 ofdm_rate_bitmap ; __le16 ht_mcs_rate_bitmap[8U] ; }; struct mwifiex_rate_drop_pattern { __le16 type ; __le16 length ; __le32 rate_drop_mode ; }; struct host_cmd_tlv_mac_addr { struct mwifiex_ie_types_header header ; u8 mac_addr[6U] ; }; struct mwifiex_ie_types_rssi_threshold { struct mwifiex_ie_types_header header ; u8 abs_value ; u8 evt_freq ; }; struct pci_device_id { __u32 vendor ; __u32 device ; __u32 subvendor ; __u32 subdevice ; __u32 class ; __u32 class_mask ; kernel_ulong_t driver_data ; }; struct hotplug_slot; struct pci_slot { struct pci_bus *bus ; struct list_head list ; struct hotplug_slot *hotplug ; unsigned char number ; struct kobject kobj ; }; typedef int pci_power_t; typedef unsigned int pci_channel_state_t; enum pci_channel_state { pci_channel_io_normal = 1, pci_channel_io_frozen = 2, pci_channel_io_perm_failure = 3 } ; typedef unsigned short pci_dev_flags_t; typedef unsigned short pci_bus_flags_t; struct pcie_link_state; struct pci_vpd; struct pci_sriov; struct pci_ats; struct pci_driver; union __anonunion____missing_field_name_319 { struct pci_sriov *sriov ; struct pci_dev *physfn ; }; struct pci_dev { struct list_head bus_list ; struct pci_bus *bus ; struct pci_bus *subordinate ; void *sysdata ; struct proc_dir_entry *procent ; struct pci_slot *slot ; unsigned int devfn ; unsigned short vendor ; unsigned short device ; unsigned short subsystem_vendor ; unsigned short subsystem_device ; unsigned int class ; u8 revision ; u8 hdr_type ; u8 pcie_cap ; u8 msi_cap ; u8 msix_cap ; u8 pcie_mpss : 3 ; u8 rom_base_reg ; u8 pin ; u16 pcie_flags_reg ; struct pci_driver *driver ; u64 dma_mask ; struct device_dma_parameters dma_parms ; pci_power_t current_state ; u8 pm_cap ; unsigned int pme_support : 5 ; unsigned int pme_interrupt : 1 ; unsigned int pme_poll : 1 ; unsigned int d1_support : 1 ; unsigned int d2_support : 1 ; unsigned int no_d1d2 : 1 ; unsigned int no_d3cold : 1 ; unsigned int d3cold_allowed : 1 ; unsigned int mmio_always_on : 1 ; unsigned int wakeup_prepared : 1 ; unsigned int runtime_d3cold : 1 ; unsigned int d3_delay ; unsigned int d3cold_delay ; struct pcie_link_state *link_state ; pci_channel_state_t error_state ; struct device dev ; int cfg_size ; unsigned int irq ; struct resource resource[17U] ; bool match_driver ; unsigned int transparent : 1 ; unsigned int multifunction : 1 ; unsigned int is_added : 1 ; unsigned int is_busmaster : 1 ; unsigned int no_msi : 1 ; unsigned int block_cfg_access : 1 ; unsigned int broken_parity_status : 1 ; unsigned int irq_reroute_variant : 2 ; unsigned int msi_enabled : 1 ; unsigned int msix_enabled : 1 ; unsigned int ari_enabled : 1 ; unsigned int is_managed : 1 ; unsigned int needs_freset : 1 ; unsigned int state_saved : 1 ; unsigned int is_physfn : 1 ; unsigned int is_virtfn : 1 ; unsigned int reset_fn : 1 ; unsigned int is_hotplug_bridge : 1 ; unsigned int __aer_firmware_first_valid : 1 ; unsigned int __aer_firmware_first : 1 ; unsigned int broken_intx_masking : 1 ; unsigned int io_window_1k : 1 ; pci_dev_flags_t dev_flags ; atomic_t enable_cnt ; u32 saved_config_space[16U] ; struct hlist_head saved_cap_space ; struct bin_attribute *rom_attr ; int rom_attr_enabled ; struct bin_attribute *res_attr[17U] ; struct bin_attribute *res_attr_wc[17U] ; struct list_head msi_list ; struct attribute_group const **msi_irq_groups ; struct pci_vpd *vpd ; union __anonunion____missing_field_name_319 __annonCompField91 ; struct pci_ats *ats ; phys_addr_t rom ; size_t romlen ; }; struct pci_ops; struct msi_chip; struct pci_bus { struct list_head node ; struct pci_bus *parent ; struct list_head children ; struct list_head devices ; struct pci_dev *self ; struct list_head slots ; struct resource *resource[4U] ; struct list_head resources ; struct resource busn_res ; struct pci_ops *ops ; struct msi_chip *msi ; void *sysdata ; struct proc_dir_entry *procdir ; unsigned char number ; unsigned char primary ; unsigned char max_bus_speed ; unsigned char cur_bus_speed ; char name[48U] ; unsigned short bridge_ctl ; pci_bus_flags_t bus_flags ; struct device *bridge ; struct device dev ; struct bin_attribute *legacy_io ; struct bin_attribute *legacy_mem ; unsigned int is_added : 1 ; }; struct pci_ops { int (*read)(struct pci_bus * , unsigned int , int , int , u32 * ) ; int (*write)(struct pci_bus * , unsigned int , int , int , u32 ) ; }; struct pci_dynids { spinlock_t lock ; struct list_head list ; }; typedef unsigned int pci_ers_result_t; struct pci_error_handlers { pci_ers_result_t (*error_detected)(struct pci_dev * , enum pci_channel_state ) ; pci_ers_result_t (*mmio_enabled)(struct pci_dev * ) ; pci_ers_result_t (*link_reset)(struct pci_dev * ) ; pci_ers_result_t (*slot_reset)(struct pci_dev * ) ; void (*resume)(struct pci_dev * ) ; }; struct pci_driver { struct list_head node ; char const *name ; struct pci_device_id const *id_table ; int (*probe)(struct pci_dev * , struct pci_device_id const * ) ; void (*remove)(struct pci_dev * ) ; int (*suspend)(struct pci_dev * , pm_message_t ) ; int (*suspend_late)(struct pci_dev * , pm_message_t ) ; int (*resume_early)(struct pci_dev * ) ; int (*resume)(struct pci_dev * ) ; void (*shutdown)(struct pci_dev * ) ; int (*sriov_configure)(struct pci_dev * , int ) ; struct pci_error_handlers const *err_handler ; struct device_driver driver ; struct pci_dynids dynids ; }; struct mwifiex_pcie_card_reg { u16 cmd_addr_lo ; u16 cmd_addr_hi ; u16 fw_status ; u16 cmd_size ; u16 cmdrsp_addr_lo ; u16 cmdrsp_addr_hi ; u16 tx_rdptr ; u16 tx_wrptr ; u16 rx_rdptr ; u16 rx_wrptr ; u16 evt_rdptr ; u16 evt_wrptr ; u16 drv_rdy ; u16 tx_start_ptr ; u32 tx_mask ; u32 tx_wrap_mask ; u32 rx_mask ; u32 rx_wrap_mask ; u32 tx_rollover_ind ; u32 rx_rollover_ind ; u32 evt_rollover_ind ; u8 ring_flag_sop ; u8 ring_flag_eop ; u8 ring_flag_xs_sop ; u8 ring_flag_xs_eop ; u32 ring_tx_start_ptr ; u8 pfu_enabled ; u8 sleep_cookie ; }; struct mwifiex_pcie_device { char const *firmware ; struct mwifiex_pcie_card_reg const *reg ; u16 blksz_fw_dl ; }; struct pcie_service_card { struct pci_dev *dev ; struct mwifiex_adapter *adapter ; struct mwifiex_pcie_device pcie ; u8 txbd_flush ; u32 txbd_wrptr ; u32 txbd_rdptr ; u32 txbd_ring_size ; u8 *txbd_ring_vbase ; dma_addr_t txbd_ring_pbase ; void *txbd_ring[32U] ; struct sk_buff *tx_buf_list[32U] ; u32 rxbd_wrptr ; u32 rxbd_rdptr ; u32 rxbd_ring_size ; u8 *rxbd_ring_vbase ; dma_addr_t rxbd_ring_pbase ; void *rxbd_ring[32U] ; struct sk_buff *rx_buf_list[32U] ; u32 evtbd_wrptr ; u32 evtbd_rdptr ; u32 evtbd_ring_size ; u8 *evtbd_ring_vbase ; dma_addr_t evtbd_ring_pbase ; void *evtbd_ring[4U] ; struct sk_buff *evt_buf_list[4U] ; struct sk_buff *cmd_buf ; struct sk_buff *cmdrsp_buf ; u8 *sleep_cookie_vbase ; dma_addr_t sleep_cookie_pbase ; void *pci_mmap ; void *pci_mmap1 ; }; enum state_11d_t { DISABLE_11D = 0, ENABLE_11D = 1 } ; enum hrtimer_restart; enum nl80211_hidden_ssid { NL80211_HIDDEN_SSID_NOT_IN_USE = 0, NL80211_HIDDEN_SSID_ZERO_LEN = 1, NL80211_HIDDEN_SSID_ZERO_CONTENTS = 2 } ; enum nl80211_acl_policy { NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED = 0, NL80211_ACL_POLICY_DENY_UNLESS_LISTED = 1 } ; struct cfg80211_beacon_data { u8 const *head ; u8 const *tail ; u8 const *beacon_ies ; u8 const *proberesp_ies ; u8 const *assocresp_ies ; u8 const *probe_resp ; size_t head_len ; size_t tail_len ; size_t beacon_ies_len ; size_t proberesp_ies_len ; size_t assocresp_ies_len ; size_t probe_resp_len ; }; struct cfg80211_acl_data { enum nl80211_acl_policy acl_policy ; int n_acl_entries ; struct mac_address mac_addrs[] ; }; struct cfg80211_ap_settings { struct cfg80211_chan_def chandef ; struct cfg80211_beacon_data beacon ; int beacon_interval ; int dtim_period ; u8 const *ssid ; size_t ssid_len ; enum nl80211_hidden_ssid hidden_ssid ; struct cfg80211_crypto_settings crypto ; bool privacy ; enum nl80211_auth_type auth_type ; int inactivity_timeout ; u8 p2p_ctwindow ; bool p2p_opp_ps ; struct cfg80211_acl_data const *acl ; bool radar_required ; }; struct mwifiex_802_11_ssid { u32 ssid_len ; u8 ssid[32U] ; }; struct mwifiex_types_wmm_info { u8 oui[4U] ; u8 subtype ; u8 version ; u8 qos_info ; u8 reserved ; struct ieee_types_wmm_ac_parameters ac_params[4U] ; }; struct wpa_param { u8 pairwise_cipher_wpa ; u8 pairwise_cipher_wpa2 ; u8 group_cipher ; u32 length ; u8 passphrase[64U] ; }; struct wep_key { u8 key_index ; u8 is_default ; u16 length ; u8 key[13U] ; }; struct mwifiex_uap_bss_param { u8 channel ; u8 band_cfg ; u16 rts_threshold ; u16 frag_threshold ; u8 retry_limit ; struct mwifiex_802_11_ssid ssid ; u8 bcast_ssid_ctl ; u8 radio_ctl ; u8 dtim_period ; u16 beacon_period ; u16 auth_mode ; u16 protocol ; u16 key_mgmt ; u16 key_mgmt_operation ; struct wpa_param wpa_cfg ; struct wep_key wep_cfg[4U] ; struct ieee80211_ht_cap ht_cap ; struct ieee80211_vht_cap vht_cap ; u8 rates[14U] ; u32 sta_ao_timer ; u32 ps_sta_ao_timer ; u8 qos_info ; struct mwifiex_types_wmm_info wmm_info ; }; struct mwifiex_ie_types_wmmcap { struct mwifiex_ie_types_header header ; struct mwifiex_types_wmm_info wmm_info ; }; struct host_cmd_tlv_akmp { struct mwifiex_ie_types_header header ; __le16 key_mgmt ; __le16 key_mgmt_operation ; }; struct host_cmd_tlv_pwk_cipher { struct mwifiex_ie_types_header header ; __le16 proto ; u8 cipher ; u8 reserved ; }; struct host_cmd_tlv_gwk_cipher { struct mwifiex_ie_types_header header ; u8 cipher ; u8 reserved ; }; struct host_cmd_tlv_passphrase { struct mwifiex_ie_types_header header ; u8 passphrase[0U] ; }; struct host_cmd_tlv_wep_key { struct mwifiex_ie_types_header header ; u8 key_index ; u8 is_default ; u8 key[1U] ; }; struct host_cmd_tlv_auth_type { struct mwifiex_ie_types_header header ; u8 auth_type ; }; struct host_cmd_tlv_encrypt_protocol { struct mwifiex_ie_types_header header ; __le16 proto ; }; struct host_cmd_tlv_ssid { struct mwifiex_ie_types_header header ; u8 ssid[0U] ; }; struct host_cmd_tlv_rates { struct mwifiex_ie_types_header header ; u8 rates[0U] ; }; struct host_cmd_tlv_bcast_ssid { struct mwifiex_ie_types_header header ; u8 bcast_ctl ; }; struct host_cmd_tlv_beacon_period { struct mwifiex_ie_types_header header ; __le16 period ; }; struct host_cmd_tlv_dtim_period { struct mwifiex_ie_types_header header ; u8 period ; }; struct host_cmd_tlv_frag_threshold { struct mwifiex_ie_types_header header ; __le16 frag_thr ; }; struct host_cmd_tlv_rts_threshold { struct mwifiex_ie_types_header header ; __le16 rts_thr ; }; struct host_cmd_tlv_retry_limit { struct mwifiex_ie_types_header header ; u8 limit ; }; struct host_cmd_tlv_channel_band { struct mwifiex_ie_types_header header ; u8 band_config ; u8 channel ; }; struct host_cmd_tlv_ageout_timer { struct mwifiex_ie_types_header header ; __le32 sta_ao_timer ; }; struct mwifiex_ie_list { __le16 type ; __le16 len ; struct mwifiex_ie ie_list[16U] ; }; enum hrtimer_restart; enum hrtimer_restart; union reg { struct host_cmd_ds_mac_reg_access *mac ; struct host_cmd_ds_bbp_reg_access *bbp ; struct host_cmd_ds_rf_reg_access *rf ; struct host_cmd_ds_pmic_reg_access *pmic ; struct host_cmd_ds_802_11_eeprom_access *eeprom ; }; enum hrtimer_restart; enum nl80211_key_type { NL80211_KEYTYPE_GROUP = 0, NL80211_KEYTYPE_PAIRWISE = 1, NL80211_KEYTYPE_PEERKEY = 2, NUM_NL80211_KEYTYPES = 3 } ; enum nl80211_cqm_rssi_threshold_event { NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW = 0, NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH = 1, NL80211_CQM_RSSI_BEACON_LOSS_EVENT = 2 } ; enum hrtimer_restart; struct nl80211_sta_flag_update { __u32 mask ; __u32 set ; }; enum nl80211_mesh_power_mode { NL80211_MESH_POWER_UNKNOWN = 0, NL80211_MESH_POWER_ACTIVE = 1, NL80211_MESH_POWER_LIGHT_SLEEP = 2, NL80211_MESH_POWER_DEEP_SLEEP = 3, __NL80211_MESH_POWER_AFTER_LAST = 4, NL80211_MESH_POWER_MAX = 3 } ; struct rate_info { u8 flags ; u8 mcs ; u16 legacy ; u8 nss ; }; struct sta_bss_parameters { u8 flags ; u8 dtim_period ; u16 beacon_interval ; }; struct station_info { u32 filled ; u32 connected_time ; u32 inactive_time ; u64 rx_bytes ; u64 tx_bytes ; u16 llid ; u16 plid ; u8 plink_state ; s8 signal ; s8 signal_avg ; u8 chains ; s8 chain_signal[4U] ; s8 chain_signal_avg[4U] ; struct rate_info txrate ; struct rate_info rxrate ; u32 rx_packets ; u32 tx_packets ; u32 tx_retries ; u32 tx_failed ; u32 rx_dropped_misc ; struct sta_bss_parameters bss_param ; struct nl80211_sta_flag_update sta_flags ; int generation ; u8 const *assoc_req_ies ; size_t assoc_req_ies_len ; u32 beacon_loss_count ; s64 t_offset ; enum nl80211_mesh_power_mode local_pm ; enum nl80211_mesh_power_mode peer_pm ; enum nl80211_mesh_power_mode nonpeer_pm ; }; struct mwifiex_assoc_event { u8 sta_addr[6U] ; __le16 type ; __le16 len ; __le16 frame_control ; __le16 cap_info ; __le16 listen_interval ; u8 data[0U] ; }; enum hrtimer_restart; typedef __u16 __sum16; enum hrtimer_restart; struct ipv6hdr { __u8 priority : 4 ; __u8 version : 4 ; __u8 flow_lbl[3U] ; __be16 payload_len ; __u8 nexthdr ; __u8 hop_limit ; struct in6_addr saddr ; struct in6_addr daddr ; }; struct icmpv6_echo { __be16 identifier ; __be16 sequence ; }; struct icmpv6_nd_advt { __u32 reserved : 5 ; __u32 override : 1 ; __u32 solicited : 1 ; __u32 router : 1 ; __u32 reserved2 : 24 ; }; struct icmpv6_nd_ra { __u8 hop_limit ; __u8 reserved : 3 ; __u8 router_pref : 2 ; __u8 home_agent : 1 ; __u8 other : 1 ; __u8 managed : 1 ; __be16 rt_lifetime ; }; union __anonunion_icmp6_dataun_238 { __be32 un_data32[1U] ; __be16 un_data16[2U] ; __u8 un_data8[4U] ; struct icmpv6_echo u_echo ; struct icmpv6_nd_advt u_nd_advt ; struct icmpv6_nd_ra u_nd_ra ; }; struct icmp6hdr { __u8 icmp6_type ; __u8 icmp6_code ; __sum16 icmp6_cksum ; union __anonunion_icmp6_dataun_238 icmp6_dataun ; }; struct arphdr { __be16 ar_hrd ; __be16 ar_pro ; unsigned char ar_hln ; unsigned char ar_pln ; __be16 ar_op ; }; struct mwifiex_arp_eth_header { struct arphdr hdr ; u8 ar_sha[6U] ; u8 ar_sip[4U] ; u8 ar_tha[6U] ; u8 ar_tip[4U] ; }; struct rx_packet_hdr { struct ethhdr eth803_hdr ; struct rfc_1042_hdr rfc1042_hdr ; }; enum hrtimer_restart; struct uap_txpd { u8 bss_type ; u8 bss_num ; __le16 tx_pkt_length ; __le16 tx_pkt_offset ; __le16 tx_pkt_type ; __le32 tx_control ; u8 priority ; u8 flags ; u8 pkt_delay_2ms ; u8 reserved1 ; __le32 reserved2 ; }; struct uap_rxpd { u8 bss_type ; u8 bss_num ; __le16 rx_pkt_length ; __le16 rx_pkt_offset ; __le16 rx_pkt_type ; __le16 seq_num ; u8 priority ; u8 reserved1 ; }; enum hrtimer_restart; enum nl80211_ac { NL80211_AC_VO = 0, NL80211_AC_VI = 1, NL80211_AC_BE = 2, NL80211_AC_BK = 3, NL80211_NUM_ACS = 4 } ; enum nl80211_tx_power_setting { NL80211_TX_POWER_AUTOMATIC = 0, NL80211_TX_POWER_LIMITED = 1, NL80211_TX_POWER_FIXED = 2 } ; enum nl80211_coalesce_condition { NL80211_COALESCE_CONDITION_MATCH = 0, NL80211_COALESCE_CONDITION_NO_MATCH = 1 } ; enum nl80211_tdls_operation { NL80211_TDLS_DISCOVERY_REQ = 0, NL80211_TDLS_SETUP = 1, NL80211_TDLS_TEARDOWN = 2, NL80211_TDLS_ENABLE_LINK = 3, NL80211_TDLS_DISABLE_LINK = 4 } ; enum nl80211_crit_proto_id { NL80211_CRIT_PROTO_UNSPEC = 0, NL80211_CRIT_PROTO_DHCP = 1, NL80211_CRIT_PROTO_EAPOL = 2, NL80211_CRIT_PROTO_APIPA = 3, NUM_NL80211_CRIT_PROTO = 4 } ; struct ieee80211_msrment_ie { u8 token ; u8 mode ; u8 type ; u8 request[0U] ; }; struct ieee80211_ext_chansw_ie { u8 mode ; u8 new_operating_class ; u8 new_ch_num ; u8 count ; }; struct __anonstruct_auth_239 { __le16 auth_alg ; __le16 auth_transaction ; __le16 status_code ; u8 variable[0U] ; }; struct __anonstruct_deauth_240 { __le16 reason_code ; }; struct __anonstruct_assoc_req_241 { __le16 capab_info ; __le16 listen_interval ; u8 variable[0U] ; }; struct __anonstruct_assoc_resp_242 { __le16 capab_info ; __le16 status_code ; __le16 aid ; u8 variable[0U] ; }; struct __anonstruct_reassoc_resp_243 { __le16 capab_info ; __le16 status_code ; __le16 aid ; u8 variable[0U] ; }; struct __anonstruct_reassoc_req_244 { __le16 capab_info ; __le16 listen_interval ; u8 current_ap[6U] ; u8 variable[0U] ; }; struct __anonstruct_disassoc_245 { __le16 reason_code ; }; struct __anonstruct_beacon_246 { __le64 timestamp ; __le16 beacon_int ; __le16 capab_info ; u8 variable[0U] ; }; struct __anonstruct_probe_req_247 { u8 variable[0U] ; }; struct __anonstruct_probe_resp_248 { __le64 timestamp ; __le16 beacon_int ; __le16 capab_info ; u8 variable[0U] ; }; struct __anonstruct_wme_action_251 { u8 action_code ; u8 dialog_token ; u8 status_code ; u8 variable[0U] ; }; struct __anonstruct_chan_switch_252 { u8 action_code ; u8 variable[0U] ; }; struct __anonstruct_ext_chan_switch_253 { u8 action_code ; struct ieee80211_ext_chansw_ie data ; u8 variable[0U] ; }; struct __anonstruct_measurement_254 { u8 action_code ; u8 dialog_token ; u8 element_id ; u8 length ; struct ieee80211_msrment_ie msr_elem ; }; struct __anonstruct_addba_req_255 { u8 action_code ; u8 dialog_token ; __le16 capab ; __le16 timeout ; __le16 start_seq_num ; }; struct __anonstruct_addba_resp_256 { u8 action_code ; u8 dialog_token ; __le16 status ; __le16 capab ; __le16 timeout ; }; struct __anonstruct_delba_257 { u8 action_code ; __le16 params ; __le16 reason_code ; }; struct __anonstruct_self_prot_258 { u8 action_code ; u8 variable[0U] ; }; struct __anonstruct_mesh_action_259 { u8 action_code ; u8 variable[0U] ; }; struct __anonstruct_sa_query_260 { u8 action ; u8 trans_id[2U] ; }; struct __anonstruct_ht_smps_261 { u8 action ; u8 smps_control ; }; struct __anonstruct_ht_notify_cw_262 { u8 action_code ; u8 chanwidth ; }; struct __anonstruct_tdls_discover_resp_263 { u8 action_code ; u8 dialog_token ; __le16 capability ; u8 variable[0U] ; }; struct __anonstruct_vht_opmode_notif_264 { u8 action_code ; u8 operating_mode ; }; union __anonunion_u_250 { struct __anonstruct_wme_action_251 wme_action ; struct __anonstruct_chan_switch_252 chan_switch ; struct __anonstruct_ext_chan_switch_253 ext_chan_switch ; struct __anonstruct_measurement_254 measurement ; struct __anonstruct_addba_req_255 addba_req ; struct __anonstruct_addba_resp_256 addba_resp ; struct __anonstruct_delba_257 delba ; struct __anonstruct_self_prot_258 self_prot ; struct __anonstruct_mesh_action_259 mesh_action ; struct __anonstruct_sa_query_260 sa_query ; struct __anonstruct_ht_smps_261 ht_smps ; struct __anonstruct_ht_notify_cw_262 ht_notify_cw ; struct __anonstruct_tdls_discover_resp_263 tdls_discover_resp ; struct __anonstruct_vht_opmode_notif_264 vht_opmode_notif ; }; struct __anonstruct_action_249 { u8 category ; union __anonunion_u_250 u ; }; union __anonunion_u_238 { struct __anonstruct_auth_239 auth ; struct __anonstruct_deauth_240 deauth ; struct __anonstruct_assoc_req_241 assoc_req ; struct __anonstruct_assoc_resp_242 assoc_resp ; struct __anonstruct_reassoc_resp_243 reassoc_resp ; struct __anonstruct_reassoc_req_244 reassoc_req ; struct __anonstruct_disassoc_245 disassoc ; struct __anonstruct_beacon_246 beacon ; struct __anonstruct_probe_req_247 probe_req ; struct __anonstruct_probe_resp_248 probe_resp ; struct __anonstruct_action_249 action ; }; struct ieee80211_mgmt { __le16 frame_control ; __le16 duration ; u8 da[6U] ; u8 sa[6U] ; u8 bssid[6U] ; __le16 seq_ctrl ; union __anonunion_u_238 u ; }; struct survey_info { struct ieee80211_channel *channel ; u64 channel_time ; u64 channel_time_busy ; u64 channel_time_ext_busy ; u64 channel_time_rx ; u64 channel_time_tx ; u32 filled ; s8 noise ; }; struct cfg80211_csa_settings { struct cfg80211_chan_def chandef ; struct cfg80211_beacon_data beacon_csa ; u16 counter_offset_beacon ; u16 counter_offset_presp ; struct cfg80211_beacon_data beacon_after ; bool radar_required ; bool block_tx ; u8 count ; }; struct station_parameters { u8 const *supported_rates ; struct net_device *vlan ; u32 sta_flags_mask ; u32 sta_flags_set ; u32 sta_modify_mask ; int listen_interval ; u16 aid ; u8 supported_rates_len ; u8 plink_action ; u8 plink_state ; struct ieee80211_ht_cap const *ht_capa ; struct ieee80211_vht_cap const *vht_capa ; u8 uapsd_queues ; u8 max_sp ; enum nl80211_mesh_power_mode local_pm ; u16 capability ; u8 const *ext_capab ; u8 ext_capab_len ; u8 const *supported_channels ; u8 supported_channels_len ; u8 const *supported_oper_classes ; u8 supported_oper_classes_len ; u8 opmode_notif ; bool opmode_notif_used ; }; struct mpath_info { u32 filled ; u32 frame_qlen ; u32 sn ; u32 metric ; u32 exptime ; u32 discovery_timeout ; u8 discovery_retries ; u8 flags ; int generation ; }; struct bss_parameters { int use_cts_prot ; int use_short_preamble ; int use_short_slot_time ; u8 *basic_rates ; u8 basic_rates_len ; int ap_isolate ; int ht_opmode ; s8 p2p_ctwindow ; s8 p2p_opp_ps ; }; struct mesh_config { u16 dot11MeshRetryTimeout ; u16 dot11MeshConfirmTimeout ; u16 dot11MeshHoldingTimeout ; u16 dot11MeshMaxPeerLinks ; u8 dot11MeshMaxRetries ; u8 dot11MeshTTL ; u8 element_ttl ; bool auto_open_plinks ; u32 dot11MeshNbrOffsetMaxNeighbor ; u8 dot11MeshHWMPmaxPREQretries ; u32 path_refresh_time ; u16 min_discovery_timeout ; u32 dot11MeshHWMPactivePathTimeout ; u16 dot11MeshHWMPpreqMinInterval ; u16 dot11MeshHWMPperrMinInterval ; u16 dot11MeshHWMPnetDiameterTraversalTime ; u8 dot11MeshHWMPRootMode ; u16 dot11MeshHWMPRannInterval ; bool dot11MeshGateAnnouncementProtocol ; bool dot11MeshForwarding ; s32 rssi_threshold ; u16 ht_opmode ; u32 dot11MeshHWMPactivePathToRootTimeout ; u16 dot11MeshHWMProotInterval ; u16 dot11MeshHWMPconfirmationInterval ; enum nl80211_mesh_power_mode power_mode ; u16 dot11MeshAwakeWindowDuration ; u32 plink_timeout ; }; struct mesh_setup { struct cfg80211_chan_def chandef ; u8 const *mesh_id ; u8 mesh_id_len ; u8 sync_method ; u8 path_sel_proto ; u8 path_metric ; u8 auth_id ; u8 const *ie ; u8 ie_len ; bool is_authenticated ; bool is_secure ; bool user_mpm ; u8 dtim_period ; u16 beacon_interval ; int mcast_rate[3U] ; u32 basic_rates ; }; struct ieee80211_txq_params { enum nl80211_ac ac ; u16 txop ; u16 cwmin ; u16 cwmax ; u8 aifs ; }; struct cfg80211_match_set { struct cfg80211_ssid ssid ; }; struct cfg80211_sched_scan_request { struct cfg80211_ssid *ssids ; int n_ssids ; u32 n_channels ; enum nl80211_bss_scan_width scan_width ; u32 interval ; u8 const *ie ; size_t ie_len ; u32 flags ; struct cfg80211_match_set *match_sets ; int n_match_sets ; s32 rssi_thold ; struct wiphy *wiphy ; struct net_device *dev ; unsigned long scan_start ; struct ieee80211_channel *channels[0U] ; }; struct cfg80211_auth_request { struct cfg80211_bss *bss ; u8 const *ie ; size_t ie_len ; enum nl80211_auth_type auth_type ; u8 const *key ; u8 key_len ; u8 key_idx ; u8 const *sae_data ; size_t sae_data_len ; }; struct cfg80211_assoc_request { struct cfg80211_bss *bss ; u8 const *ie ; u8 const *prev_bssid ; size_t ie_len ; struct cfg80211_crypto_settings crypto ; bool use_mfp ; u32 flags ; struct ieee80211_ht_cap ht_capa ; struct ieee80211_ht_cap ht_capa_mask ; struct ieee80211_vht_cap vht_capa ; struct ieee80211_vht_cap vht_capa_mask ; }; struct cfg80211_deauth_request { u8 const *bssid ; u8 const *ie ; size_t ie_len ; u16 reason_code ; bool local_state_change ; }; struct cfg80211_disassoc_request { struct cfg80211_bss *bss ; u8 const *ie ; size_t ie_len ; u16 reason_code ; bool local_state_change ; }; struct __anonstruct_control_274 { u32 legacy ; u8 ht_mcs[10U] ; u16 vht_mcs[8U] ; }; struct cfg80211_bitrate_mask { struct __anonstruct_control_274 control[3U] ; }; struct cfg80211_pmksa { u8 *bssid ; u8 *pmkid ; }; struct cfg80211_coalesce_rules { int delay ; enum nl80211_coalesce_condition condition ; struct cfg80211_pkt_pattern *patterns ; int n_patterns ; }; struct cfg80211_coalesce { struct cfg80211_coalesce_rules *rules ; int n_rules ; }; struct cfg80211_gtk_rekey_data { u8 kek[16U] ; u8 kck[16U] ; u8 replay_ctr[8U] ; }; struct cfg80211_update_ft_ies_params { u16 md ; u8 const *ie ; size_t ie_len ; }; struct cfg80211_mgmt_tx_params { struct ieee80211_channel *chan ; bool offchan ; unsigned int wait ; u8 const *buf ; size_t len ; bool no_cck ; bool dont_wait_for_ack ; }; struct cfg80211_ops { int (*suspend)(struct wiphy * , struct cfg80211_wowlan * ) ; int (*resume)(struct wiphy * ) ; void (*set_wakeup)(struct wiphy * , bool ) ; struct wireless_dev *(*add_virtual_intf)(struct wiphy * , char const * , enum nl80211_iftype , u32 * , struct vif_params * ) ; int (*del_virtual_intf)(struct wiphy * , struct wireless_dev * ) ; int (*change_virtual_intf)(struct wiphy * , struct net_device * , enum nl80211_iftype , u32 * , struct vif_params * ) ; int (*add_key)(struct wiphy * , struct net_device * , u8 , bool , u8 const * , struct key_params * ) ; int (*get_key)(struct wiphy * , struct net_device * , u8 , bool , u8 const * , void * , void (*)(void * , struct key_params * ) ) ; int (*del_key)(struct wiphy * , struct net_device * , u8 , bool , u8 const * ) ; int (*set_default_key)(struct wiphy * , struct net_device * , u8 , bool , bool ) ; int (*set_default_mgmt_key)(struct wiphy * , struct net_device * , u8 ) ; int (*start_ap)(struct wiphy * , struct net_device * , struct cfg80211_ap_settings * ) ; int (*change_beacon)(struct wiphy * , struct net_device * , struct cfg80211_beacon_data * ) ; int (*stop_ap)(struct wiphy * , struct net_device * ) ; int (*add_station)(struct wiphy * , struct net_device * , u8 * , struct station_parameters * ) ; int (*del_station)(struct wiphy * , struct net_device * , u8 * ) ; int (*change_station)(struct wiphy * , struct net_device * , u8 * , struct station_parameters * ) ; int (*get_station)(struct wiphy * , struct net_device * , u8 * , struct station_info * ) ; int (*dump_station)(struct wiphy * , struct net_device * , int , u8 * , struct station_info * ) ; int (*add_mpath)(struct wiphy * , struct net_device * , u8 * , u8 * ) ; int (*del_mpath)(struct wiphy * , struct net_device * , u8 * ) ; int (*change_mpath)(struct wiphy * , struct net_device * , u8 * , u8 * ) ; int (*get_mpath)(struct wiphy * , struct net_device * , u8 * , u8 * , struct mpath_info * ) ; int (*dump_mpath)(struct wiphy * , struct net_device * , int , u8 * , u8 * , struct mpath_info * ) ; int (*get_mesh_config)(struct wiphy * , struct net_device * , struct mesh_config * ) ; int (*update_mesh_config)(struct wiphy * , struct net_device * , u32 , struct mesh_config const * ) ; int (*join_mesh)(struct wiphy * , struct net_device * , struct mesh_config const * , struct mesh_setup const * ) ; int (*leave_mesh)(struct wiphy * , struct net_device * ) ; int (*change_bss)(struct wiphy * , struct net_device * , struct bss_parameters * ) ; int (*set_txq_params)(struct wiphy * , struct net_device * , struct ieee80211_txq_params * ) ; int (*libertas_set_mesh_channel)(struct wiphy * , struct net_device * , struct ieee80211_channel * ) ; int (*set_monitor_channel)(struct wiphy * , struct cfg80211_chan_def * ) ; int (*scan)(struct wiphy * , struct cfg80211_scan_request * ) ; int (*auth)(struct wiphy * , struct net_device * , struct cfg80211_auth_request * ) ; int (*assoc)(struct wiphy * , struct net_device * , struct cfg80211_assoc_request * ) ; int (*deauth)(struct wiphy * , struct net_device * , struct cfg80211_deauth_request * ) ; int (*disassoc)(struct wiphy * , struct net_device * , struct cfg80211_disassoc_request * ) ; int (*connect)(struct wiphy * , struct net_device * , struct cfg80211_connect_params * ) ; int (*disconnect)(struct wiphy * , struct net_device * , u16 ) ; int (*join_ibss)(struct wiphy * , struct net_device * , struct cfg80211_ibss_params * ) ; int (*leave_ibss)(struct wiphy * , struct net_device * ) ; int (*set_mcast_rate)(struct wiphy * , struct net_device * , int * ) ; int (*set_wiphy_params)(struct wiphy * , u32 ) ; int (*set_tx_power)(struct wiphy * , struct wireless_dev * , enum nl80211_tx_power_setting , int ) ; int (*get_tx_power)(struct wiphy * , struct wireless_dev * , int * ) ; int (*set_wds_peer)(struct wiphy * , struct net_device * , u8 const * ) ; void (*rfkill_poll)(struct wiphy * ) ; int (*testmode_cmd)(struct wiphy * , struct wireless_dev * , void * , int ) ; int (*testmode_dump)(struct wiphy * , struct sk_buff * , struct netlink_callback * , void * , int ) ; int (*set_bitrate_mask)(struct wiphy * , struct net_device * , u8 const * , struct cfg80211_bitrate_mask const * ) ; int (*dump_survey)(struct wiphy * , struct net_device * , int , struct survey_info * ) ; int (*set_pmksa)(struct wiphy * , struct net_device * , struct cfg80211_pmksa * ) ; int (*del_pmksa)(struct wiphy * , struct net_device * , struct cfg80211_pmksa * ) ; int (*flush_pmksa)(struct wiphy * , struct net_device * ) ; int (*remain_on_channel)(struct wiphy * , struct wireless_dev * , struct ieee80211_channel * , unsigned int , u64 * ) ; int (*cancel_remain_on_channel)(struct wiphy * , struct wireless_dev * , u64 ) ; int (*mgmt_tx)(struct wiphy * , struct wireless_dev * , struct cfg80211_mgmt_tx_params * , u64 * ) ; int (*mgmt_tx_cancel_wait)(struct wiphy * , struct wireless_dev * , u64 ) ; int (*set_power_mgmt)(struct wiphy * , struct net_device * , bool , int ) ; int (*set_cqm_rssi_config)(struct wiphy * , struct net_device * , s32 , u32 ) ; int (*set_cqm_txe_config)(struct wiphy * , struct net_device * , u32 , u32 , u32 ) ; void (*mgmt_frame_register)(struct wiphy * , struct wireless_dev * , u16 , bool ) ; int (*set_antenna)(struct wiphy * , u32 , u32 ) ; int (*get_antenna)(struct wiphy * , u32 * , u32 * ) ; int (*set_ringparam)(struct wiphy * , u32 , u32 ) ; void (*get_ringparam)(struct wiphy * , u32 * , u32 * , u32 * , u32 * ) ; int (*sched_scan_start)(struct wiphy * , struct net_device * , struct cfg80211_sched_scan_request * ) ; int (*sched_scan_stop)(struct wiphy * , struct net_device * ) ; int (*set_rekey_data)(struct wiphy * , struct net_device * , struct cfg80211_gtk_rekey_data * ) ; int (*tdls_mgmt)(struct wiphy * , struct net_device * , u8 * , u8 , u8 , u16 , u8 const * , size_t ) ; int (*tdls_oper)(struct wiphy * , struct net_device * , u8 * , enum nl80211_tdls_operation ) ; int (*probe_client)(struct wiphy * , struct net_device * , u8 const * , u64 * ) ; int (*set_noack_map)(struct wiphy * , struct net_device * , u16 ) ; int (*get_et_sset_count)(struct wiphy * , struct net_device * , int ) ; void (*get_et_stats)(struct wiphy * , struct net_device * , struct ethtool_stats * , u64 * ) ; void (*get_et_strings)(struct wiphy * , struct net_device * , u32 , u8 * ) ; int (*get_channel)(struct wiphy * , struct wireless_dev * , struct cfg80211_chan_def * ) ; int (*start_p2p_device)(struct wiphy * , struct wireless_dev * ) ; void (*stop_p2p_device)(struct wiphy * , struct wireless_dev * ) ; int (*set_mac_acl)(struct wiphy * , struct net_device * , struct cfg80211_acl_data const * ) ; int (*start_radar_detection)(struct wiphy * , struct net_device * , struct cfg80211_chan_def * ) ; int (*update_ft_ies)(struct wiphy * , struct net_device * , struct cfg80211_update_ft_ies_params * ) ; int (*crit_proto_start)(struct wiphy * , struct wireless_dev * , enum nl80211_crit_proto_id , u16 ) ; void (*crit_proto_stop)(struct wiphy * , struct wireless_dev * ) ; int (*set_coalesce)(struct wiphy * , struct cfg80211_coalesce * ) ; int (*channel_switch)(struct wiphy * , struct net_device * , struct cfg80211_csa_settings * ) ; int (*set_qos_map)(struct wiphy * , struct net_device * , struct cfg80211_qos_map * ) ; }; typedef struct net_device *ldv_func_ret_type___3; enum hrtimer_restart; enum hrtimer_restart; struct mwifiex_ie_types_pwr_capability { struct mwifiex_ie_types_header header ; s8 min_pwr ; s8 max_pwr ; }; struct mwifiex_ie_types_local_pwr_constraint { struct mwifiex_ie_types_header header ; u8 chan ; u8 constraint ; }; enum hrtimer_restart; struct mwifiex_debug_data { char name[32U] ; u32 size ; size_t addr ; int num ; }; struct device_private { void *driver_data ; }; enum hrtimer_restart; struct kthread_work; struct kthread_worker { spinlock_t lock ; struct list_head work_list ; struct task_struct *task ; struct kthread_work *current_work ; }; struct kthread_work { struct list_head node ; void (*func)(struct kthread_work * ) ; wait_queue_head_t done ; struct kthread_worker *worker ; }; struct spi_master; struct spi_device { struct device dev ; struct spi_master *master ; u32 max_speed_hz ; u8 chip_select ; u8 bits_per_word ; u16 mode ; int irq ; void *controller_state ; void *controller_data ; char modalias[32U] ; int cs_gpio ; }; struct spi_message; struct spi_transfer; struct spi_master { struct device dev ; struct list_head list ; s16 bus_num ; u16 num_chipselect ; u16 dma_alignment ; u16 mode_bits ; u32 bits_per_word_mask ; u32 min_speed_hz ; u32 max_speed_hz ; u16 flags ; spinlock_t bus_lock_spinlock ; struct mutex bus_lock_mutex ; bool bus_lock_flag ; int (*setup)(struct spi_device * ) ; int (*transfer)(struct spi_device * , struct spi_message * ) ; void (*cleanup)(struct spi_device * ) ; bool queued ; struct kthread_worker kworker ; struct task_struct *kworker_task ; struct kthread_work pump_messages ; spinlock_t queue_lock ; struct list_head queue ; struct spi_message *cur_msg ; bool busy ; bool running ; bool rt ; bool auto_runtime_pm ; bool cur_msg_prepared ; struct completion xfer_completion ; int (*prepare_transfer_hardware)(struct spi_master * ) ; int (*transfer_one_message)(struct spi_master * , struct spi_message * ) ; int (*unprepare_transfer_hardware)(struct spi_master * ) ; int (*prepare_message)(struct spi_master * , struct spi_message * ) ; int (*unprepare_message)(struct spi_master * , struct spi_message * ) ; void (*set_cs)(struct spi_device * , bool ) ; int (*transfer_one)(struct spi_master * , struct spi_device * , struct spi_transfer * ) ; int *cs_gpios ; }; struct spi_transfer { void const *tx_buf ; void *rx_buf ; unsigned int len ; dma_addr_t tx_dma ; dma_addr_t rx_dma ; unsigned int cs_change : 1 ; unsigned int tx_nbits : 3 ; unsigned int rx_nbits : 3 ; u8 bits_per_word ; u16 delay_usecs ; u32 speed_hz ; struct list_head transfer_list ; }; struct spi_message { struct list_head transfers ; struct spi_device *spi ; unsigned int is_dma_mapped : 1 ; void (*complete)(void * ) ; void *context ; unsigned int frame_length ; unsigned int actual_length ; int status ; struct list_head queue ; void *state ; }; typedef int ldv_map; struct usb_device; struct ldv_thread_set { int number ; struct ldv_thread **threads ; }; struct ldv_thread { int identifier ; void (*function)(void * ) ; }; long ldv__builtin_expect(long exp , long c ) ; void ldv_atomic_inc(atomic_t *v ) ; int ldv_atomic_add_return(int i , atomic_t *v ) ; long ldv_is_err(void const *ptr ) ; void *ldv_kzalloc(size_t size , gfp_t flags ) ; void ldv_assume(int expression ) ; void ldv_stop(void) ; void ldv_initialize(void) ; int ldv_post_init(int init_ret_val ) ; void ldv_check_final_state(void) ; extern void ldv_switch_to_interrupt_context(void) ; extern void ldv_switch_to_process_context(void) ; int ldv_undef_int(void) ; void ldv_free(void *s ) ; void *ldv_xmalloc(size_t size ) ; __inline static void INIT_LIST_HEAD(struct list_head *list ) { { list->next = list; list->prev = list; return; } } extern void list_del(struct list_head * ) ; __inline static int list_empty(struct list_head const *head ) { { return ((unsigned long )((struct list_head const *)head->next) == (unsigned long )head); } } extern struct module __this_module ; __inline static void set_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void clear_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static int constant_test_bit(long nr , unsigned long const volatile *addr ) { { return ((int )((unsigned long )*(addr + (unsigned long )(nr >> 6)) >> ((int )nr & 63)) & 1); } } extern int printk(char const * , ...) ; extern int __dynamic_pr_debug(struct _ddebug * , char const * , ...) ; extern int __dynamic_dev_dbg(struct _ddebug * , struct device const * , char const * , ...) ; __inline static long IS_ERR(void const *ptr ) ; extern void *memcpy(void * , void const * , size_t ) ; extern void *memset(void * , int , size_t ) ; extern void *memmove(void * , void const * , size_t ) ; extern void warn_slowpath_null(char const * , int const ) ; __inline static int atomic_read(atomic_t const *v ) { { return ((int )*((int volatile *)(& v->counter))); } } __inline static void atomic_set(atomic_t *v , int i ) { { v->counter = i; return; } } __inline static void atomic_inc(atomic_t *v ) ; __inline static int atomic_add_return(int i , atomic_t *v ) ; extern void lockdep_init_map(struct lockdep_map * , char const * , struct lock_class_key * , int ) ; extern unsigned long _raw_spin_lock_irqsave(raw_spinlock_t * ) ; extern void _raw_spin_unlock_irqrestore(raw_spinlock_t * , unsigned long ) ; __inline static raw_spinlock_t *spinlock_check(spinlock_t *lock ) { { return (& lock->__annonCompField19.rlock); } } __inline static void spin_unlock_irqrestore(spinlock_t *lock , unsigned long flags ) { { { _raw_spin_unlock_irqrestore(& lock->__annonCompField19.rlock, flags); } return; } } extern void __init_waitqueue_head(wait_queue_head_t * , char const * , struct lock_class_key * ) ; extern long prepare_to_wait_event(wait_queue_head_t * , wait_queue_t * , int ) ; extern void finish_wait(wait_queue_head_t * , wait_queue_t * ) ; __inline static void init_completion(struct completion *x ) { struct lock_class_key __key ; { { x->done = 0U; __init_waitqueue_head(& x->wait, "&x->wait", & __key); } return; } } extern void complete(struct completion * ) ; extern void do_gettimeofday(struct timeval * ) ; extern unsigned long volatile jiffies ; extern unsigned long msecs_to_jiffies(unsigned int const ) ; __inline static ktime_t ktime_set(long const secs , unsigned long const nsecs ) { ktime_t __constr_expr_0 ; long tmp ; ktime_t __constr_expr_1 ; { { tmp = ldv__builtin_expect((long long )secs > 9223372035LL, 0L); } if (tmp != 0L) { __constr_expr_0.tv64 = 9223372036854775807LL; return (__constr_expr_0); } else { } __constr_expr_1.tv64 = (long long )secs * 1000000000LL + (long long )nsecs; return (__constr_expr_1); } } __inline static ktime_t timeval_to_ktime(struct timeval tv ) { ktime_t tmp ; { { tmp = ktime_set(tv.tv_sec, (unsigned long const )(tv.tv_usec * 1000L)); } return (tmp); } } extern void init_timer_key(struct timer_list * , unsigned int , char const * , struct lock_class_key * ) ; extern int del_timer(struct timer_list * ) ; static int ldv_del_timer_20(struct timer_list *ldv_func_arg1 ) ; extern int mod_timer(struct timer_list * , unsigned long ) ; static int ldv_mod_timer_19(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; extern int del_timer_sync(struct timer_list * ) ; static int ldv_del_timer_sync_21(struct timer_list *ldv_func_arg1 ) ; extern void __init_work(struct work_struct * , int ) ; extern struct workqueue_struct *__alloc_workqueue_key(char const * , unsigned int , int , struct lock_class_key * , char const * , ...) ; extern void destroy_workqueue(struct workqueue_struct * ) ; extern bool queue_work_on(int , struct workqueue_struct * , struct work_struct * ) ; extern void flush_workqueue(struct workqueue_struct * ) ; __inline static bool queue_work(struct workqueue_struct *wq , struct work_struct *work ) { bool tmp ; { { tmp = queue_work_on(8192, wq, work); } return (tmp); } } extern int dev_err(struct device const * , char const * , ...) ; extern int dev_notice(struct device const * , char const * , ...) ; extern int down_interruptible(struct semaphore * ) ; extern void up(struct semaphore * ) ; extern void schedule(void) ; extern void kfree(void const * ) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; extern void kfree_skb(struct sk_buff * ) ; extern struct sk_buff *skb_realloc_headroom(struct sk_buff * , unsigned int ) ; __inline static int skb_queue_empty(struct sk_buff_head const *list ) { { return ((unsigned long )((struct sk_buff const *)list->next) == (unsigned long )((struct sk_buff const *)list)); } } extern struct sk_buff *skb_dequeue(struct sk_buff_head * ) ; __inline static unsigned int skb_headroom(struct sk_buff const *skb ) { { return ((unsigned int )((long )skb->data) - (unsigned int )((long )skb->head)); } } __inline static struct netdev_queue *netdev_get_tx_queue(struct net_device const *dev , unsigned int index ) { { return ((struct netdev_queue *)dev->_tx + (unsigned long )index); } } __inline static void *netdev_priv(struct net_device const *dev ) { { return ((void *)dev + 3200U); } } extern void free_netdev(struct net_device * ) ; __inline static void netif_tx_start_queue(struct netdev_queue *dev_queue ) { { { clear_bit(0L, (unsigned long volatile *)(& dev_queue->state)); } return; } } __inline static void netif_tx_start_all_queues(struct net_device *dev ) { unsigned int i ; struct netdev_queue *txq ; struct netdev_queue *tmp ; { i = 0U; goto ldv_38631; ldv_38630: { tmp = netdev_get_tx_queue((struct net_device const *)dev, i); txq = tmp; netif_tx_start_queue(txq); i = i + 1U; } ldv_38631: ; if (i < dev->num_tx_queues) { goto ldv_38630; } else { } return; } } __inline static void netif_tx_stop_queue(struct netdev_queue *dev_queue ) { int __ret_warn_on ; long tmp ; long tmp___0 ; { { __ret_warn_on = (unsigned long )dev_queue == (unsigned long )((struct netdev_queue *)0); tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); } if (tmp != 0L) { { warn_slowpath_null("include/linux/netdevice.h", 2128); } } else { } { tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); } if (tmp___0 != 0L) { { printk("\016netif_stop_queue() cannot be called before register_netdev()\n"); } return; } else { } { set_bit(0L, (unsigned long volatile *)(& dev_queue->state)); } return; } } __inline static bool netif_tx_queue_stopped(struct netdev_queue const *dev_queue ) { int tmp ; { { tmp = constant_test_bit(0L, (unsigned long const volatile *)(& dev_queue->state)); } return (tmp != 0); } } __inline static bool netif_carrier_ok(struct net_device const *dev ) { int tmp ; { { tmp = constant_test_bit(2L, (unsigned long const volatile *)(& dev->state)); } return (tmp == 0); } } extern void netif_carrier_off(struct net_device * ) ; extern void rtnl_lock(void) ; extern void rtnl_unlock(void) ; extern int request_firmware(struct firmware const ** , char const * , struct device * ) ; extern int request_firmware_nowait(struct module * , bool , char const * , struct device * , gfp_t , void * , void (*)(struct firmware const * , void * ) ) ; extern void release_firmware(struct firmware const * ) ; extern void wiphy_unregister(struct wiphy * ) ; extern void wiphy_free(struct wiphy * ) ; extern unsigned int cfg80211_classify8021d(struct sk_buff * , struct cfg80211_qos_map * ) ; extern void cfg80211_scan_done(struct cfg80211_scan_request * , bool ) ; __inline static struct mwifiex_txinfo *MWIFIEX_SKB_TXCB(struct sk_buff *skb ) { { return ((struct mwifiex_txinfo *)(& skb->cb) + 8U); } } char const driver_version[18U] ; int mwifiex_init_lock_list(struct mwifiex_adapter *adapter ) ; void mwifiex_set_trans_start(struct net_device *dev ) ; void mwifiex_stop_net_dev_queue(struct net_device *netdev , struct mwifiex_adapter *adapter ) ; int mwifiex_init_fw(struct mwifiex_adapter *adapter ) ; int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter ) ; int mwifiex_shutdown_drv(struct mwifiex_adapter *adapter ) ; int mwifiex_dnld_fw(struct mwifiex_adapter *adapter , struct mwifiex_fw_image *pmfw ) ; int mwifiex_process_event(struct mwifiex_adapter *adapter ) ; int mwifiex_send_cmd_sync(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf ) ; void mwifiex_cmd_timeout_func(unsigned long function_context ) ; void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) ; void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node , u32 add_tail ) ; int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter ) ; int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter ) ; int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter , struct sk_buff *skb ) ; int mwifiex_send_null_packet(struct mwifiex_private *priv , u8 flags ) ; void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter ) ; void mwifiex_process_hs_config(struct mwifiex_adapter *adapter ) ; void mwifiex_hs_activated_event(struct mwifiex_private *priv , u8 activated ) ; void mwifiex_free_curr_bcn(struct mwifiex_private *priv ) ; int is_command_pending(struct mwifiex_adapter *adapter ) ; void mwifiex_init_priv_params(struct mwifiex_private *priv , struct net_device *dev ) ; __inline static struct mwifiex_private *mwifiex_get_priv(struct mwifiex_adapter *adapter , enum mwifiex_bss_role bss_role ) { int i ; { i = 0; goto ldv_54128; ldv_54127: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((unsigned int )bss_role == 255U || ((unsigned long )(adapter->priv[i])->bss_role & 1UL) == (unsigned long )bss_role) { goto ldv_54126; } else { } } else { } i = i + 1; ldv_54128: ; if (i < (int )adapter->priv_num) { goto ldv_54127; } else { } ldv_54126: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } __inline static struct mwifiex_private *mwifiex_netdev_get_priv(struct net_device *dev ) { void *tmp ; { { tmp = netdev_priv((struct net_device const *)dev); } return ((struct mwifiex_private *)*((unsigned long *)tmp)); } } int mwifiex_add_card(void *card , struct semaphore *sem , struct mwifiex_if_ops *if_ops , u8 iface_type ) ; int mwifiex_remove_card(struct mwifiex_adapter *adapter , struct semaphore *sem ) ; int mwifiex_request_set_multicast_list(struct mwifiex_private *priv , struct mwifiex_multicast_list *mcast_list ) ; int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist , struct net_device *dev ) ; int mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter , char *version , int max_len ) ; int mwifiex_main_process(struct mwifiex_adapter *adapter ) ; int mwifiex_queue_tx_pkt(struct mwifiex_private *priv , struct sk_buff *skb ) ; struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy , char const *name , enum nl80211_iftype type , u32 *flags , struct vif_params *params ) ; int mwifiex_del_virtual_intf(struct wiphy *wiphy , struct wireless_dev *wdev ) ; void mwifiex_debugfs_init(void) ; void mwifiex_debugfs_remove(void) ; static u16 const mwifiex_1d_to_wmm_queue[8U] = { 1U, 0U, 0U, 1U, 2U, 2U, 3U, 3U}; void mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter ) ; void mwifiex_wmm_process_tx(struct mwifiex_adapter *adapter ) ; int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter ) ; char const driver_version[18U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', ' ', '1', '.', '0', ' ', '(', '%', 's', ')', ' ', '\000'}; static char *cal_data_cfg ; static void scan_delay_timer_fn(unsigned long data ) { struct mwifiex_private *priv ; struct mwifiex_adapter *adapter ; struct cmd_ctrl_node *cmd_node ; struct cmd_ctrl_node *tmp_node ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; raw_spinlock_t *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; raw_spinlock_t *tmp___3 ; struct list_head const *__mptr___2 ; int tmp___4 ; unsigned long tmp___5 ; int tmp___6 ; { priv = (struct mwifiex_private *)data; adapter = priv->adapter; if ((int )adapter->surprise_removed) { return; } else { } if ((unsigned int )adapter->scan_delay_cnt == 50U) { { tmp = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; __mptr___0 = (struct list_head const *)cmd_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___0; } goto ldv_54584; ldv_54583: { list_del(& cmd_node->list); mwifiex_insert_cmd_to_free_q(adapter, cmd_node); cmd_node = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___1; } ldv_54584: ; if ((unsigned long )(& cmd_node->list) != (unsigned long )(& adapter->scan_pending_q)) { goto ldv_54583; } else { } { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); tmp___0 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___0); adapter->scan_processing = 0U; adapter->scan_delay_cnt = 0U; adapter->empty_tx_q_cnt = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } if ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "scan_delay_timer_fn"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "info: aborting scan\n"; descriptor.lineno = 61U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: aborting scan\n"); } } else { } { cfg80211_scan_done(priv->scan_request, 1); priv->scan_request = (struct cfg80211_scan_request *)0; } } else { { priv->scan_aborting = 0; descriptor___0.modname = "mwifiex"; descriptor___0.function = "scan_delay_timer_fn"; descriptor___0.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___0.format = "info: scan already aborted\n"; descriptor___0.lineno = 66U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: scan already aborted\n"); } } else { } } goto done; } else { } { tmp___4 = atomic_read((atomic_t const *)(& (priv->adapter)->is_tx_received)); } if (tmp___4 == 0) { adapter->empty_tx_q_cnt = (u8 )((int )adapter->empty_tx_q_cnt + 1); if ((unsigned int )adapter->empty_tx_q_cnt == 10U) { { adapter->scan_delay_cnt = 0U; adapter->empty_tx_q_cnt = 0U; tmp___3 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___3); __mptr___2 = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr___2; list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, 1U); queue_work(adapter->workqueue, & adapter->main_work); } goto done; } else { } } else { adapter->empty_tx_q_cnt = 0U; } { tmp___5 = msecs_to_jiffies(20U); ldv_mod_timer_19(& priv->scan_delay_timer, (unsigned long )jiffies + tmp___5); adapter->scan_delay_cnt = (u8 )((int )adapter->scan_delay_cnt + 1); } done: { tmp___6 = atomic_read((atomic_t const *)(& (priv->adapter)->is_tx_received)); } if (tmp___6 != 0) { { atomic_set(& (priv->adapter)->is_tx_received, 0); } } else { } return; } } static int mwifiex_register(void *card , struct mwifiex_if_ops *if_ops , void **padapter ) { struct mwifiex_adapter *adapter ; int i ; void *tmp ; int tmp___0 ; void *tmp___1 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct _ddebug descriptor ; long tmp___2 ; { { tmp = kzalloc(5928UL, 208U); adapter = (struct mwifiex_adapter *)tmp; } if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { return (-12); } else { } { *padapter = (void *)adapter; adapter->card = card; memmove((void *)(& adapter->if_ops), (void const *)if_ops, 168UL); } if ((unsigned long )adapter->if_ops.init_if != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { { tmp___0 = (*(adapter->if_ops.init_if))(adapter); } if (tmp___0 != 0) { goto error; } else { } } else { } adapter->priv_num = 0U; i = 0; goto ldv_54608; ldv_54607: { tmp___1 = kzalloc(10096UL, 208U); adapter->priv[i] = (struct mwifiex_private *)tmp___1; } if ((unsigned long )adapter->priv[i] == (unsigned long )((struct mwifiex_private *)0)) { goto error; } else { } { (adapter->priv[i])->adapter = adapter; adapter->priv_num = (u8 )((int )adapter->priv_num + 1); init_timer_key(& (adapter->priv[i])->scan_delay_timer, 0U, "((&adapter->priv[i]->scan_delay_timer))", & __key); (adapter->priv[i])->scan_delay_timer.function = & scan_delay_timer_fn; (adapter->priv[i])->scan_delay_timer.data = (unsigned long )adapter->priv[i]; i = i + 1; } ldv_54608: ; if (i <= 2) { goto ldv_54607; } else { } { mwifiex_init_lock_list(adapter); init_timer_key(& adapter->cmd_timer, 0U, "(&adapter->cmd_timer)", & __key___0); adapter->cmd_timer.function = & mwifiex_cmd_timeout_func; adapter->cmd_timer.data = (unsigned long )adapter; } return (0); error: { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_register"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "info: leave mwifiex_register with error\n"; descriptor.lineno = 170U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: leave mwifiex_register with error\n"); } } else { } i = 0; goto ldv_54614; ldv_54613: { kfree((void const *)adapter->priv[i]); i = i + 1; } ldv_54614: ; if (i < (int )adapter->priv_num) { goto ldv_54613; } else { } { kfree((void const *)adapter); } return (-1); } } static int mwifiex_unregister(struct mwifiex_adapter *adapter ) { s32 i ; { if ((unsigned long )adapter->if_ops.cleanup_if != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.cleanup_if))(adapter); } } else { } { ldv_del_timer_20(& adapter->cmd_timer); i = 0; } goto ldv_54621; ldv_54620: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { { mwifiex_free_curr_bcn(adapter->priv[i]); ldv_del_timer_sync_21(& (adapter->priv[i])->scan_delay_timer); kfree((void const *)adapter->priv[i]); } } else { } i = i + 1; ldv_54621: ; if (i < (int )adapter->priv_num) { goto ldv_54620; } else { } { kfree((void const *)adapter); } return (0); } } int mwifiex_main_process(struct mwifiex_adapter *adapter ) { int ret ; unsigned long flags ; struct sk_buff *skb ; raw_spinlock_t *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; struct mwifiex_private *tmp___6 ; int tmp___7 ; struct mwifiex_private *tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; raw_spinlock_t *tmp___12 ; int tmp___13 ; { { ret = 0; tmp = spinlock_check(& adapter->main_proc_lock); flags = _raw_spin_lock_irqsave(tmp); } if (adapter->mwifiex_processing != 0U) { { spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } goto exit_main_proc; } else { { adapter->mwifiex_processing = 1U; spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } } process_start: ; ldv_54639: ; if ((unsigned int )adapter->hw_status - 5U <= 1U) { goto ldv_54634; } else { } if ((unsigned int )adapter->int_status != 0U) { if ((unsigned int )adapter->hs_activated != 0U) { { mwifiex_process_hs_config(adapter); } } else { } if ((unsigned long )adapter->if_ops.process_int_status != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.process_int_status))(adapter); } } else { } } else { } if (adapter->ps_state == 3U && ((unsigned int )adapter->pm_wakeup_card_req != 0U && adapter->pm_wakeup_fw_try == 0U)) { { tmp___0 = is_command_pending(adapter); } if (tmp___0 != 0) { { adapter->pm_wakeup_fw_try = 1U; (*(adapter->if_ops.wakeup))(adapter); } goto ldv_54635; } else { { tmp___1 = mwifiex_wmm_lists_empty(adapter); } if (tmp___1 == 0) { { adapter->pm_wakeup_fw_try = 1U; (*(adapter->if_ops.wakeup))(adapter); } goto ldv_54635; } else { } } } else { } if ((unsigned int )*((unsigned short *)adapter + 1673UL) != 0U || ((unsigned int )adapter->iface_type != 2U && (unsigned int )adapter->data_received != 0U)) { goto _L___0; } else if ((unsigned int )adapter->iface_type == 2U) { { tmp___4 = skb_queue_empty((struct sk_buff_head const *)(& adapter->usb_rx_data_q)); } if (tmp___4 == 0) { _L___0: /* CIL Label */ adapter->pm_wakeup_fw_try = 0U; if (adapter->ps_state == 3U) { adapter->ps_state = 0U; } else { } } else { goto _L___1; } } else { _L___1: /* CIL Label */ if (adapter->pm_wakeup_fw_try != 0U) { goto ldv_54634; } else { } if (adapter->ps_state != 0U || (unsigned int )adapter->tx_lock_flag != 0U) { goto ldv_54634; } else { } if ((adapter->scan_processing != 0U && (unsigned int )adapter->scan_delay_cnt == 0U) || (unsigned int )adapter->data_sent != 0U) { goto _L; } else { { tmp___3 = mwifiex_wmm_lists_empty(adapter); } if (tmp___3 != 0) { _L: /* CIL Label */ if ((unsigned int )adapter->cmd_sent != 0U || (unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0)) { goto ldv_54634; } else { { tmp___2 = is_command_pending(adapter); } if (tmp___2 == 0) { goto ldv_54634; } else { } } } else { } } } if ((unsigned int )adapter->iface_type == 2U) { goto ldv_54637; ldv_54636: { mwifiex_handle_rx_packet(adapter, skb); } ldv_54637: { skb = skb_dequeue(& adapter->usb_rx_data_q); } if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { goto ldv_54636; } else { } } else { } if ((unsigned int )adapter->cmd_resp_received != 0U) { { adapter->cmd_resp_received = 0U; mwifiex_process_cmdresp(adapter); } if ((unsigned int )adapter->hw_status == 3U) { { adapter->hw_status = 0; mwifiex_init_fw_complete(adapter); } } else { } } else { } if ((unsigned int )adapter->event_received != 0U) { { adapter->event_received = 0U; mwifiex_process_event(adapter); } } else { } if (adapter->ps_state == 1U) { if ((unsigned int )adapter->cmd_sent == 0U && (unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { { mwifiex_check_ps_cond(adapter); } } else { } } else { } if (((adapter->ps_state == 3U || adapter->ps_state == 1U) || adapter->ps_state == 2U) || (unsigned int )adapter->tx_lock_flag != 0U) { goto ldv_54635; } else { } if ((unsigned int )adapter->cmd_sent == 0U && (unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { { tmp___5 = mwifiex_exec_next_cmd(adapter); } if (tmp___5 == -1) { ret = -1; goto ldv_54634; } else { } } else { } if ((adapter->scan_processing == 0U || (unsigned int )adapter->scan_delay_cnt != 0U) && (unsigned int )adapter->data_sent == 0U) { { tmp___7 = mwifiex_wmm_lists_empty(adapter); } if (tmp___7 == 0) { { mwifiex_wmm_process_tx(adapter); } if ((unsigned int )adapter->hs_activated != 0U) { { adapter->is_hs_configured = 0U; tmp___6 = mwifiex_get_priv(adapter, 255); mwifiex_hs_activated_event(tmp___6, 0); } } else { } } else { } } else { } if (((unsigned int )adapter->delay_null_pkt != 0U && (unsigned int )adapter->cmd_sent == 0U) && (unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { { tmp___10 = is_command_pending(adapter); } if (tmp___10 == 0) { { tmp___11 = mwifiex_wmm_lists_empty(adapter); } if (tmp___11 != 0) { { tmp___8 = mwifiex_get_priv(adapter, 0); tmp___9 = mwifiex_send_null_packet(tmp___8, 9); } if (tmp___9 == 0) { adapter->delay_null_pkt = 0U; adapter->ps_state = 3U; } else { } goto ldv_54634; } else { } } else { } } else { } ldv_54635: ; goto ldv_54639; ldv_54634: { tmp___12 = spinlock_check(& adapter->main_proc_lock); flags = _raw_spin_lock_irqsave(tmp___12); } if ((unsigned int )adapter->int_status != 0U) { { spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } goto process_start; } else if ((unsigned int )*((unsigned short *)adapter + 1673UL) != 0U || ((unsigned int )adapter->iface_type != 2U && (unsigned int )adapter->data_received != 0U)) { { spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } goto process_start; } else if ((unsigned int )adapter->iface_type == 2U) { { tmp___13 = skb_queue_empty((struct sk_buff_head const *)(& adapter->usb_rx_data_q)); } if (tmp___13 == 0) { { spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } goto process_start; } else { } } else { } { adapter->mwifiex_processing = 0U; spin_unlock_irqrestore(& adapter->main_proc_lock, flags); } exit_main_proc: ; if ((unsigned int )adapter->hw_status == 5U) { { mwifiex_shutdown_drv(adapter); } } else { } return (ret); } } static char const __kstrtab_mwifiex_main_process[21U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'm', 'a', 'i', 'n', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_main_process ; struct kernel_symbol const __ksymtab_mwifiex_main_process = {(unsigned long )(& mwifiex_main_process), (char const *)(& __kstrtab_mwifiex_main_process)}; static void mwifiex_free_adapter(struct mwifiex_adapter *adapter ) { struct _ddebug descriptor ; long tmp ; { if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { { printk("\vmwifiex: %s: adapter is NULL\n", "mwifiex_free_adapter"); } return; } else { } { mwifiex_unregister(adapter); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_free_adapter"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "info: %s: free adapter\n"; descriptor.lineno = 391U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: %s: free adapter\n", "mwifiex_free_adapter"); } } else { } return; } } static void mwifiex_terminate_workqueue(struct mwifiex_adapter *adapter ) { { { flush_workqueue(adapter->workqueue); destroy_workqueue(adapter->workqueue); adapter->workqueue = (struct workqueue_struct *)0; } return; } } static void mwifiex_fw_dpc(struct firmware const *firmware , void *context ) { int ret ; char fmt[64U] ; struct mwifiex_private *priv ; struct mwifiex_adapter *adapter ; struct mwifiex_fw_image fw ; struct semaphore *sem ; bool init_failed ; struct wireless_dev *wdev ; int tmp ; int tmp___0 ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp___1 ; int tmp___2 ; long tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; int __ret___1 ; wait_queue_t __wait___0 ; long __ret___2 ; long __int___0 ; long tmp___6 ; int tmp___7 ; { adapter = (struct mwifiex_adapter *)context; sem = adapter->card_sem; init_failed = 0; if ((unsigned long )firmware == (unsigned long )((struct firmware const *)0)) { { dev_err((struct device const *)adapter->dev, "Failed to get firmware %s\n", (char *)(& adapter->fw_name)); } goto err_dnld_fw; } else { } { memset((void *)(& fw), 0, 32UL); adapter->firmware = firmware; fw.fw_buf = (u8 *)(adapter->firmware)->data; fw.fw_len = (u32 )(adapter->firmware)->size; } if ((unsigned long )adapter->if_ops.dnld_fw != (unsigned long )((int (*)(struct mwifiex_adapter * , struct mwifiex_fw_image * ))0)) { { ret = (*(adapter->if_ops.dnld_fw))(adapter, & fw); } } else { { ret = mwifiex_dnld_fw(adapter, & fw); } } if (ret == -1) { goto err_dnld_fw; } else { } { dev_notice((struct device const *)adapter->dev, "WLAN FW is active\n"); } if ((unsigned long )cal_data_cfg != (unsigned long )((char *)0)) { { tmp = request_firmware(& adapter->cal_data, (char const *)cal_data_cfg, adapter->dev); } if (tmp < 0) { { dev_err((struct device const *)adapter->dev, "Cal data request_firmware() failed\n"); } } else { } } else { } if ((unsigned long )adapter->if_ops.enable_int != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { { tmp___0 = (*(adapter->if_ops.enable_int))(adapter); } if (tmp___0 != 0) { goto err_dnld_fw; } else { } } else { } { adapter->init_wait_q_woken = 0U; ret = mwifiex_init_fw(adapter); } if (ret == -1) { goto err_init_fw; } else if (ret == 0) { adapter->hw_status = 0; goto done; } else { } __ret = 0; if ((unsigned int )adapter->init_wait_q_woken == 0U) { { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; } ldv_54679: { tmp___1 = prepare_to_wait_event(& adapter->init_wait_q, & __wait, 1); __int = tmp___1; } if ((unsigned int )adapter->init_wait_q_woken != 0U) { goto ldv_54678; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_54678; } else { } { schedule(); } goto ldv_54679; ldv_54678: { finish_wait(& adapter->init_wait_q, & __wait); } __ret = (int )__ret___0; } else { } if ((unsigned int )adapter->hw_status != 0U) { goto err_init_fw; } else { } { priv = adapter->priv[0]; tmp___2 = mwifiex_register_cfg80211(adapter); } if (tmp___2 != 0) { { dev_err((struct device const *)adapter->dev, "cannot register with cfg80211\n"); } goto err_init_fw; } else { } { rtnl_lock(); wdev = mwifiex_add_virtual_intf(adapter->wiphy, "mlan%d", 2, (u32 *)0U, (struct vif_params *)0); tmp___3 = IS_ERR((void const *)wdev); } if (tmp___3 != 0L) { { dev_err((struct device const *)adapter->dev, "cannot create default STA interface\n"); rtnl_unlock(); } goto err_add_intf; } else { } { rtnl_unlock(); mwifiex_drv_get_driver_version(adapter, (char *)(& fmt), 63); dev_notice((struct device const *)adapter->dev, "driver_version = %s\n", (char *)(& fmt)); } goto done; err_add_intf: { wiphy_unregister(adapter->wiphy); wiphy_free(adapter->wiphy); } err_init_fw: ; if ((unsigned long )adapter->if_ops.disable_int != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.disable_int))(adapter); } } else { } err_dnld_fw: { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_fw_dpc"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "info: %s: unregister device\n"; descriptor.lineno = 498U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: %s: unregister device\n", "mwifiex_fw_dpc"); } } else { } if ((unsigned long )adapter->if_ops.unregister_dev != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.unregister_dev))(adapter); } } else { } if ((unsigned int )adapter->hw_status == 2U || (unsigned int )adapter->hw_status == 0U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_fw_dpc"; descriptor___0.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___0.format = "info: %s: shutdown mwifiex\n"; descriptor___0.lineno = 504U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_pr_debug(& descriptor___0, "mwifiex: info: %s: shutdown mwifiex\n", "mwifiex_fw_dpc"); } } else { } { adapter->init_wait_q_woken = 0U; tmp___7 = mwifiex_shutdown_drv(adapter); } if (tmp___7 == -115) { __ret___1 = 0; if ((unsigned int )adapter->init_wait_q_woken == 0U) { { __ret___2 = 0L; INIT_LIST_HEAD(& __wait___0.task_list); __wait___0.flags = 0U; } ldv_54692: { tmp___6 = prepare_to_wait_event(& adapter->init_wait_q, & __wait___0, 1); __int___0 = tmp___6; } if ((unsigned int )adapter->init_wait_q_woken != 0U) { goto ldv_54691; } else { } if (__int___0 != 0L) { __ret___2 = __int___0; goto ldv_54691; } else { } { schedule(); } goto ldv_54692; ldv_54691: { finish_wait(& adapter->init_wait_q, & __wait___0); } __ret___1 = (int )__ret___2; } else { } } else { } } else { } { adapter->surprise_removed = 1; mwifiex_terminate_workqueue(adapter); init_failed = 1; } done: ; if ((unsigned long )adapter->cal_data != (unsigned long )((struct firmware const *)0)) { { release_firmware(adapter->cal_data); adapter->cal_data = (struct firmware const *)0; } } else { } if ((unsigned long )adapter->firmware != (unsigned long )((struct firmware const *)0)) { { release_firmware(adapter->firmware); adapter->firmware = (struct firmware const *)0; } } else { } { complete(& adapter->fw_load); } if ((int )init_failed) { { mwifiex_free_adapter(adapter); } } else { } { up(sem); } return; } } static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter ) { int ret ; { { init_completion(& adapter->fw_load); ret = request_firmware_nowait(& __this_module, 1, (char const *)(& adapter->fw_name), adapter->dev, 208U, (void *)adapter, & mwifiex_fw_dpc); } if (ret < 0) { { dev_err((struct device const *)adapter->dev, "request_firmware_nowait() returned error %d\n", ret); } } else { } return (ret); } } static int mwifiex_open(struct net_device *dev ) { { { netif_tx_start_all_queues(dev); } return (0); } } static int mwifiex_close(struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct _ddebug descriptor ; long tmp___0 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_close"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "aborting scan on ndo_stop\n"; descriptor.lineno = 568U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "aborting scan on ndo_stop\n"); } } else { } { cfg80211_scan_done(priv->scan_request, 1); priv->scan_request = (struct cfg80211_scan_request *)0; priv->scan_aborting = 1; } } else { } return (0); } } int mwifiex_queue_tx_pkt(struct mwifiex_private *priv , struct sk_buff *skb ) { struct netdev_queue *txq ; int index ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; int tmp___2 ; { { index = (int )mwifiex_1d_to_wmm_queue[skb->priority]; tmp___2 = atomic_add_return(1, (atomic_t *)(& priv->wmm_tx_pending) + (unsigned long )index); } if (tmp___2 > 99) { { txq = netdev_get_tx_queue((struct net_device const *)priv->netdev, (unsigned int )index); tmp___0 = netif_tx_queue_stopped((struct netdev_queue const *)txq); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { netif_tx_stop_queue(txq); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_queue_tx_pkt"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "stop queue: %d\n"; descriptor.lineno = 589U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "stop queue: %d\n", index); } } else { } } else { } } else { } { atomic_inc(& (priv->adapter)->tx_pending); mwifiex_wmm_add_buf_txqueue(priv, skb); } if ((unsigned int )(priv->adapter)->scan_delay_cnt != 0U) { { atomic_set(& (priv->adapter)->is_tx_received, 1); } } else { } { queue_work((priv->adapter)->workqueue, & (priv->adapter)->main_work); } return (0); } } static int mwifiex_hard_start_xmit(struct sk_buff *skb , struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct sk_buff *new_skb ; struct mwifiex_txinfo *tx_info ; struct timeval tv ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; unsigned int tmp___1 ; long tmp___2 ; long tmp___3 ; struct _ddebug descriptor___1 ; unsigned int tmp___4 ; long tmp___5 ; unsigned int tmp___6 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_hard_start_xmit"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "data: %lu BSS(%d-%d): Data <= kernel\n"; descriptor.lineno = 616U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "data: %lu BSS(%d-%d): Data <= kernel\n", jiffies, (int )priv->bss_type, (int )priv->bss_num); } } else { } if ((int )(priv->adapter)->surprise_removed) { { kfree_skb(skb); priv->stats.tx_dropped = priv->stats.tx_dropped + 1UL; } return (0); } else { } if (skb->len - 1U > 1513U) { { dev_err((struct device const *)(priv->adapter)->dev, "Tx: bad skb len %d\n", skb->len); kfree_skb(skb); priv->stats.tx_dropped = priv->stats.tx_dropped + 1UL; } return (0); } else { } { tmp___6 = skb_headroom((struct sk_buff const *)skb); } if (tmp___6 <= 35U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_hard_start_xmit"; descriptor___0.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___0.format = "data: Tx: insufficient skb headroom %d\n"; descriptor___0.lineno = 632U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { tmp___1 = skb_headroom((struct sk_buff const *)skb); __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "data: Tx: insufficient skb headroom %d\n", tmp___1); } } else { } { new_skb = skb_realloc_headroom(skb, 36U); tmp___3 = ldv__builtin_expect((unsigned long )new_skb == (unsigned long )((struct sk_buff *)0), 0L); } if (tmp___3 != 0L) { { dev_err((struct device const *)(priv->adapter)->dev, "Tx: cannot alloca new_skb\n"); kfree_skb(skb); priv->stats.tx_dropped = priv->stats.tx_dropped + 1UL; } return (0); } else { } { kfree_skb(skb); skb = new_skb; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_hard_start_xmit"; descriptor___1.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___1.format = "info: new skb headroomd %d\n"; descriptor___1.lineno = 645U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___5 != 0L) { { tmp___4 = skb_headroom((struct sk_buff const *)skb); __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: new skb headroomd %d\n", tmp___4); } } else { } } else { } { tx_info = MWIFIEX_SKB_TXCB(skb); tx_info->bss_num = priv->bss_num; tx_info->bss_type = priv->bss_type; tx_info->pkt_len = skb->len; do_gettimeofday(& tv); skb->tstamp = timeval_to_ktime(tv); mwifiex_queue_tx_pkt(priv, skb); } return (0); } } static int mwifiex_set_mac_address(struct net_device *dev , void *addr ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct sockaddr *hw_addr ; int ret ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; hw_addr = (struct sockaddr *)addr; memcpy((void *)(& priv->curr_addr), (void const *)(& hw_addr->sa_data), 6UL); ret = mwifiex_send_cmd_sync(priv, 77, 1, 0U, (void *)0); } if (ret == 0) { { memcpy((void *)(priv->netdev)->dev_addr, (void const *)(& priv->curr_addr), 6UL); } } else { { dev_err((struct device const *)(priv->adapter)->dev, "set mac address failed: ret=%d\n", ret); } } { memcpy((void *)dev->dev_addr, (void const *)(& priv->curr_addr), 6UL); } return (ret); } } static void mwifiex_set_multicast_list(struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct mwifiex_multicast_list mcast_list ; int tmp___0 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((dev->flags & 256U) != 0U) { mcast_list.mode = 1U; } else if ((dev->flags & 512U) != 0U || dev->mc.count > 32) { mcast_list.mode = 4U; } else { { mcast_list.mode = 2U; tmp___0 = mwifiex_copy_mcast_addr(& mcast_list, dev); mcast_list.num_multicast_addr = (u32 )tmp___0; } } { mwifiex_request_set_multicast_list(priv, & mcast_list); } return; } } static void mwifiex_tx_timeout(struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; priv->num_tx_timeout = priv->num_tx_timeout + 1U; priv->tx_timeout_cnt = (u8 )((int )priv->tx_timeout_cnt + 1); dev_err((struct device const *)(priv->adapter)->dev, "%lu : Tx timeout(#%d), bss_type-num = %d-%d\n", jiffies, (int )priv->tx_timeout_cnt, (int )priv->bss_type, (int )priv->bss_num); mwifiex_set_trans_start(dev); } if ((unsigned int )priv->tx_timeout_cnt > 6U && (unsigned long )(priv->adapter)->if_ops.card_reset != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { dev_err((struct device const *)(priv->adapter)->dev, "tx_timeout_cnt exceeds threshold. Triggering card reset!\n"); (*((priv->adapter)->if_ops.card_reset))(priv->adapter); } } else { } return; } } static struct net_device_stats *mwifiex_get_stats(struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } return (& priv->stats); } } static u16 mwifiex_netdev_select_wmm_queue(struct net_device *dev , struct sk_buff *skb , void *accel_priv , u16 (*fallback)(struct net_device * , struct sk_buff * ) ) { { { skb->priority = cfg80211_classify8021d(skb, (struct cfg80211_qos_map *)0); } return ((u16 )mwifiex_1d_to_wmm_queue[skb->priority]); } } static struct net_device_ops const mwifiex_netdev_ops = {0, 0, & mwifiex_open, & mwifiex_close, (netdev_tx_t (*)(struct sk_buff * , struct net_device * ))(& mwifiex_hard_start_xmit), & mwifiex_netdev_select_wmm_queue, 0, & mwifiex_set_multicast_list, & mwifiex_set_mac_address, 0, 0, 0, 0, 0, & mwifiex_tx_timeout, 0, & mwifiex_get_stats, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void mwifiex_init_priv_params(struct mwifiex_private *priv , struct net_device *dev ) { { { dev->netdev_ops = & mwifiex_netdev_ops; dev->destructor = & free_netdev; priv->current_key_index = 0U; priv->media_connected = 0U; memset((void *)(& priv->nick_name), 0, 16UL); memset((void *)(& priv->mgmt_ie), 0, 4192UL); priv->beacon_idx = 65535U; priv->proberesp_idx = 65535U; priv->assocresp_idx = 65535U; priv->rsn_idx = 65535U; priv->num_tx_timeout = 0U; memcpy((void *)dev->dev_addr, (void const *)(& priv->curr_addr), 6UL); } return; } } int is_command_pending(struct mwifiex_adapter *adapter ) { unsigned long flags ; int is_cmd_pend_q_empty ; raw_spinlock_t *tmp ; { { tmp = spinlock_check(& adapter->cmd_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp); is_cmd_pend_q_empty = list_empty((struct list_head const *)(& adapter->cmd_pending_q)); spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, flags); } return (is_cmd_pend_q_empty == 0); } } static void mwifiex_main_work_queue(struct work_struct *work ) { struct mwifiex_adapter *adapter ; struct work_struct const *__mptr ; { __mptr = (struct work_struct const *)work; adapter = (struct mwifiex_adapter *)__mptr + 0xfffffffffffffe68UL; if ((int )adapter->surprise_removed) { return; } else { } { mwifiex_main_process(adapter); } return; } } int mwifiex_add_card(void *card , struct semaphore *sem , struct mwifiex_if_ops *if_ops , u8 iface_type ) { struct mwifiex_adapter *adapter ; int tmp ; int tmp___0 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; char const *__lock_name ; struct workqueue_struct *tmp___1 ; struct lock_class_key __key___3 ; atomic_long_t __constr_expr_0 ; int tmp___2 ; int tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp___6 ; int tmp___7 ; { { tmp = down_interruptible(sem); } if (tmp != 0) { goto exit_sem_err; } else { } { tmp___0 = mwifiex_register(card, if_ops, (void **)(& adapter)); } if (tmp___0 != 0) { { printk("\vmwifiex: %s: software init failed\n", "mwifiex_add_card"); } goto err_init_sw; } else { } { adapter->iface_type = iface_type; adapter->card_sem = sem; adapter->hw_status = 1; adapter->surprise_removed = 0; __init_waitqueue_head(& adapter->init_wait_q, "&adapter->init_wait_q", & __key); adapter->is_suspended = 0; adapter->hs_activated = 0U; __init_waitqueue_head(& adapter->hs_activate_wait_q, "&adapter->hs_activate_wait_q", & __key___0); adapter->cmd_wait_q_required = 0U; __init_waitqueue_head(& adapter->cmd_wait_q.wait, "&adapter->cmd_wait_q.wait", & __key___1); adapter->cmd_wait_q.status = 0; adapter->scan_wait_q_woken = 0U; __lock_name = "\"MWIFIEX_WORK_QUEUE\""; tmp___1 = __alloc_workqueue_key("MWIFIEX_WORK_QUEUE", 26U, 1, & __key___2, __lock_name); adapter->workqueue = tmp___1; } if ((unsigned long )adapter->workqueue == (unsigned long )((struct workqueue_struct *)0)) { goto err_kmalloc; } else { } { __init_work(& adapter->main_work, 0); __constr_expr_0.counter = 137438953408L; adapter->main_work.data = __constr_expr_0; lockdep_init_map(& adapter->main_work.lockdep_map, "(&adapter->main_work)", & __key___3, 0); INIT_LIST_HEAD(& adapter->main_work.entry); adapter->main_work.func = & mwifiex_main_work_queue; tmp___2 = (*(adapter->if_ops.register_dev))(adapter); } if (tmp___2 != 0) { { printk("\vmwifiex: %s: failed to register mwifiex device\n", "mwifiex_add_card"); } goto err_registerdev; } else { } { tmp___3 = mwifiex_init_hw_fw(adapter); } if (tmp___3 != 0) { { printk("\vmwifiex: %s: firmware init failed\n", "mwifiex_add_card"); } goto err_init_fw; } else { } return (0); err_init_fw: { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_add_card"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "info: %s: unregister device\n"; descriptor.lineno = 902U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: %s: unregister device\n", "mwifiex_add_card"); } } else { } if ((unsigned long )adapter->if_ops.unregister_dev != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.unregister_dev))(adapter); } } else { } if ((unsigned int )adapter->hw_status == 2U || (unsigned int )adapter->hw_status == 0U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_add_card"; descriptor___0.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___0.format = "info: %s: shutdown mwifiex\n"; descriptor___0.lineno = 907U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_pr_debug(& descriptor___0, "mwifiex: info: %s: shutdown mwifiex\n", "mwifiex_add_card"); } } else { } { adapter->init_wait_q_woken = 0U; tmp___7 = mwifiex_shutdown_drv(adapter); } if (tmp___7 == -115) { __ret = 0; if ((unsigned int )adapter->init_wait_q_woken == 0U) { { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; } ldv_54802: { tmp___6 = prepare_to_wait_event(& adapter->init_wait_q, & __wait, 1); __int = tmp___6; } if ((unsigned int )adapter->init_wait_q_woken != 0U) { goto ldv_54801; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_54801; } else { } { schedule(); } goto ldv_54802; ldv_54801: { finish_wait(& adapter->init_wait_q, & __wait); } __ret = (int )__ret___0; } else { } } else { } } else { } err_registerdev: { adapter->surprise_removed = 1; mwifiex_terminate_workqueue(adapter); } err_kmalloc: { mwifiex_free_adapter(adapter); } err_init_sw: { up(sem); } exit_sem_err: ; return (-1); } } static char const __kstrtab_mwifiex_add_card[17U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'a', 'd', 'd', '_', 'c', 'a', 'r', 'd', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_add_card ; struct kernel_symbol const __ksymtab_mwifiex_add_card = {(unsigned long )(& mwifiex_add_card), (char const *)(& __kstrtab_mwifiex_add_card)}; int mwifiex_remove_card(struct mwifiex_adapter *adapter , struct semaphore *sem ) { struct mwifiex_private *priv ; int i ; int tmp ; bool tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp___2 ; int tmp___3 ; struct _ddebug descriptor___0 ; long tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; struct _ddebug descriptor___1 ; long tmp___11 ; struct _ddebug descriptor___2 ; long tmp___12 ; { { priv = (struct mwifiex_private *)0; tmp = down_interruptible(sem); } if (tmp != 0) { goto exit_sem_err; } else { } if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { goto exit_remove; } else { } if ((unsigned long )adapter->if_ops.disable_int != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.disable_int))(adapter); } } else { } adapter->surprise_removed = 1; i = 0; goto ldv_54824; ldv_54823: priv = adapter->priv[i]; if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0) && (unsigned long )priv->netdev != (unsigned long )((struct net_device *)0)) { { mwifiex_stop_net_dev_queue(priv->netdev, adapter); tmp___0 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___0) { { netif_carrier_off(priv->netdev); } } else { } } else { } i = i + 1; ldv_54824: ; if (i < (int )adapter->priv_num) { goto ldv_54823; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_remove_card"; descriptor.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor.format = "cmd: calling mwifiex_shutdown_drv...\n"; descriptor.lineno = 967U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: calling mwifiex_shutdown_drv...\n"); } } else { } { adapter->init_wait_q_woken = 0U; tmp___3 = mwifiex_shutdown_drv(adapter); } if (tmp___3 == -115) { __ret = 0; if ((unsigned int )adapter->init_wait_q_woken == 0U) { { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; } ldv_54834: { tmp___2 = prepare_to_wait_event(& adapter->init_wait_q, & __wait, 1); __int = tmp___2; } if ((unsigned int )adapter->init_wait_q_woken != 0U) { goto ldv_54833; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_54833; } else { } { schedule(); } goto ldv_54834; ldv_54833: { finish_wait(& adapter->init_wait_q, & __wait); } __ret = (int )__ret___0; } else { } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_remove_card"; descriptor___0.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___0.format = "cmd: mwifiex_shutdown_drv done\n"; descriptor___0.lineno = 973U; descriptor___0.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: mwifiex_shutdown_drv done\n"); } } else { } { tmp___8 = atomic_read((atomic_t const *)(& adapter->rx_pending)); } if (tmp___8 != 0) { { tmp___5 = atomic_read((atomic_t const *)(& adapter->cmd_pending)); tmp___6 = atomic_read((atomic_t const *)(& adapter->tx_pending)); tmp___7 = atomic_read((atomic_t const *)(& adapter->rx_pending)); dev_err((struct device const *)adapter->dev, "rx_pending=%d, tx_pending=%d, cmd_pending=%d\n", tmp___7, tmp___6, tmp___5); } } else { { tmp___9 = atomic_read((atomic_t const *)(& adapter->tx_pending)); } if (tmp___9 != 0) { { tmp___5 = atomic_read((atomic_t const *)(& adapter->cmd_pending)); tmp___6 = atomic_read((atomic_t const *)(& adapter->tx_pending)); tmp___7 = atomic_read((atomic_t const *)(& adapter->rx_pending)); dev_err((struct device const *)adapter->dev, "rx_pending=%d, tx_pending=%d, cmd_pending=%d\n", tmp___7, tmp___6, tmp___5); } } else { { tmp___10 = atomic_read((atomic_t const *)(& adapter->cmd_pending)); } if (tmp___10 != 0) { { tmp___5 = atomic_read((atomic_t const *)(& adapter->cmd_pending)); tmp___6 = atomic_read((atomic_t const *)(& adapter->tx_pending)); tmp___7 = atomic_read((atomic_t const *)(& adapter->rx_pending)); dev_err((struct device const *)adapter->dev, "rx_pending=%d, tx_pending=%d, cmd_pending=%d\n", tmp___7, tmp___6, tmp___5); } } else { } } } i = 0; goto ldv_54840; ldv_54839: priv = adapter->priv[i]; if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { goto ldv_54838; } else { } { rtnl_lock(); } if ((unsigned long )priv->wdev != (unsigned long )((struct wireless_dev *)0) && (unsigned long )priv->netdev != (unsigned long )((struct net_device *)0)) { { mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev); } } else { } { rtnl_unlock(); } ldv_54838: i = i + 1; ldv_54840: ; if (i < (int )adapter->priv_num) { goto ldv_54839; } else { } { wiphy_unregister(adapter->wiphy); wiphy_free(adapter->wiphy); mwifiex_terminate_workqueue(adapter); descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_remove_card"; descriptor___1.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___1.format = "info: unregister device\n"; descriptor___1.lineno = 1002U; descriptor___1.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___11 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: unregister device\n"); } } else { } if ((unsigned long )adapter->if_ops.unregister_dev != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.unregister_dev))(adapter); } } else { } { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_remove_card"; descriptor___2.filename = "drivers/net/wireless/mwifiex/main.c"; descriptor___2.format = "info: free adapter\n"; descriptor___2.lineno = 1006U; descriptor___2.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___12 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: free adapter\n"); } } else { } { mwifiex_free_adapter(adapter); } exit_remove: { up(sem); } exit_sem_err: ; return (0); } } static char const __kstrtab_mwifiex_remove_card[20U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'r', 'e', 'm', 'o', 'v', 'e', '_', 'c', 'a', 'r', 'd', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_remove_card ; struct kernel_symbol const __ksymtab_mwifiex_remove_card = {(unsigned long )(& mwifiex_remove_card), (char const *)(& __kstrtab_mwifiex_remove_card)}; static int mwifiex_init_module(void) { { { mwifiex_debugfs_init(); } return (0); } } static void mwifiex_cleanup_module(void) { { { mwifiex_debugfs_remove(); } return; } } void ldv_EMGentry_exit_mwifiex_cleanup_module_15_2(void (*arg0)(void) ) ; int ldv_EMGentry_init_mwifiex_init_module_15_11(int (*arg0)(void) ) ; int ldv_del_timer(int arg0 , struct timer_list *arg1 ) ; int ldv_del_timer_sync(int arg0 , struct timer_list *arg1 ) ; void ldv_dispatch_deregister_base_instance_10_15_4(void) ; void ldv_dispatch_deregister_file_operations_instance_6_15_5(void) ; void ldv_dispatch_register_base_instance_10_15_6(void) ; void ldv_dispatch_register_file_operations_instance_6_15_7(void) ; void ldv_dummy_resourceless_instance_callback_5_12(int (*arg0)(struct net_device * , void * ) , struct net_device *arg1 , void *arg2 ) ; void ldv_dummy_resourceless_instance_callback_5_13(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_dummy_resourceless_instance_callback_5_14(enum netdev_tx (*arg0)(struct sk_buff * , struct net_device * ) , struct sk_buff *arg1 , struct net_device *arg2 ) ; void ldv_dummy_resourceless_instance_callback_5_15(int (*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_dummy_resourceless_instance_callback_5_16(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_dummy_resourceless_instance_callback_5_17(int (*arg0)(struct net_device * , struct ethtool_wolinfo * ) , struct net_device *arg1 , struct ethtool_wolinfo *arg2 ) ; void ldv_dummy_resourceless_instance_callback_5_3(void (*arg0)(struct net_device * , struct ethtool_wolinfo * ) , struct net_device *arg1 , struct ethtool_wolinfo *arg2 ) ; void ldv_dummy_resourceless_instance_callback_5_7(struct net_device_stats *(*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_dummy_resourceless_instance_callback_5_8(int (*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_dummy_resourceless_instance_callback_5_9(unsigned short (*arg0)(struct net_device * , struct sk_buff * , void * , unsigned short (*)(struct net_device * , struct sk_buff * ) ) , struct net_device *arg1 , struct sk_buff *arg2 , void *arg3 , unsigned short (*arg4)(struct net_device * , struct sk_buff * ) ) ; void ldv_entry_EMGentry_15(void *arg0 ) ; int main(void) ; void ldv_file_operations_file_operations_instance_0(void *arg0 ) ; void ldv_file_operations_file_operations_instance_1(void *arg0 ) ; void ldv_file_operations_file_operations_instance_2(void *arg0 ) ; void ldv_file_operations_file_operations_instance_3(void *arg0 ) ; void ldv_file_operations_file_operations_instance_4(void *arg0 ) ; void ldv_file_operations_instance_write_0_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_write_1_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_write_2_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; int ldv_mod_timer(int arg0 , struct timer_list *arg1 , unsigned long arg2 ) ; void ldv_net_dummy_resourceless_instance_5(void *arg0 ) ; void ldv_struct_cfg80211_ops_base_instance_6(void *arg0 ) ; void ldv_timer_instance_callback_7_2(void (*arg0)(unsigned long ) , unsigned long arg1 ) ; void ldv_timer_timer_instance_7(void *arg0 ) ; struct ldv_thread ldv_thread_15 ; struct ldv_thread ldv_thread_5 ; struct ldv_thread ldv_thread_7 ; void ldv_EMGentry_exit_mwifiex_cleanup_module_15_2(void (*arg0)(void) ) { { { mwifiex_cleanup_module(); } return; } } int ldv_EMGentry_init_mwifiex_init_module_15_11(int (*arg0)(void) ) { int tmp ; { { tmp = mwifiex_init_module(); } return (tmp); } } int ldv_del_timer_sync(int arg0 , struct timer_list *arg1 ) { struct timer_list *ldv_10_timer_list_timer_list ; { ldv_10_timer_list_timer_list = arg1; return (arg0); return (arg0); } } void ldv_dispatch_deregister_base_instance_10_15_4(void) { { return; } } void ldv_dispatch_deregister_file_operations_instance_6_15_5(void) { { return; } } void ldv_dispatch_register_base_instance_10_15_6(void) { struct ldv_struct_EMGentry_15 *cf_arg_6 ; void *tmp ; { { tmp = ldv_xmalloc(4UL); cf_arg_6 = (struct ldv_struct_EMGentry_15 *)tmp; ldv_struct_cfg80211_ops_base_instance_6((void *)cf_arg_6); } return; } } void ldv_dispatch_register_file_operations_instance_6_15_7(void) { struct ldv_struct_EMGentry_15 *cf_arg_0 ; struct ldv_struct_EMGentry_15 *cf_arg_1 ; struct ldv_struct_EMGentry_15 *cf_arg_2 ; struct ldv_struct_EMGentry_15 *cf_arg_3 ; struct ldv_struct_EMGentry_15 *cf_arg_4 ; void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; { { tmp = ldv_xmalloc(4UL); cf_arg_0 = (struct ldv_struct_EMGentry_15 *)tmp; ldv_file_operations_file_operations_instance_0((void *)cf_arg_0); tmp___0 = ldv_xmalloc(4UL); cf_arg_1 = (struct ldv_struct_EMGentry_15 *)tmp___0; ldv_file_operations_file_operations_instance_1((void *)cf_arg_1); tmp___1 = ldv_xmalloc(4UL); cf_arg_2 = (struct ldv_struct_EMGentry_15 *)tmp___1; ldv_file_operations_file_operations_instance_2((void *)cf_arg_2); tmp___2 = ldv_xmalloc(4UL); cf_arg_3 = (struct ldv_struct_EMGentry_15 *)tmp___2; ldv_file_operations_file_operations_instance_3((void *)cf_arg_3); tmp___3 = ldv_xmalloc(4UL); cf_arg_4 = (struct ldv_struct_EMGentry_15 *)tmp___3; ldv_file_operations_file_operations_instance_4((void *)cf_arg_4); } return; } } void ldv_dummy_resourceless_instance_callback_5_12(int (*arg0)(struct net_device * , void * ) , struct net_device *arg1 , void *arg2 ) { { { mwifiex_set_mac_address(arg1, arg2); } return; } } void ldv_dummy_resourceless_instance_callback_5_13(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { mwifiex_set_multicast_list(arg1); } return; } } void ldv_dummy_resourceless_instance_callback_5_14(enum netdev_tx (*arg0)(struct sk_buff * , struct net_device * ) , struct sk_buff *arg1 , struct net_device *arg2 ) { { { mwifiex_hard_start_xmit(arg1, arg2); } return; } } void ldv_dummy_resourceless_instance_callback_5_15(int (*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { mwifiex_close(arg1); } return; } } void ldv_dummy_resourceless_instance_callback_5_16(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { mwifiex_tx_timeout(arg1); } return; } } void ldv_dummy_resourceless_instance_callback_5_7(struct net_device_stats *(*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { mwifiex_get_stats(arg1); } return; } } void ldv_dummy_resourceless_instance_callback_5_8(int (*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { mwifiex_open(arg1); } return; } } void ldv_dummy_resourceless_instance_callback_5_9(unsigned short (*arg0)(struct net_device * , struct sk_buff * , void * , unsigned short (*)(struct net_device * , struct sk_buff * ) ) , struct net_device *arg1 , struct sk_buff *arg2 , void *arg3 , unsigned short (*arg4)(struct net_device * , struct sk_buff * ) ) { { { mwifiex_netdev_select_wmm_queue(arg1, arg2, arg3, arg4); } return; } } void ldv_entry_EMGentry_15(void *arg0 ) { void (*ldv_15_exit_mwifiex_cleanup_module_default)(void) ; int (*ldv_15_init_mwifiex_init_module_default)(void) ; int ldv_15_ret_default ; int tmp ; int tmp___0 ; { { ldv_15_ret_default = ldv_EMGentry_init_mwifiex_init_module_15_11(ldv_15_init_mwifiex_init_module_default); ldv_15_ret_default = ldv_post_init(ldv_15_ret_default); tmp___0 = ldv_undef_int(); } if (tmp___0 != 0) { { ldv_assume(ldv_15_ret_default != 0); ldv_check_final_state(); ldv_stop(); } return; } else { { ldv_assume(ldv_15_ret_default == 0); tmp = ldv_undef_int(); } if (tmp != 0) { { ldv_dispatch_register_file_operations_instance_6_15_7(); ldv_dispatch_register_base_instance_10_15_6(); ldv_dispatch_deregister_file_operations_instance_6_15_5(); ldv_dispatch_deregister_base_instance_10_15_4(); } } else { } { ldv_EMGentry_exit_mwifiex_cleanup_module_15_2(ldv_15_exit_mwifiex_cleanup_module_default); ldv_check_final_state(); ldv_stop(); } return; } return; } } int main(void) { { { ldv_initialize(); ldv_entry_EMGentry_15((void *)0); } return 0; } } void ldv_file_operations_instance_write_0_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { (*arg0)(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_write_1_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { (*arg0)(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_write_2_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { (*arg0)(arg1, arg2, arg3, arg4); } return; } } void ldv_net_dummy_resourceless_instance_5(void *arg0 ) { void (*ldv_5_callback_get_wol)(struct net_device * , struct ethtool_wolinfo * ) ; struct net_device_stats *(*ldv_5_callback_ndo_get_stats)(struct net_device * ) ; int (*ldv_5_callback_ndo_open)(struct net_device * ) ; unsigned short (*ldv_5_callback_ndo_select_queue)(struct net_device * , struct sk_buff * , void * , unsigned short (*)(struct net_device * , struct sk_buff * ) ) ; int (*ldv_5_callback_ndo_set_mac_address)(struct net_device * , void * ) ; void (*ldv_5_callback_ndo_set_rx_mode)(struct net_device * ) ; enum netdev_tx (*ldv_5_callback_ndo_start_xmit)(struct sk_buff * , struct net_device * ) ; int (*ldv_5_callback_ndo_stop)(struct net_device * ) ; void (*ldv_5_callback_ndo_tx_timeout)(struct net_device * ) ; int (*ldv_5_callback_set_wol)(struct net_device * , struct ethtool_wolinfo * ) ; unsigned short (*ldv_5_container_func_1_ptr)(struct net_device * , struct sk_buff * ) ; struct net_device *ldv_5_container_net_device ; struct ethtool_wolinfo *ldv_5_container_struct_ethtool_wolinfo_ptr ; struct sk_buff *ldv_5_container_struct_sk_buff_ptr ; unsigned short (*ldv_5_ldv_param_9_3_default)(struct net_device * , struct sk_buff * ) ; struct ldv_struct_dummy_resourceless_instance_5 *data ; int tmp ; void *tmp___0 ; { data = (struct ldv_struct_dummy_resourceless_instance_5 *)arg0; if ((unsigned long )data != (unsigned long )((struct ldv_struct_dummy_resourceless_instance_5 *)0)) { { ldv_5_container_net_device = data->arg0; ldv_free((void *)data); } } else { } goto ldv_call_5; return; ldv_call_5: { tmp = ldv_undef_int(); } { if (tmp == 1) { goto case_1; } else { } if (tmp == 2) { goto case_2; } else { } if (tmp == 3) { goto case_3; } else { } if (tmp == 4) { goto case_4; } else { } if (tmp == 5) { goto case_5; } else { } if (tmp == 6) { goto case_6; } else { } if (tmp == 7) { goto case_7; } else { } if (tmp == 8) { goto case_8; } else { } if (tmp == 9) { goto case_9; } else { } if (tmp == 10) { goto case_10; } else { } if (tmp == 11) { goto case_11; } else { } goto switch_default; case_1: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_17(ldv_5_callback_set_wol, ldv_5_container_net_device, ldv_5_container_struct_ethtool_wolinfo_ptr); } goto ldv_call_5; case_2: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_16(ldv_5_callback_ndo_tx_timeout, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; case_3: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_15(ldv_5_callback_ndo_stop, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_4: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_14(ldv_5_callback_ndo_start_xmit, ldv_5_container_struct_sk_buff_ptr, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_5: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_13(ldv_5_callback_ndo_set_rx_mode, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_6: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_12(ldv_5_callback_ndo_set_mac_address, ldv_5_container_net_device, (void *)ldv_5_container_func_1_ptr); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_7: /* CIL Label */ { tmp___0 = ldv_xmalloc(1UL); ldv_5_ldv_param_9_3_default = (unsigned short (*)(struct net_device * , struct sk_buff * ))tmp___0; ldv_dummy_resourceless_instance_callback_5_9(ldv_5_callback_ndo_select_queue, ldv_5_container_net_device, ldv_5_container_struct_sk_buff_ptr, (void *)ldv_5_container_func_1_ptr, ldv_5_ldv_param_9_3_default); ldv_free((void *)ldv_5_ldv_param_9_3_default); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_8: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_8(ldv_5_callback_ndo_open, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_9: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_7(ldv_5_callback_ndo_get_stats, ldv_5_container_net_device); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_10: /* CIL Label */ { ldv_dummy_resourceless_instance_callback_5_3(ldv_5_callback_get_wol, ldv_5_container_net_device, ldv_5_container_struct_ethtool_wolinfo_ptr); } goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; goto ldv_call_5; case_11: /* CIL Label */ ; return; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_timer_instance_callback_7_2(void (*arg0)(unsigned long ) , unsigned long arg1 ) { { { (*arg0)(arg1); } return; } } void ldv_timer_timer_instance_7(void *arg0 ) { struct timer_list *ldv_7_container_timer_list ; struct ldv_struct_timer_instance_7 *data ; { data = (struct ldv_struct_timer_instance_7 *)arg0; if ((unsigned long )data != (unsigned long )((struct ldv_struct_timer_instance_7 *)0)) { { ldv_7_container_timer_list = data->arg0; ldv_free((void *)data); } } else { } { ldv_switch_to_interrupt_context(); } if ((unsigned long )ldv_7_container_timer_list->function != (unsigned long )((void (*)(unsigned long ))0)) { { ldv_timer_instance_callback_7_2(ldv_7_container_timer_list->function, ldv_7_container_timer_list->data); } } else { } { ldv_switch_to_process_context(); } return; return; } } __inline static long IS_ERR(void const *ptr ) { long tmp ; { { tmp = ldv_is_err(ptr); } return (tmp); } } __inline static void atomic_inc(atomic_t *v ) { { { ldv_atomic_inc(v); } return; } } __inline static int atomic_add_return(int i , atomic_t *v ) { int tmp ; { { tmp = ldv_atomic_add_return(i, v); } return (tmp); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { { tmp = ldv_kzalloc(size, flags); } return (tmp); } } static int ldv_mod_timer_19(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; tmp___0 = ldv_mod_timer(ldv_func_res, ldv_func_arg1, ldv_func_arg2); } return (tmp___0); return (ldv_func_res); } } static int ldv_del_timer_20(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___1 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } static int ldv_del_timer_sync_21(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___2 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer_sync(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } extern void __list_add(struct list_head * , struct list_head * , struct list_head * ) ; __inline static void list_add_tail(struct list_head *new , struct list_head *head ) { { { __list_add(new, head->prev, head); } return; } } __inline static int test_and_clear_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile ("":); return (0); return (1); } } extern void __raw_spin_lock_init(raw_spinlock_t * , char const * , struct lock_class_key * ) ; extern void _raw_spin_lock(raw_spinlock_t * ) ; extern void _raw_spin_unlock(raw_spinlock_t * ) ; __inline static void spin_lock(spinlock_t *lock ) { { { _raw_spin_lock(& lock->__annonCompField19.rlock); } return; } } __inline static void spin_unlock(spinlock_t *lock ) { { { _raw_spin_unlock(& lock->__annonCompField19.rlock); } return; } } static int ldv_del_timer_19(struct timer_list *ldv_func_arg1 ) ; extern int dev_warn(struct device const * , char const * , ...) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static void __skb_queue_head_init(struct sk_buff_head *list ) { struct sk_buff *tmp ; { tmp = (struct sk_buff *)list; list->next = tmp; list->prev = tmp; list->qlen = 0U; return; } } __inline static void skb_queue_head_init(struct sk_buff_head *list ) { struct lock_class_key __key ; { { spinlock_check(& list->lock); __raw_spin_lock_init(& list->lock.__annonCompField19.rlock, "&(&list->lock)->rlock", & __key); __skb_queue_head_init(list); } return; } } extern unsigned char *skb_put(struct sk_buff * , unsigned int ) ; __inline static void skb_reserve(struct sk_buff *skb , int len ) { { skb->data = skb->data + (unsigned long )len; skb->tail = skb->tail + (sk_buff_data_t )len; return; } } extern struct sk_buff *__netdev_alloc_skb(struct net_device * , unsigned int , gfp_t ) ; __inline static struct sk_buff *netdev_alloc_skb(struct net_device *dev , unsigned int length ) { struct sk_buff *tmp ; { { tmp = __netdev_alloc_skb(dev, length, 32U); } return (tmp); } } __inline static struct sk_buff *dev_alloc_skb(unsigned int length ) { struct sk_buff *tmp ; { { tmp = netdev_alloc_skb((struct net_device *)0, length); } return (tmp); } } extern int netpoll_trap(void) ; extern void __netif_schedule(struct Qdisc * ) ; __inline static void netif_tx_wake_queue(struct netdev_queue *dev_queue ) { int tmp ; int tmp___0 ; { { tmp = netpoll_trap(); } if (tmp != 0) { { netif_tx_start_queue(dev_queue); } return; } else { } { tmp___0 = test_and_clear_bit(0L, (unsigned long volatile *)(& dev_queue->state)); } if (tmp___0 != 0) { { __netif_schedule(dev_queue->qdisc); } } else { } return; } } extern void __dev_kfree_skb_any(struct sk_buff * , enum skb_free_reason ) ; __inline static void dev_kfree_skb_any(struct sk_buff *skb ) { { { __dev_kfree_skb_any(skb, 1); } return; } } __inline static struct mwifiex_rxinfo *MWIFIEX_SKB_RXCB(struct sk_buff *skb ) { { return ((struct mwifiex_rxinfo *)(& skb->cb) + 8U); } } void mwifiex_wake_up_net_dev_queue(struct net_device *netdev , struct mwifiex_adapter *adapter ) ; int mwifiex_init_priv(struct mwifiex_private *priv ) ; void mwifiex_free_priv(struct mwifiex_private *priv ) ; int mwifiex_shutdown_fw_complete(struct mwifiex_adapter *adapter ) ; int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter ) ; int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter ) ; void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter ) ; void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) ; void mwifiex_clean_txrx(struct mwifiex_private *priv ) ; int mwifiex_sta_init_cmd(struct mwifiex_private *priv , u8 first_sta ) ; void mwifiex_wmm_init(struct mwifiex_adapter *adapter ) ; static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv ) { struct mwifiex_adapter *adapter ; struct mwifiex_bss_prio_node *bss_prio ; struct mwifiex_bss_prio_tbl *tbl ; unsigned long flags ; void *tmp ; raw_spinlock_t *tmp___0 ; { { adapter = priv->adapter; tbl = (struct mwifiex_bss_prio_tbl *)(& adapter->bss_prio_tbl); tmp = kzalloc(24UL, 208U); bss_prio = (struct mwifiex_bss_prio_node *)tmp; } if ((unsigned long )bss_prio == (unsigned long )((struct mwifiex_bss_prio_node *)0)) { return (-12); } else { } { bss_prio->priv = priv; INIT_LIST_HEAD(& bss_prio->list); tmp___0 = spinlock_check(& (tbl + (unsigned long )priv->bss_priority)->bss_prio_lock); flags = _raw_spin_lock_irqsave(tmp___0); list_add_tail(& bss_prio->list, & (tbl + (unsigned long )priv->bss_priority)->bss_prio_head); spin_unlock_irqrestore(& (tbl + (unsigned long )priv->bss_priority)->bss_prio_lock, flags); } return (0); } } int mwifiex_init_priv(struct mwifiex_private *priv ) { u32 i ; int tmp ; { { priv->media_connected = 0U; memset((void *)(& priv->curr_addr), 255, 6UL); priv->pkt_tx_ctrl = 0U; priv->bss_mode = 0U; priv->data_rate = 0U; priv->is_data_rate_auto = 1U; priv->bcn_avg_factor = 8U; priv->data_avg_factor = 8U; priv->sec_info.wep_enabled = 0U; priv->sec_info.authentication_mode = 0U; priv->sec_info.encryption_mode = 0U; i = 0U; } goto ldv_54558; ldv_54557: { memset((void *)(& priv->wep_key) + (unsigned long )i, 0, 28UL); i = i + 1U; } ldv_54558: ; if (i <= 3U) { goto ldv_54557; } else { } { priv->wep_key_curr_index = 0U; priv->curr_pkt_filter = 19U; priv->beacon_period = 100U; priv->attempted_bss_desc = (struct mwifiex_bssdescriptor *)0; memset((void *)(& priv->curr_bss_params), 0, 360UL); priv->listen_interval = 10U; memset((void *)(& priv->prev_ssid), 0, 33UL); memset((void *)(& priv->prev_bssid), 0, 6UL); memset((void *)(& priv->assoc_rsp_buf), 0, 500UL); priv->assoc_rsp_size = 0U; priv->adhoc_channel = 6U; priv->atim_window = 0U; priv->adhoc_state = 0U; priv->tx_power_level = 0U; priv->max_tx_power_level = 0U; priv->min_tx_power_level = 0U; priv->tx_rate = 0U; priv->rxpd_htinfo = 0U; priv->rxpd_rate = 0U; priv->rate_bitmap = 0U; priv->data_rssi_last = 0; priv->data_rssi_avg = 0; priv->data_nf_avg = 0; priv->data_nf_last = 0; priv->bcn_rssi_last = 0; priv->bcn_rssi_avg = 0; priv->bcn_nf_avg = 0; priv->bcn_nf_last = 0; memset((void *)(& priv->wpa_ie), 0, 256UL); memset((void *)(& priv->aes_key), 0, 62UL); priv->wpa_ie_len = 0U; priv->wpa_is_gtk_set = 0U; memset((void *)(& priv->assoc_tlv_buf), 0, 256UL); priv->assoc_tlv_buf_len = 0U; memset((void *)(& priv->wps), 0, 1UL); memset((void *)(& priv->gen_ie_buf), 0, 256UL); priv->gen_ie_buf_len = 0U; memset((void *)(& priv->vs_ie), 0, 2080UL); priv->wmm_required = 1U; priv->wmm_enabled = 0U; priv->wmm_qosinfo = 0U; priv->curr_bcn_buf = (u8 *)0U; priv->curr_bcn_size = 0U; priv->wps_ie = (u8 *)0U; priv->wps_ie_len = 0U; priv->ap_11n_enabled = 0U; memset((void *)(& priv->roc_cfg), 0, 64UL); priv->scan_block = 0U; priv->csa_chan = 0U; priv->csa_expire_time = 0UL; priv->del_list_idx = 0U; priv->hs2_enabled = 0; tmp = mwifiex_add_bss_prio_tbl(priv); } return (tmp); } } static int mwifiex_allocate_adapter(struct mwifiex_adapter *adapter ) { int ret ; { { ret = mwifiex_alloc_cmd_buffer(adapter); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "%s: failed to alloc cmd buffer\n", "mwifiex_allocate_adapter"); } return (-1); } else { } { adapter->sleep_cfm = dev_alloc_skb(16U); } if ((unsigned long )adapter->sleep_cfm == (unsigned long )((struct sk_buff *)0)) { { dev_err((struct device const *)adapter->dev, "%s: failed to alloc sleep cfm cmd buffer\n", "mwifiex_allocate_adapter"); } return (-1); } else { } { skb_reserve(adapter->sleep_cfm, 4); } return (0); } } static void mwifiex_init_adapter(struct mwifiex_adapter *adapter ) { struct mwifiex_opt_sleep_confirm *sleep_cfm_buf ; { { sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *)0; skb_put(adapter->sleep_cfm, 12U); adapter->cmd_sent = 0U; } if ((unsigned int )adapter->iface_type == 0U) { adapter->data_sent = 1U; } else { adapter->data_sent = 0U; } { adapter->cmd_resp_received = 0U; adapter->event_received = 0U; adapter->data_received = 0U; adapter->surprise_removed = 0; adapter->hw_status = 1; adapter->ps_mode = 0U; adapter->ps_state = 0U; adapter->need_to_wakeup = 0U; adapter->scan_mode = 3U; adapter->specific_scan_time = 30U; adapter->active_scan_time = 30U; adapter->passive_scan_time = 110U; adapter->scan_probes = 1U; adapter->multiple_dtim = 1U; adapter->local_listen_interval = 0U; adapter->is_deep_sleep = 0U; adapter->delay_null_pkt = 0U; adapter->delay_to_ps = 1000U; adapter->enhanced_ps_mode = 1U; adapter->gen_null_pkt = 0U; adapter->pps_uapsd_mode = 0U; adapter->pm_wakeup_card_req = 0U; adapter->pm_wakeup_fw_try = 0U; adapter->tx_buf_size = 2048U; adapter->curr_tx_buf_size = 2048U; adapter->is_hs_configured = 0U; adapter->hs_cfg.conditions = 0U; adapter->hs_cfg.gpio = 255U; adapter->hs_cfg.gap = 0U; adapter->hs_activated = 0U; memset((void *)(& adapter->event_body), 0, 1024UL); adapter->hw_dot_11n_dev_cap = 0U; adapter->hw_dev_mcs_support = 0U; adapter->sec_chan_offset = 0U; adapter->adhoc_11n_enabled = 0U; mwifiex_wmm_init(adapter); } if ((unsigned long )adapter->sleep_cfm != (unsigned long )((struct sk_buff *)0)) { { sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *)(adapter->sleep_cfm)->data; memset((void *)sleep_cfm_buf, 0, (size_t )(adapter->sleep_cfm)->len); sleep_cfm_buf->command = 228U; sleep_cfm_buf->size = (unsigned short )(adapter->sleep_cfm)->len; sleep_cfm_buf->result = 0U; sleep_cfm_buf->action = 5U; sleep_cfm_buf->resp_ctrl = 1U; } } else { } { memset((void *)(& adapter->sleep_params), 0, 10UL); memset((void *)(& adapter->sleep_period), 0, 4UL); adapter->tx_lock_flag = 0U; adapter->null_pkt_interval = 0U; adapter->fw_bands = 0U; adapter->config_bands = 0U; adapter->adhoc_start_band = 0U; adapter->scan_channels = (struct mwifiex_chan_scan_param_set *)0; adapter->fw_release_number = 0U; adapter->fw_cap_info = 0U; memset((void *)(& adapter->upld_buf), 0, 2312UL); adapter->event_cause = 0U; adapter->region_code = 0U; adapter->bcn_miss_time_out = 5U; adapter->adhoc_awake_period = 0U; memset((void *)(& adapter->arp_filter), 0, 68UL); adapter->arp_filter_size = 0U; adapter->max_mgmt_ie_index = 16U; adapter->empty_tx_q_cnt = 0U; } return; } } void mwifiex_set_trans_start(struct net_device *dev ) { int i ; struct netdev_queue *tmp ; { i = 0; goto ldv_54574; ldv_54573: { tmp = netdev_get_tx_queue((struct net_device const *)dev, (unsigned int )i); tmp->trans_start = jiffies; i = i + 1; } ldv_54574: ; if ((unsigned int )i < dev->num_tx_queues) { goto ldv_54573; } else { } dev->trans_start = jiffies; return; } } void mwifiex_wake_up_net_dev_queue(struct net_device *netdev , struct mwifiex_adapter *adapter ) { unsigned long dev_queue_flags ; unsigned int i ; raw_spinlock_t *tmp ; struct netdev_queue *txq ; struct netdev_queue *tmp___0 ; bool tmp___1 ; { { tmp = spinlock_check(& adapter->queue_lock); dev_queue_flags = _raw_spin_lock_irqsave(tmp); i = 0U; } goto ldv_54587; ldv_54586: { tmp___0 = netdev_get_tx_queue((struct net_device const *)netdev, i); txq = tmp___0; tmp___1 = netif_tx_queue_stopped((struct netdev_queue const *)txq); } if ((int )tmp___1) { { netif_tx_wake_queue(txq); } } else { } i = i + 1U; ldv_54587: ; if (i < netdev->num_tx_queues) { goto ldv_54586; } else { } { spin_unlock_irqrestore(& adapter->queue_lock, dev_queue_flags); } return; } } void mwifiex_stop_net_dev_queue(struct net_device *netdev , struct mwifiex_adapter *adapter ) { unsigned long dev_queue_flags ; unsigned int i ; raw_spinlock_t *tmp ; struct netdev_queue *txq ; struct netdev_queue *tmp___0 ; bool tmp___1 ; int tmp___2 ; { { tmp = spinlock_check(& adapter->queue_lock); dev_queue_flags = _raw_spin_lock_irqsave(tmp); i = 0U; } goto ldv_54600; ldv_54599: { tmp___0 = netdev_get_tx_queue((struct net_device const *)netdev, i); txq = tmp___0; tmp___1 = netif_tx_queue_stopped((struct netdev_queue const *)txq); } if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { { netif_tx_stop_queue(txq); } } else { } i = i + 1U; ldv_54600: ; if (i < netdev->num_tx_queues) { goto ldv_54599; } else { } { spin_unlock_irqrestore(& adapter->queue_lock, dev_queue_flags); } return; } } static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter ) { struct mwifiex_private *priv ; s32 i ; s32 j ; { { list_del(& adapter->cmd_free_q); list_del(& adapter->cmd_pending_q); list_del(& adapter->scan_pending_q); i = 0; } goto ldv_54609; ldv_54608: { list_del(& adapter->bss_prio_tbl[i].bss_prio_head); i = i + 1; } ldv_54609: ; if (i < (int )adapter->priv_num) { goto ldv_54608; } else { } i = 0; goto ldv_54615; ldv_54614: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { priv = adapter->priv[i]; j = 0; goto ldv_54612; ldv_54611: { list_del(& priv->wmm.tid_tbl_ptr[j].ra_list); j = j + 1; } ldv_54612: ; if (j <= 7) { goto ldv_54611; } else { } { list_del(& priv->tx_ba_stream_tbl_ptr); list_del(& priv->rx_reorder_tbl_ptr); list_del(& priv->sta_list); } } else { } i = i + 1; ldv_54615: ; if (i < (int )adapter->priv_num) { goto ldv_54614; } else { } return; } } static void mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { { printk("\vmwifiex: %s: adapter is NULL\n", "mwifiex_adapter_cleanup"); } return; } else { } { mwifiex_cancel_all_pending_cmd(adapter); mwifiex_free_lock_list(adapter); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_adapter_cleanup"; descriptor.filename = "drivers/net/wireless/mwifiex/init.c"; descriptor.format = "info: free cmd buffer\n"; descriptor.lineno = 393U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: free cmd buffer\n"); } } else { } { mwifiex_free_cmd_buffer(adapter); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_adapter_cleanup"; descriptor___0.filename = "drivers/net/wireless/mwifiex/init.c"; descriptor___0.format = "info: free scan table\n"; descriptor___0.lineno = 396U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: free scan table\n"); } } else { } if ((unsigned long )adapter->sleep_cfm != (unsigned long )((struct sk_buff *)0)) { { dev_kfree_skb_any(adapter->sleep_cfm); } } else { } return; } } int mwifiex_init_lock_list(struct mwifiex_adapter *adapter ) { struct mwifiex_private *priv ; s32 i ; s32 j ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; struct lock_class_key __key___4 ; struct lock_class_key __key___5 ; struct lock_class_key __key___6 ; struct lock_class_key __key___7 ; struct lock_class_key __key___8 ; struct lock_class_key __key___9 ; struct lock_class_key __key___10 ; struct lock_class_key __key___11 ; struct lock_class_key __key___12 ; struct lock_class_key __key___13 ; { { spinlock_check(& adapter->mwifiex_lock); __raw_spin_lock_init(& adapter->mwifiex_lock.__annonCompField19.rlock, "&(&adapter->mwifiex_lock)->rlock", & __key); spinlock_check(& adapter->int_lock); __raw_spin_lock_init(& adapter->int_lock.__annonCompField19.rlock, "&(&adapter->int_lock)->rlock", & __key___0); spinlock_check(& adapter->main_proc_lock); __raw_spin_lock_init(& adapter->main_proc_lock.__annonCompField19.rlock, "&(&adapter->main_proc_lock)->rlock", & __key___1); spinlock_check(& adapter->mwifiex_cmd_lock); __raw_spin_lock_init(& adapter->mwifiex_cmd_lock.__annonCompField19.rlock, "&(&adapter->mwifiex_cmd_lock)->rlock", & __key___2); spinlock_check(& adapter->queue_lock); __raw_spin_lock_init(& adapter->queue_lock.__annonCompField19.rlock, "&(&adapter->queue_lock)->rlock", & __key___3); i = 0; } goto ldv_54639; ldv_54638: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { { priv = adapter->priv[i]; spinlock_check(& priv->rx_pkt_lock); __raw_spin_lock_init(& priv->rx_pkt_lock.__annonCompField19.rlock, "&(&priv->rx_pkt_lock)->rlock", & __key___4); spinlock_check(& priv->wmm.ra_list_spinlock); __raw_spin_lock_init(& priv->wmm.ra_list_spinlock.__annonCompField19.rlock, "&(&priv->wmm.ra_list_spinlock)->rlock", & __key___5); spinlock_check(& priv->curr_bcn_buf_lock); __raw_spin_lock_init(& priv->curr_bcn_buf_lock.__annonCompField19.rlock, "&(&priv->curr_bcn_buf_lock)->rlock", & __key___6); spinlock_check(& priv->sta_list_spinlock); __raw_spin_lock_init(& priv->sta_list_spinlock.__annonCompField19.rlock, "&(&priv->sta_list_spinlock)->rlock", & __key___7); } } else { } i = i + 1; ldv_54639: ; if (i < (int )adapter->priv_num) { goto ldv_54638; } else { } { INIT_LIST_HEAD(& adapter->cmd_free_q); INIT_LIST_HEAD(& adapter->cmd_pending_q); INIT_LIST_HEAD(& adapter->scan_pending_q); spinlock_check(& adapter->cmd_free_q_lock); __raw_spin_lock_init(& adapter->cmd_free_q_lock.__annonCompField19.rlock, "&(&adapter->cmd_free_q_lock)->rlock", & __key___8); spinlock_check(& adapter->cmd_pending_q_lock); __raw_spin_lock_init(& adapter->cmd_pending_q_lock.__annonCompField19.rlock, "&(&adapter->cmd_pending_q_lock)->rlock", & __key___9); spinlock_check(& adapter->scan_pending_q_lock); __raw_spin_lock_init(& adapter->scan_pending_q_lock.__annonCompField19.rlock, "&(&adapter->scan_pending_q_lock)->rlock", & __key___10); skb_queue_head_init(& adapter->usb_rx_data_q); i = 0; } goto ldv_54646; ldv_54645: { INIT_LIST_HEAD(& adapter->bss_prio_tbl[i].bss_prio_head); spinlock_check(& adapter->bss_prio_tbl[i].bss_prio_lock); __raw_spin_lock_init(& adapter->bss_prio_tbl[i].bss_prio_lock.__annonCompField19.rlock, "&(&adapter->bss_prio_tbl[i].bss_prio_lock)->rlock", & __key___11); i = i + 1; } ldv_54646: ; if (i < (int )adapter->priv_num) { goto ldv_54645; } else { } i = 0; goto ldv_54655; ldv_54654: ; if ((unsigned long )adapter->priv[i] == (unsigned long )((struct mwifiex_private *)0)) { goto ldv_54648; } else { } priv = adapter->priv[i]; j = 0; goto ldv_54650; ldv_54649: { INIT_LIST_HEAD(& priv->wmm.tid_tbl_ptr[j].ra_list); j = j + 1; } ldv_54650: ; if (j <= 7) { goto ldv_54649; } else { } { INIT_LIST_HEAD(& priv->tx_ba_stream_tbl_ptr); INIT_LIST_HEAD(& priv->rx_reorder_tbl_ptr); INIT_LIST_HEAD(& priv->sta_list); spinlock_check(& priv->tx_ba_stream_tbl_lock); __raw_spin_lock_init(& priv->tx_ba_stream_tbl_lock.__annonCompField19.rlock, "&(&priv->tx_ba_stream_tbl_lock)->rlock", & __key___12); spinlock_check(& priv->rx_reorder_tbl_lock); __raw_spin_lock_init(& priv->rx_reorder_tbl_lock.__annonCompField19.rlock, "&(&priv->rx_reorder_tbl_lock)->rlock", & __key___13); } ldv_54648: i = i + 1; ldv_54655: ; if (i < (int )adapter->priv_num) { goto ldv_54654; } else { } return (0); } } int mwifiex_init_fw(struct mwifiex_adapter *adapter ) { int ret ; struct mwifiex_private *priv ; u8 i ; u8 first_sta ; int is_cmd_pend_q_empty ; unsigned long flags ; int tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; { { first_sta = 1U; adapter->hw_status = 1; ret = mwifiex_allocate_adapter(adapter); } if (ret != 0) { return (-1); } else { } { mwifiex_init_adapter(adapter); i = 0U; } goto ldv_54667; ldv_54666: ; if ((unsigned long )adapter->priv[(int )i] != (unsigned long )((struct mwifiex_private *)0)) { { priv = adapter->priv[(int )i]; ret = mwifiex_init_priv(priv); } if (ret != 0) { return (-1); } else { } } else { } i = (u8 )((int )i + 1); ldv_54667: ; if ((int )i < (int )adapter->priv_num) { goto ldv_54666; } else { } if ((unsigned long )adapter->if_ops.init_fw_port != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { { tmp = (*(adapter->if_ops.init_fw_port))(adapter); } if (tmp != 0) { return (-1); } else { } } else { } i = 0U; goto ldv_54670; ldv_54669: ; if ((unsigned long )adapter->priv[(int )i] != (unsigned long )((struct mwifiex_private *)0)) { { ret = mwifiex_sta_init_cmd(adapter->priv[(int )i], (int )first_sta); } if (ret == -1) { return (-1); } else { } first_sta = 0U; } else { } i = (u8 )((int )i + 1); ldv_54670: ; if ((int )i < (int )adapter->priv_num) { goto ldv_54669; } else { } { tmp___0 = spinlock_check(& adapter->cmd_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___0); is_cmd_pend_q_empty = list_empty((struct list_head const *)(& adapter->cmd_pending_q)); spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, flags); } if (is_cmd_pend_q_empty == 0) { { tmp___1 = mwifiex_main_process(adapter); } if (tmp___1 != -1) { ret = -115; } else { } } else { adapter->hw_status = 0; } return (ret); } } static void mwifiex_delete_bss_prio_tbl(struct mwifiex_private *priv ) { int i ; struct mwifiex_adapter *adapter ; struct mwifiex_bss_prio_node *bssprio_node ; struct mwifiex_bss_prio_node *tmp_node ; struct list_head *head ; spinlock_t *lock ; unsigned long flags ; struct _ddebug descriptor ; long tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct list_head const *__mptr___1 ; { adapter = priv->adapter; i = 0; goto ldv_54702; ldv_54701: { head = & adapter->bss_prio_tbl[i].bss_prio_head; lock = & adapter->bss_prio_tbl[i].bss_prio_lock; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_delete_bss_prio_tbl"; descriptor.filename = "drivers/net/wireless/mwifiex/init.c"; descriptor.format = "info: delete BSS priority table, bss_type = %d, bss_num = %d, i = %d, head = %p\n"; descriptor.lineno = 551U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: delete BSS priority table, bss_type = %d, bss_num = %d, i = %d, head = %p\n", (int )priv->bss_type, (int )priv->bss_num, i, head); } } else { } { tmp___0 = spinlock_check(lock); flags = _raw_spin_lock_irqsave(tmp___0); tmp___1 = list_empty((struct list_head const *)head); } if (tmp___1 != 0) { { spin_unlock_irqrestore(lock, flags); } goto ldv_54690; } else { } __mptr = (struct list_head const *)head->next; bssprio_node = (struct mwifiex_bss_prio_node *)__mptr; __mptr___0 = (struct list_head const *)bssprio_node->list.next; tmp_node = (struct mwifiex_bss_prio_node *)__mptr___0; goto ldv_54699; ldv_54698: ; if ((unsigned long )bssprio_node->priv == (unsigned long )priv) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_delete_bss_prio_tbl"; descriptor___0.filename = "drivers/net/wireless/mwifiex/init.c"; descriptor___0.format = "info: Delete node %p, next = %p\n"; descriptor___0.lineno = 564U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: Delete node %p, next = %p\n", bssprio_node, tmp_node); } } else { } { list_del(& bssprio_node->list); kfree((void const *)bssprio_node); } } else { } bssprio_node = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct mwifiex_bss_prio_node *)__mptr___1; ldv_54699: ; if ((unsigned long )(& bssprio_node->list) != (unsigned long )head) { goto ldv_54698; } else { } { spin_unlock_irqrestore(lock, flags); } ldv_54690: i = i + 1; ldv_54702: ; if (i < (int )adapter->priv_num) { goto ldv_54701; } else { } return; } } void mwifiex_free_priv(struct mwifiex_private *priv ) { { { mwifiex_clean_txrx(priv); mwifiex_delete_bss_prio_tbl(priv); mwifiex_free_curr_bcn(priv); } return; } } int mwifiex_shutdown_drv(struct mwifiex_adapter *adapter ) { int ret ; struct mwifiex_private *priv ; s32 i ; struct sk_buff *skb ; struct _ddebug descriptor ; long tmp ; struct mwifiex_rxinfo *rx_info ; struct mwifiex_rxinfo *tmp___0 ; { ret = -115; if ((unsigned int )adapter->hw_status == 6U) { return (0); } else { } adapter->hw_status = 5; if (adapter->mwifiex_processing != 0U) { { dev_warn((struct device const *)adapter->dev, "main process is still running\n"); } return (ret); } else { } if ((unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0)) { { dev_warn((struct device const *)adapter->dev, "curr_cmd is still in processing\n"); ldv_del_timer_19(& adapter->cmd_timer); mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); adapter->curr_cmd = (struct cmd_ctrl_node *)0; } } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_shutdown_drv"; descriptor.filename = "drivers/net/wireless/mwifiex/init.c"; descriptor.format = "info: shutdown mwifiex...\n"; descriptor.lineno = 624U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: shutdown mwifiex...\n"); } } else { } i = 0; goto ldv_54717; ldv_54716: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { { priv = adapter->priv[i]; mwifiex_clean_txrx(priv); mwifiex_delete_bss_prio_tbl(priv); } } else { } i = i + 1; ldv_54717: ; if (i < (int )adapter->priv_num) { goto ldv_54716; } else { } { spin_lock(& adapter->mwifiex_lock); } if ((unsigned long )adapter->if_ops.data_complete != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { goto ldv_54721; ldv_54720: { tmp___0 = MWIFIEX_SKB_RXCB(skb); rx_info = tmp___0; priv = adapter->priv[(int )rx_info->bss_num]; } if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0)) { priv->stats.rx_dropped = priv->stats.rx_dropped + 1UL; } else { } { dev_kfree_skb_any(skb); (*(adapter->if_ops.data_complete))(adapter); } ldv_54721: { skb = skb_dequeue(& adapter->usb_rx_data_q); } if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { goto ldv_54720; } else { } } else { } { mwifiex_adapter_cleanup(adapter); spin_unlock(& adapter->mwifiex_lock); ret = mwifiex_shutdown_fw_complete(adapter); } return (ret); } } int mwifiex_dnld_fw(struct mwifiex_adapter *adapter , struct mwifiex_fw_image *pmfw ) { int ret ; u32 poll_num ; { poll_num = 1U; if ((unsigned long )adapter->if_ops.check_fw_status != (unsigned long )((int (*)(struct mwifiex_adapter * , u32 ))0)) { { adapter->winner = 0; ret = (*(adapter->if_ops.check_fw_status))(adapter, poll_num); } if (ret == 0) { { dev_notice((struct device const *)adapter->dev, "WLAN FW already running! Skip FW dnld\n"); } return (0); } else { } poll_num = 100U; if (adapter->winner == 0) { { dev_notice((struct device const *)adapter->dev, "FW already running! Skip FW dnld\n"); } goto poll_fw; } else { } } else { } if ((unsigned long )pmfw != (unsigned long )((struct mwifiex_fw_image *)0)) { { ret = (*(adapter->if_ops.prog_fw))(adapter, pmfw); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "prog_fw failed ret=%#x\n", ret); } return (ret); } else { } } else { } poll_fw: { ret = (*(adapter->if_ops.check_fw_status))(adapter, poll_num); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "FW failed to be active in time\n"); } } else { } return (ret); } } static int ldv_del_timer_19(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } u8 mwifiex_band_to_radio_type(u8 band ) ; struct mwifiex_chan_freq_power *mwifiex_get_cfp(struct mwifiex_private *priv , u8 band , u16 channel , u32 freq ) ; u32 mwifiex_index_to_data_rate(struct mwifiex_private *priv , u8 index , u8 ht_info ) ; u32 mwifiex_index_to_acs_data_rate(struct mwifiex_private *priv , u8 index , u8 ht_info ) ; u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv , u8 *rates ) ; u32 mwifiex_get_supported_rates(struct mwifiex_private *priv , u8 *rates ) ; u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv , u8 *rates , u8 radio_type ) ; u8 mwifiex_is_rate_auto(struct mwifiex_private *priv ) ; u16 region_code_index[7U] ; __inline static u32 mwifiex_copy_rates(u8 *dest , u32 pos , u8 *src , int len ) { int i ; { i = 0; goto ldv_54097; ldv_54096: ; if (pos > 13U) { goto ldv_54095; } else { } *(dest + (unsigned long )pos) = *(src + (unsigned long )i); i = i + 1; pos = pos + 1U; ldv_54097: ; if (i < len && (unsigned int )*(src + (unsigned long )i) != 0U) { goto ldv_54096; } else { } ldv_54095: ; return (pos); } } u8 *mwifiex_11d_code_2_region(u8 code ) ; static u8 adhoc_rates_b[5U] = { 130U, 132U, 139U, 150U, 0U}; static u8 adhoc_rates_g[9U] = { 140U, 18U, 152U, 36U, 176U, 72U, 96U, 108U, 0U}; static u8 adhoc_rates_bg[13U] = { 130U, 132U, 139U, 150U, 12U, 18U, 24U, 36U, 48U, 72U, 96U, 108U, 0U}; static u8 adhoc_rates_a[9U] = { 140U, 18U, 152U, 36U, 176U, 72U, 96U, 108U, 0U}; static u8 supported_rates_a[9U] = { 12U, 18U, 24U, 36U, 176U, 72U, 96U, 108U, 0U}; static u16 mwifiex_data_rates[32U] = { 2U, 4U, 11U, 22U, 0U, 12U, 18U, 24U, 36U, 48U, 72U, 96U, 108U, 144U, 13U, 26U, 39U, 52U, 78U, 104U, 117U, 130U, 12U, 27U, 54U, 81U, 108U, 162U, 216U, 243U, 270U, 0U}; static u8 supported_rates_b[5U] = { 2U, 4U, 11U, 22U, 0U}; static u8 supported_rates_g[9U] = { 12U, 18U, 24U, 36U, 48U, 72U, 96U, 108U, 0U}; static u8 supported_rates_bg[13U] = { 2U, 4U, 11U, 12U, 18U, 22U, 24U, 36U, 48U, 72U, 96U, 108U, 0U}; u16 region_code_index[7U] = { 16U, 32U, 48U, 50U, 64U, 65U, 255U}; static u8 supported_rates_n[3U] = { 2U, 4U, 0U}; static struct region_code_mapping region_code_mapping_t[8U] = { {16U, {'U', 'S', ' '}}, {32U, {'C', 'A', ' '}}, {48U, {'E', 'U', ' '}}, {49U, {'E', 'S', ' '}}, {50U, {'F', 'R', ' '}}, {64U, {'J', 'P', ' '}}, {65U, {'J', 'P', ' '}}, {80U, {'C', 'N', ' '}}}; u8 *mwifiex_11d_code_2_region(u8 code ) { u8 i ; u8 size ; { size = 8U; i = 0U; goto ldv_54320; ldv_54319: ; if ((int )region_code_mapping_t[(int )i].code == (int )code) { return ((u8 *)(& region_code_mapping_t[(int )i].region)); } else { } i = (u8 )((int )i + 1); ldv_54320: ; if ((int )i < (int )size) { goto ldv_54319; } else { } return ((u8 *)0U); } } u32 mwifiex_index_to_acs_data_rate(struct mwifiex_private *priv , u8 index , u8 ht_info ) { u16 mcs_rate[4U][16U] ; u16 ac_mcs_rate_nss1[8U][10U] ; u16 ac_mcs_rate_nss2[8U][10U] ; u32 rate ; u8 mcs_index ; u8 bw ; u8 gi ; int _min1 ; int _min2 ; { mcs_rate[0][0] = 27U; mcs_rate[0][1] = 54U; mcs_rate[0][2] = 81U; mcs_rate[0][3] = 108U; mcs_rate[0][4] = 162U; mcs_rate[0][5] = 216U; mcs_rate[0][6] = 243U; mcs_rate[0][7] = 270U; mcs_rate[0][8] = 54U; mcs_rate[0][9] = 108U; mcs_rate[0][10] = 162U; mcs_rate[0][11] = 216U; mcs_rate[0][12] = 324U; mcs_rate[0][13] = 432U; mcs_rate[0][14] = 486U; mcs_rate[0][15] = 540U; mcs_rate[1][0] = 30U; mcs_rate[1][1] = 60U; mcs_rate[1][2] = 90U; mcs_rate[1][3] = 120U; mcs_rate[1][4] = 180U; mcs_rate[1][5] = 240U; mcs_rate[1][6] = 270U; mcs_rate[1][7] = 300U; mcs_rate[1][8] = 60U; mcs_rate[1][9] = 120U; mcs_rate[1][10] = 180U; mcs_rate[1][11] = 240U; mcs_rate[1][12] = 360U; mcs_rate[1][13] = 480U; mcs_rate[1][14] = 540U; mcs_rate[1][15] = 600U; mcs_rate[2][0] = 13U; mcs_rate[2][1] = 26U; mcs_rate[2][2] = 39U; mcs_rate[2][3] = 52U; mcs_rate[2][4] = 78U; mcs_rate[2][5] = 104U; mcs_rate[2][6] = 117U; mcs_rate[2][7] = 130U; mcs_rate[2][8] = 26U; mcs_rate[2][9] = 52U; mcs_rate[2][10] = 78U; mcs_rate[2][11] = 104U; mcs_rate[2][12] = 156U; mcs_rate[2][13] = 208U; mcs_rate[2][14] = 234U; mcs_rate[2][15] = 260U; mcs_rate[3][0] = 14U; mcs_rate[3][1] = 28U; mcs_rate[3][2] = 43U; mcs_rate[3][3] = 57U; mcs_rate[3][4] = 86U; mcs_rate[3][5] = 115U; mcs_rate[3][6] = 130U; mcs_rate[3][7] = 144U; mcs_rate[3][8] = 28U; mcs_rate[3][9] = 57U; mcs_rate[3][10] = 86U; mcs_rate[3][11] = 115U; mcs_rate[3][12] = 173U; mcs_rate[3][13] = 231U; mcs_rate[3][14] = 260U; mcs_rate[3][15] = 288U; ac_mcs_rate_nss1[0][0] = 117U; ac_mcs_rate_nss1[0][1] = 234U; ac_mcs_rate_nss1[0][2] = 351U; ac_mcs_rate_nss1[0][3] = 468U; ac_mcs_rate_nss1[0][4] = 702U; ac_mcs_rate_nss1[0][5] = 936U; ac_mcs_rate_nss1[0][6] = 1053U; ac_mcs_rate_nss1[0][7] = 1170U; ac_mcs_rate_nss1[0][8] = 1404U; ac_mcs_rate_nss1[0][9] = 1560U; ac_mcs_rate_nss1[1][0] = 130U; ac_mcs_rate_nss1[1][1] = 260U; ac_mcs_rate_nss1[1][2] = 390U; ac_mcs_rate_nss1[1][3] = 520U; ac_mcs_rate_nss1[1][4] = 780U; ac_mcs_rate_nss1[1][5] = 1040U; ac_mcs_rate_nss1[1][6] = 1170U; ac_mcs_rate_nss1[1][7] = 1300U; ac_mcs_rate_nss1[1][8] = 1560U; ac_mcs_rate_nss1[1][9] = 1734U; ac_mcs_rate_nss1[2][0] = 59U; ac_mcs_rate_nss1[2][1] = 117U; ac_mcs_rate_nss1[2][2] = 176U; ac_mcs_rate_nss1[2][3] = 234U; ac_mcs_rate_nss1[2][4] = 351U; ac_mcs_rate_nss1[2][5] = 468U; ac_mcs_rate_nss1[2][6] = 527U; ac_mcs_rate_nss1[2][7] = 585U; ac_mcs_rate_nss1[2][8] = 702U; ac_mcs_rate_nss1[2][9] = 780U; ac_mcs_rate_nss1[3][0] = 65U; ac_mcs_rate_nss1[3][1] = 130U; ac_mcs_rate_nss1[3][2] = 195U; ac_mcs_rate_nss1[3][3] = 260U; ac_mcs_rate_nss1[3][4] = 390U; ac_mcs_rate_nss1[3][5] = 520U; ac_mcs_rate_nss1[3][6] = 585U; ac_mcs_rate_nss1[3][7] = 650U; ac_mcs_rate_nss1[3][8] = 780U; ac_mcs_rate_nss1[3][9] = 867U; ac_mcs_rate_nss1[4][0] = 27U; ac_mcs_rate_nss1[4][1] = 54U; ac_mcs_rate_nss1[4][2] = 81U; ac_mcs_rate_nss1[4][3] = 108U; ac_mcs_rate_nss1[4][4] = 162U; ac_mcs_rate_nss1[4][5] = 216U; ac_mcs_rate_nss1[4][6] = 243U; ac_mcs_rate_nss1[4][7] = 270U; ac_mcs_rate_nss1[4][8] = 324U; ac_mcs_rate_nss1[4][9] = 360U; ac_mcs_rate_nss1[5][0] = 30U; ac_mcs_rate_nss1[5][1] = 60U; ac_mcs_rate_nss1[5][2] = 90U; ac_mcs_rate_nss1[5][3] = 120U; ac_mcs_rate_nss1[5][4] = 180U; ac_mcs_rate_nss1[5][5] = 240U; ac_mcs_rate_nss1[5][6] = 270U; ac_mcs_rate_nss1[5][7] = 300U; ac_mcs_rate_nss1[5][8] = 360U; ac_mcs_rate_nss1[5][9] = 400U; ac_mcs_rate_nss1[6][0] = 13U; ac_mcs_rate_nss1[6][1] = 26U; ac_mcs_rate_nss1[6][2] = 39U; ac_mcs_rate_nss1[6][3] = 52U; ac_mcs_rate_nss1[6][4] = 78U; ac_mcs_rate_nss1[6][5] = 104U; ac_mcs_rate_nss1[6][6] = 117U; ac_mcs_rate_nss1[6][7] = 130U; ac_mcs_rate_nss1[6][8] = 156U; ac_mcs_rate_nss1[6][9] = 0U; ac_mcs_rate_nss1[7][0] = 15U; ac_mcs_rate_nss1[7][1] = 29U; ac_mcs_rate_nss1[7][2] = 44U; ac_mcs_rate_nss1[7][3] = 58U; ac_mcs_rate_nss1[7][4] = 87U; ac_mcs_rate_nss1[7][5] = 116U; ac_mcs_rate_nss1[7][6] = 130U; ac_mcs_rate_nss1[7][7] = 145U; ac_mcs_rate_nss1[7][8] = 174U; ac_mcs_rate_nss1[7][9] = 0U; ac_mcs_rate_nss2[0][0] = 234U; ac_mcs_rate_nss2[0][1] = 468U; ac_mcs_rate_nss2[0][2] = 702U; ac_mcs_rate_nss2[0][3] = 936U; ac_mcs_rate_nss2[0][4] = 1404U; ac_mcs_rate_nss2[0][5] = 1872U; ac_mcs_rate_nss2[0][6] = 2106U; ac_mcs_rate_nss2[0][7] = 2340U; ac_mcs_rate_nss2[0][8] = 2808U; ac_mcs_rate_nss2[0][9] = 3120U; ac_mcs_rate_nss2[1][0] = 260U; ac_mcs_rate_nss2[1][1] = 520U; ac_mcs_rate_nss2[1][2] = 780U; ac_mcs_rate_nss2[1][3] = 1040U; ac_mcs_rate_nss2[1][4] = 1560U; ac_mcs_rate_nss2[1][5] = 2080U; ac_mcs_rate_nss2[1][6] = 2340U; ac_mcs_rate_nss2[1][7] = 2600U; ac_mcs_rate_nss2[1][8] = 3120U; ac_mcs_rate_nss2[1][9] = 3467U; ac_mcs_rate_nss2[2][0] = 117U; ac_mcs_rate_nss2[2][1] = 234U; ac_mcs_rate_nss2[2][2] = 351U; ac_mcs_rate_nss2[2][3] = 468U; ac_mcs_rate_nss2[2][4] = 702U; ac_mcs_rate_nss2[2][5] = 936U; ac_mcs_rate_nss2[2][6] = 1053U; ac_mcs_rate_nss2[2][7] = 1170U; ac_mcs_rate_nss2[2][8] = 1404U; ac_mcs_rate_nss2[2][9] = 1560U; ac_mcs_rate_nss2[3][0] = 130U; ac_mcs_rate_nss2[3][1] = 260U; ac_mcs_rate_nss2[3][2] = 390U; ac_mcs_rate_nss2[3][3] = 520U; ac_mcs_rate_nss2[3][4] = 780U; ac_mcs_rate_nss2[3][5] = 1040U; ac_mcs_rate_nss2[3][6] = 1170U; ac_mcs_rate_nss2[3][7] = 1300U; ac_mcs_rate_nss2[3][8] = 1560U; ac_mcs_rate_nss2[3][9] = 1734U; ac_mcs_rate_nss2[4][0] = 54U; ac_mcs_rate_nss2[4][1] = 108U; ac_mcs_rate_nss2[4][2] = 162U; ac_mcs_rate_nss2[4][3] = 216U; ac_mcs_rate_nss2[4][4] = 324U; ac_mcs_rate_nss2[4][5] = 432U; ac_mcs_rate_nss2[4][6] = 486U; ac_mcs_rate_nss2[4][7] = 540U; ac_mcs_rate_nss2[4][8] = 648U; ac_mcs_rate_nss2[4][9] = 720U; ac_mcs_rate_nss2[5][0] = 60U; ac_mcs_rate_nss2[5][1] = 120U; ac_mcs_rate_nss2[5][2] = 180U; ac_mcs_rate_nss2[5][3] = 240U; ac_mcs_rate_nss2[5][4] = 360U; ac_mcs_rate_nss2[5][5] = 480U; ac_mcs_rate_nss2[5][6] = 540U; ac_mcs_rate_nss2[5][7] = 600U; ac_mcs_rate_nss2[5][8] = 720U; ac_mcs_rate_nss2[5][9] = 800U; ac_mcs_rate_nss2[6][0] = 26U; ac_mcs_rate_nss2[6][1] = 52U; ac_mcs_rate_nss2[6][2] = 74U; ac_mcs_rate_nss2[6][3] = 104U; ac_mcs_rate_nss2[6][4] = 156U; ac_mcs_rate_nss2[6][5] = 208U; ac_mcs_rate_nss2[6][6] = 234U; ac_mcs_rate_nss2[6][7] = 260U; ac_mcs_rate_nss2[6][8] = 312U; ac_mcs_rate_nss2[6][9] = 0U; ac_mcs_rate_nss2[7][0] = 29U; ac_mcs_rate_nss2[7][1] = 58U; ac_mcs_rate_nss2[7][2] = 87U; ac_mcs_rate_nss2[7][3] = 116U; ac_mcs_rate_nss2[7][4] = 174U; ac_mcs_rate_nss2[7][5] = 230U; ac_mcs_rate_nss2[7][6] = 260U; ac_mcs_rate_nss2[7][7] = 289U; ac_mcs_rate_nss2[7][8] = 347U; ac_mcs_rate_nss2[7][9] = 0U; rate = 0U; mcs_index = 0U; bw = 0U; gi = 0U; if (((int )ht_info & 3) == 2) { _min1 = (int )index & 15; _min2 = 9; mcs_index = (u8 )(_min1 < _min2 ? _min1 : _min2); bw = (u8 )(((int )ht_info & 12) >> 2); gi = (u8 )(((int )ht_info & 16) >> 4); if ((unsigned int )((int )index >> 4) == 1U) { rate = (u32 )ac_mcs_rate_nss2[(3 - (int )bw) * 2 + (int )gi][(int )mcs_index]; } else { rate = (u32 )ac_mcs_rate_nss1[(3 - (int )bw) * 2 + (int )gi][(int )mcs_index]; } } else if (((int )ht_info & 3) == 1) { bw = (u8 )(((int )ht_info & 12) >> 2); gi = (u8 )(((int )ht_info & 16) >> 4); if ((unsigned int )index == 32U) { if ((unsigned int )gi == 1U) { rate = 13U; } else { rate = 12U; } } else if ((unsigned int )index <= 15U) { if ((unsigned int )bw <= 1U) { rate = (u32 )mcs_rate[((int )bw * -2 + 2) + (int )gi][(int )index]; } else { rate = (u32 )mwifiex_data_rates[0]; } } else { rate = (u32 )mwifiex_data_rates[0]; } } else { if ((unsigned int )index > 31U) { index = 0U; } else { } rate = (u32 )mwifiex_data_rates[(int )index]; } return (rate); } } u32 mwifiex_index_to_data_rate(struct mwifiex_private *priv , u8 index , u8 ht_info ) { u16 mcs_rate[4U][16U] ; u32 mcs_num_supp ; u32 rate ; u32 tmp ; { mcs_rate[0][0] = 27U; mcs_rate[0][1] = 54U; mcs_rate[0][2] = 81U; mcs_rate[0][3] = 108U; mcs_rate[0][4] = 162U; mcs_rate[0][5] = 216U; mcs_rate[0][6] = 243U; mcs_rate[0][7] = 270U; mcs_rate[0][8] = 54U; mcs_rate[0][9] = 108U; mcs_rate[0][10] = 162U; mcs_rate[0][11] = 216U; mcs_rate[0][12] = 324U; mcs_rate[0][13] = 432U; mcs_rate[0][14] = 486U; mcs_rate[0][15] = 540U; mcs_rate[1][0] = 30U; mcs_rate[1][1] = 60U; mcs_rate[1][2] = 90U; mcs_rate[1][3] = 120U; mcs_rate[1][4] = 180U; mcs_rate[1][5] = 240U; mcs_rate[1][6] = 270U; mcs_rate[1][7] = 300U; mcs_rate[1][8] = 60U; mcs_rate[1][9] = 120U; mcs_rate[1][10] = 180U; mcs_rate[1][11] = 240U; mcs_rate[1][12] = 360U; mcs_rate[1][13] = 480U; mcs_rate[1][14] = 540U; mcs_rate[1][15] = 600U; mcs_rate[2][0] = 13U; mcs_rate[2][1] = 26U; mcs_rate[2][2] = 39U; mcs_rate[2][3] = 52U; mcs_rate[2][4] = 78U; mcs_rate[2][5] = 104U; mcs_rate[2][6] = 117U; mcs_rate[2][7] = 130U; mcs_rate[2][8] = 26U; mcs_rate[2][9] = 52U; mcs_rate[2][10] = 78U; mcs_rate[2][11] = 104U; mcs_rate[2][12] = 156U; mcs_rate[2][13] = 208U; mcs_rate[2][14] = 234U; mcs_rate[2][15] = 260U; mcs_rate[3][0] = 14U; mcs_rate[3][1] = 28U; mcs_rate[3][2] = 43U; mcs_rate[3][3] = 57U; mcs_rate[3][4] = 86U; mcs_rate[3][5] = 115U; mcs_rate[3][6] = 130U; mcs_rate[3][7] = 144U; mcs_rate[3][8] = 28U; mcs_rate[3][9] = 57U; mcs_rate[3][10] = 86U; mcs_rate[3][11] = 115U; mcs_rate[3][12] = 173U; mcs_rate[3][13] = 231U; mcs_rate[3][14] = 260U; mcs_rate[3][15] = 288U; mcs_num_supp = (unsigned int )(priv->adapter)->hw_dev_mcs_support == 34U ? 16U : 8U; if ((priv->adapter)->is_hw_11ac_capable != 0U) { { tmp = mwifiex_index_to_acs_data_rate(priv, (int )index, (int )ht_info); } return (tmp); } else { } if ((int )ht_info & 1) { if ((unsigned int )index == 32U) { if (((unsigned long )ht_info & 4UL) != 0UL) { rate = 13U; } else { rate = 12U; } } else if ((u32 )index < mcs_num_supp) { if (((unsigned long )ht_info & 2UL) != 0UL) { if (((unsigned long )ht_info & 4UL) != 0UL) { rate = (u32 )mcs_rate[1][(int )index]; } else { rate = (u32 )mcs_rate[0][(int )index]; } } else if (((unsigned long )ht_info & 4UL) != 0UL) { rate = (u32 )mcs_rate[3][(int )index]; } else { rate = (u32 )mcs_rate[2][(int )index]; } } else { rate = (u32 )mwifiex_data_rates[0]; } } else { if ((unsigned int )index > 31U) { index = 0U; } else { } rate = (u32 )mwifiex_data_rates[(int )index]; } return (rate); } } u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv , u8 *rates ) { u32 tmp ; u32 tmp___0 ; { if ((unsigned int )priv->media_connected == 0U) { { tmp = mwifiex_get_supported_rates(priv, rates); } return (tmp); } else { { tmp___0 = mwifiex_copy_rates(rates, 0U, (u8 *)(& priv->curr_bss_params.data_rates), (int )priv->curr_bss_params.num_of_rates); } return (tmp___0); } } } struct mwifiex_chan_freq_power *mwifiex_get_cfp(struct mwifiex_private *priv , u8 band , u16 channel , u32 freq ) { struct mwifiex_chan_freq_power *cfp ; struct ieee80211_supported_band *sband ; struct ieee80211_channel *ch ; int i ; u8 tmp ; { cfp = (struct mwifiex_chan_freq_power *)0; ch = (struct ieee80211_channel *)0; if ((unsigned int )channel == 0U && freq == 0U) { return (cfp); } else { } { tmp = mwifiex_band_to_radio_type((int )band); } if ((unsigned int )tmp == 0U) { sband = ((priv->wdev)->wiphy)->bands[0]; } else { sband = ((priv->wdev)->wiphy)->bands[1]; } if ((unsigned long )sband == (unsigned long )((struct ieee80211_supported_band *)0)) { { dev_err((struct device const *)(priv->adapter)->dev, "%s: cannot find cfp by band %d\n", "mwifiex_get_cfp", (int )band); } return (cfp); } else { } i = 0; goto ldv_54363; ldv_54362: ch = sband->channels + (unsigned long )i; if ((int )ch->flags & 1) { goto ldv_54360; } else { } if (freq != 0U) { if ((u32 )ch->center_freq == freq) { goto ldv_54361; } else { } } else if ((int )ch->hw_value == (int )channel || (unsigned int )channel == 255U) { goto ldv_54361; } else { } ldv_54360: i = i + 1; ldv_54363: ; if (i < sband->n_channels) { goto ldv_54362; } else { } ldv_54361: ; if (i == sband->n_channels) { { dev_err((struct device const *)(priv->adapter)->dev, "%s: cannot find cfp by band %d & channel=%d freq=%d\n", "mwifiex_get_cfp", (int )band, (int )channel, freq); } } else { if ((unsigned long )ch == (unsigned long )((struct ieee80211_channel *)0)) { return (cfp); } else { } priv->cfp.channel = ch->hw_value; priv->cfp.freq = (u32 )ch->center_freq; priv->cfp.max_tx_power = (u16 )ch->max_power; cfp = & priv->cfp; } return (cfp); } } u8 mwifiex_is_rate_auto(struct mwifiex_private *priv ) { u32 i ; int rate_num ; { rate_num = 0; i = 0U; goto ldv_54372; ldv_54371: ; if ((unsigned int )priv->bitmap_rates[i] != 0U) { rate_num = rate_num + 1; } else { } i = i + 1U; ldv_54372: ; if (i <= 9U) { goto ldv_54371; } else { } if (rate_num > 1) { return (1U); } else { return (0U); } } } u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv , u8 *rates , u8 radio_type ) { struct wiphy *wiphy ; struct cfg80211_scan_request *request ; u32 num_rates ; u32 rate_mask ; struct ieee80211_supported_band *sband ; int i ; bool __warned ; int __ret_warn_once ; int __ret_warn_on ; long tmp ; long tmp___0 ; long tmp___1 ; long tmp___2 ; bool __warned___0 ; int __ret_warn_once___0 ; int __ret_warn_on___0 ; long tmp___3 ; long tmp___4 ; long tmp___5 ; long tmp___6 ; u32 tmp___7 ; { wiphy = (priv->adapter)->wiphy; request = priv->scan_request; if ((unsigned int )radio_type != 0U) { { sband = wiphy->bands[1]; __ret_warn_once = (unsigned long )sband == (unsigned long )((struct ieee80211_supported_band *)0); tmp___1 = ldv__builtin_expect(__ret_warn_once != 0, 0L); } if (tmp___1 != 0L) { { __ret_warn_on = ! __warned; tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); } if (tmp != 0L) { { warn_slowpath_null("drivers/net/wireless/mwifiex/cfp.c", 421); } } else { } { tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); } if (tmp___0 != 0L) { __warned = 1; } else { } } else { } { tmp___2 = ldv__builtin_expect(__ret_warn_once != 0, 0L); } if (tmp___2 != 0L) { return (0U); } else { } rate_mask = request->rates[1]; } else { { sband = wiphy->bands[0]; __ret_warn_once___0 = (unsigned long )sband == (unsigned long )((struct ieee80211_supported_band *)0); tmp___5 = ldv__builtin_expect(__ret_warn_once___0 != 0, 0L); } if (tmp___5 != 0L) { { __ret_warn_on___0 = ! __warned___0; tmp___3 = ldv__builtin_expect(__ret_warn_on___0 != 0, 0L); } if (tmp___3 != 0L) { { warn_slowpath_null("drivers/net/wireless/mwifiex/cfp.c", 426); } } else { } { tmp___4 = ldv__builtin_expect(__ret_warn_on___0 != 0, 0L); } if (tmp___4 != 0L) { __warned___0 = 1; } else { } } else { } { tmp___6 = ldv__builtin_expect(__ret_warn_once___0 != 0, 0L); } if (tmp___6 != 0L) { return (0U); } else { } rate_mask = request->rates[0]; } num_rates = 0U; i = 0; goto ldv_54397; ldv_54396: ; if ((((unsigned long )rate_mask >> i) & 1UL) == 0UL) { goto ldv_54395; } else { } tmp___7 = num_rates; num_rates = num_rates + 1U; *(rates + (unsigned long )tmp___7) = (unsigned char )((unsigned int )(sband->bitrates + (unsigned long )i)->bitrate / 5U); ldv_54395: i = i + 1; ldv_54397: ; if (i < sband->n_bitrates) { goto ldv_54396; } else { } return (num_rates); } } u32 mwifiex_get_supported_rates(struct mwifiex_private *priv , u8 *rates ) { u32 k ; struct mwifiex_adapter *adapter ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; struct _ddebug descriptor___4 ; long tmp___4 ; struct _ddebug descriptor___5 ; long tmp___5 ; struct _ddebug descriptor___6 ; long tmp___6 ; struct _ddebug descriptor___7 ; long tmp___7 ; struct _ddebug descriptor___8 ; long tmp___8 ; { k = 0U; adapter = priv->adapter; if (priv->bss_mode == 2U || priv->bss_mode == 8U) { { if ((int )adapter->config_bands == 1) { goto case_1; } else { } if ((int )adapter->config_bands == 2) { goto case_2; } else { } if ((int )adapter->config_bands == 10) { goto case_10; } else { } if ((int )adapter->config_bands == 42) { goto case_42; } else { } if ((int )adapter->config_bands == 3) { goto case_3; } else { } if ((int )adapter->config_bands == 7) { goto case_7; } else { } if ((int )adapter->config_bands == 5) { goto case_5; } else { } if ((int )adapter->config_bands == 31) { goto case_31; } else { } if ((int )adapter->config_bands == 95) { goto case_95; } else { } if ((int )adapter->config_bands == 127) { goto case_127; } else { } if ((int )adapter->config_bands == 11) { goto case_11; } else { } if ((int )adapter->config_bands == 43) { goto case_43; } else { } if ((int )adapter->config_bands == 4) { goto case_4; } else { } if ((int )adapter->config_bands == 6) { goto case_6; } else { } if ((int )adapter->config_bands == 16) { goto case_16; } else { } if ((int )adapter->config_bands == 20) { goto case_20; } else { } if ((int )adapter->config_bands == 84) { goto case_84; } else { } if ((int )adapter->config_bands == 30) { goto case_30; } else { } if ((int )adapter->config_bands == 94) { goto case_94; } else { } if ((int )adapter->config_bands == 8) { goto case_8; } else { } if ((int )adapter->config_bands == 40) { goto case_40; } else { } goto switch_break; case_1: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_get_supported_rates"; descriptor.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor.format = "info: infra band=%d supported_rates_b\n"; descriptor.lineno = 455U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_b\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_b), 5); } goto ldv_54408; case_2: /* CIL Label */ ; case_10: /* CIL Label */ ; case_42: /* CIL Label */ { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_get_supported_rates"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___0.format = "info: infra band=%d supported_rates_g\n"; descriptor___0.lineno = 463U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_g\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_g), 9); } goto ldv_54408; case_3: /* CIL Label */ ; case_7: /* CIL Label */ ; case_5: /* CIL Label */ ; case_31: /* CIL Label */ ; case_95: /* CIL Label */ ; case_127: /* CIL Label */ ; case_11: /* CIL Label */ ; case_43: /* CIL Label */ { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_get_supported_rates"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___1.format = "info: infra band=%d supported_rates_bg\n"; descriptor___1.lineno = 477U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_bg\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_bg), 13); } goto ldv_54408; case_4: /* CIL Label */ ; case_6: /* CIL Label */ { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_get_supported_rates"; descriptor___2.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___2.format = "info: infra band=%d supported_rates_a\n"; descriptor___2.lineno = 484U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_a\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_a), 9); } goto ldv_54408; case_16: /* CIL Label */ ; case_20: /* CIL Label */ ; case_84: /* CIL Label */ ; case_30: /* CIL Label */ ; case_94: /* CIL Label */ { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_get_supported_rates"; descriptor___3.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___3.format = "info: infra band=%d supported_rates_a\n"; descriptor___3.lineno = 494U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_a\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_a), 9); } goto ldv_54408; case_8: /* CIL Label */ ; case_40: /* CIL Label */ { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_get_supported_rates"; descriptor___4.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___4.format = "info: infra band=%d supported_rates_n\n"; descriptor___4.lineno = 501U; descriptor___4.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "info: infra band=%d supported_rates_n\n", (int )adapter->config_bands); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& supported_rates_n), 3); } goto ldv_54408; switch_break: /* CIL Label */ ; } ldv_54408: ; } else { { if ((int )adapter->adhoc_start_band == 1) { goto case_1___0; } else { } if ((int )adapter->adhoc_start_band == 2) { goto case_2___0; } else { } if ((int )adapter->adhoc_start_band == 10) { goto case_10___0; } else { } if ((int )adapter->adhoc_start_band == 3) { goto case_3___0; } else { } if ((int )adapter->adhoc_start_band == 11) { goto case_11___0; } else { } if ((int )adapter->adhoc_start_band == 4) { goto case_4___0; } else { } if ((int )adapter->adhoc_start_band == 20) { goto case_20___0; } else { } goto switch_break___0; case_1___0: /* CIL Label */ { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_get_supported_rates"; descriptor___5.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___5.format = "info: adhoc B\n"; descriptor___5.lineno = 510U; descriptor___5.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "info: adhoc B\n"); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& adhoc_rates_b), 5); } goto ldv_54436; case_2___0: /* CIL Label */ ; case_10___0: /* CIL Label */ { descriptor___6.modname = "mwifiex"; descriptor___6.function = "mwifiex_get_supported_rates"; descriptor___6.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___6.format = "info: adhoc G only\n"; descriptor___6.lineno = 516U; descriptor___6.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___6, (struct device const *)adapter->dev, "info: adhoc G only\n"); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& adhoc_rates_g), 9); } goto ldv_54436; case_3___0: /* CIL Label */ ; case_11___0: /* CIL Label */ { descriptor___7.modname = "mwifiex"; descriptor___7.function = "mwifiex_get_supported_rates"; descriptor___7.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___7.format = "info: adhoc BG\n"; descriptor___7.lineno = 522U; descriptor___7.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); } if (tmp___7 != 0L) { { __dynamic_dev_dbg(& descriptor___7, (struct device const *)adapter->dev, "info: adhoc BG\n"); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& adhoc_rates_bg), 13); } goto ldv_54436; case_4___0: /* CIL Label */ ; case_20___0: /* CIL Label */ { descriptor___8.modname = "mwifiex"; descriptor___8.function = "mwifiex_get_supported_rates"; descriptor___8.filename = "drivers/net/wireless/mwifiex/cfp.c"; descriptor___8.format = "info: adhoc A\n"; descriptor___8.lineno = 528U; descriptor___8.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); } if (tmp___8 != 0L) { { __dynamic_dev_dbg(& descriptor___8, (struct device const *)adapter->dev, "info: adhoc A\n"); } } else { } { k = mwifiex_copy_rates(rates, k, (u8 *)(& adhoc_rates_a), 9); } goto ldv_54436; switch_break___0: /* CIL Label */ ; } ldv_54436: ; } return (k); } } void ldv_atomic_dec(atomic_t *v ) ; __inline static void list_add(struct list_head *new , struct list_head *head ) { { { __list_add(new, head, head->next); } return; } } __inline static void atomic_inc(atomic_t *v ) ; __inline static void atomic_dec(atomic_t *v ) ; extern void __wake_up(wait_queue_head_t * , unsigned int , int , void * ) ; static int ldv_del_timer_20___0(struct timer_list *ldv_func_arg1 ) ; static int ldv_mod_timer_19___0(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *kmalloc_array(size_t n , size_t size , gfp_t flags ) { void *tmp ; { if (size != 0UL && n > 0xffffffffffffffffUL / size) { return ((void *)0); } else { } { tmp = __kmalloc(n * size, flags); } return (tmp); } } __inline static void *kcalloc(size_t n , size_t size , gfp_t flags ) { void *tmp ; { { tmp = kmalloc_array(n, size, flags | 32768U); } return (tmp); } } extern unsigned char *skb_push(struct sk_buff * , unsigned int ) ; extern unsigned char *skb_pull(struct sk_buff * , unsigned int ) ; extern void skb_trim(struct sk_buff * , unsigned int ) ; int mwifiex_complete_cmd(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) ; int mwifiex_send_cmd_async(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf ) ; void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter ) ; void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter , u8 *pbuf , u32 upld_len ) ; int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , uint16_t ps_bitmap , struct mwifiex_ds_auto_ds *auto_ds ) ; int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , struct mwifiex_ds_pm_cfg *pm_cfg ) ; int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf , void *cmd_buf ) ; int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv , unsigned short cmd_no , u16 cmd_action , u32 type , void *data_buf , void *cmd_buf ) ; int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv , u16 cmdresp_no , struct host_cmd_ds_command *resp ) ; int mwifiex_process_sta_event(struct mwifiex_private *priv ) ; int mwifiex_process_uap_event(struct mwifiex_private *priv ) ; void mwifiex_queue_scan_cmd(struct mwifiex_private *priv , struct cmd_ctrl_node *cmd_node ) ; int mwifiex_cmd_get_hw_spec(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd ) ; int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; __inline static struct mwifiex_private *mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter , u8 bss_num , u8 bss_type ) { int i ; { i = 0; goto ldv_54116; ldv_54115: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((int )(adapter->priv[i])->bss_num == (int )bss_num && (int )(adapter->priv[i])->bss_type == (int )bss_type) { goto ldv_54114; } else { } } else { } i = i + 1; ldv_54116: ; if (i < (int )adapter->priv_num) { goto ldv_54115; } else { } ldv_54114: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } __inline static struct mwifiex_private *mwifiex_get_priv___0(struct mwifiex_adapter *adapter , enum mwifiex_bss_role bss_role ) { int i ; { i = 0; goto ldv_54124; ldv_54123: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((unsigned int )bss_role == 255U || ((unsigned long )(adapter->priv[i])->bss_role & 1UL) == (unsigned long )bss_role) { goto ldv_54122; } else { } } else { } i = i + 1; ldv_54124: ; if (i < (int )adapter->priv_num) { goto ldv_54123; } else { } ldv_54122: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_queued ) ; void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter , u8 flags ) ; static void mwifiex_init_cmd_node(struct mwifiex_private *priv , struct cmd_ctrl_node *cmd_node , u32 cmd_oid , void *data_buf ) { { cmd_node->priv = priv; cmd_node->cmd_oid = cmd_oid; if ((unsigned int )(priv->adapter)->cmd_wait_q_required != 0U) { cmd_node->wait_q_enabled = (u32 )(priv->adapter)->cmd_wait_q_required; (priv->adapter)->cmd_wait_q_required = 0U; cmd_node->cmd_wait_q_woken = 0U; cmd_node->condition = & cmd_node->cmd_wait_q_woken; } else { } cmd_node->data_buf = data_buf; cmd_node->cmd_skb = cmd_node->skb; return; } } static struct cmd_ctrl_node *mwifiex_get_cmd_node(struct mwifiex_adapter *adapter ) { struct cmd_ctrl_node *cmd_node ; unsigned long flags ; raw_spinlock_t *tmp ; int tmp___0 ; struct list_head const *__mptr ; { { tmp = spinlock_check(& adapter->cmd_free_q_lock); flags = _raw_spin_lock_irqsave(tmp); tmp___0 = list_empty((struct list_head const *)(& adapter->cmd_free_q)); } if (tmp___0 != 0) { { dev_err((struct device const *)adapter->dev, "GET_CMD_NODE: cmd node not available\n"); spin_unlock_irqrestore(& adapter->cmd_free_q_lock, flags); } return ((struct cmd_ctrl_node *)0); } else { } { __mptr = (struct list_head const *)adapter->cmd_free_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->cmd_free_q_lock, flags); } return (cmd_node); } } static void mwifiex_clean_cmd_node(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) { { cmd_node->cmd_oid = 0U; cmd_node->cmd_flag = 0U; cmd_node->data_buf = (void *)0; cmd_node->wait_q_enabled = 0U; if ((unsigned long )cmd_node->cmd_skb != (unsigned long )((struct sk_buff *)0)) { { skb_trim(cmd_node->cmd_skb, 0U); } } else { } if ((unsigned long )cmd_node->resp_skb != (unsigned long )((struct sk_buff *)0)) { { (*(adapter->if_ops.cmdrsp_complete))(adapter, cmd_node->resp_skb); cmd_node->resp_skb = (struct sk_buff *)0; } } else { } return; } } static int mwifiex_cmd_host_cmd(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_ds_misc_cmd *pcmd_ptr ) { struct _ddebug descriptor ; long tmp ; { { memcpy((void *)cmd, (void const *)(& pcmd_ptr->cmd), (size_t )pcmd_ptr->len); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_host_cmd"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: host cmd size = %d\n"; descriptor.lineno = 120U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: host cmd size = %d\n", pcmd_ptr->len); } } else { } return (0); } } static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv , struct cmd_ctrl_node *cmd_node ) { struct mwifiex_adapter *adapter ; int ret ; struct host_cmd_ds_command *host_cmd ; uint16_t cmd_code ; uint16_t cmd_size ; struct timeval tstamp ; unsigned long flags ; __le32 tmp ; raw_spinlock_t *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; raw_spinlock_t *tmp___2 ; unsigned long tmp___3 ; { adapter = priv->adapter; if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0) || (unsigned long )cmd_node == (unsigned long )((struct cmd_ctrl_node *)0)) { return (-1); } else { } host_cmd = (struct host_cmd_ds_command *)(cmd_node->cmd_skb)->data; if ((unsigned long )host_cmd == (unsigned long )((struct host_cmd_ds_command *)0) || (unsigned int )host_cmd->size == 0U) { { dev_err((struct device const *)adapter->dev, "DNLD_CMD: host_cmd is null or cmd size is 0, not sending\n"); } if (cmd_node->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = -1; } else { } { mwifiex_recycle_cmd_node(adapter, cmd_node); } return (-1); } else { } cmd_code = host_cmd->command; cmd_size = host_cmd->size; if (((unsigned int )adapter->hw_status == 4U && (unsigned int )cmd_code != 170U) && (unsigned int )cmd_code != 169U) { { dev_err((struct device const *)adapter->dev, "DNLD_CMD: FW in reset state, ignore cmd %#x\n", (int )cmd_code); mwifiex_complete_cmd(adapter, cmd_node); mwifiex_recycle_cmd_node(adapter, cmd_node); } return (-1); } else { } { adapter->seq_num = (u16 )((int )adapter->seq_num + 1); host_cmd->seq_num = (unsigned short )((((int )adapter->seq_num & 255) | (((int )(cmd_node->priv)->bss_num & 15) << 8)) | (((int )(cmd_node->priv)->bss_type << 12) & 65535)); tmp___0 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___0); adapter->curr_cmd = cmd_node; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } if ((cmd_node->cmd_skb)->len > (unsigned int )cmd_size) { { skb_trim(cmd_node->cmd_skb, (unsigned int )cmd_size); } } else if ((cmd_node->cmd_skb)->len < (unsigned int )cmd_size) { { skb_put(cmd_node->cmd_skb, (unsigned int )cmd_size - (cmd_node->cmd_skb)->len); } } else { } { do_gettimeofday(& tstamp); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_dnld_cmd_to_fw"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: DNLD_CMD: (%lu.%lu): %#x, act %#x, len %d, seqno %#x\n"; descriptor.lineno = 205U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: DNLD_CMD: (%lu.%lu): %#x, act %#x, len %d, seqno %#x\n", tstamp.tv_sec, tstamp.tv_usec, (int )cmd_code, (int )*((__le16 *)host_cmd + 8U), (int )cmd_size, (int )host_cmd->seq_num); } } else { } if ((unsigned int )adapter->iface_type == 2U) { { tmp = 4027448014U; skb_push(cmd_node->cmd_skb, 4U); memcpy((void *)(cmd_node->cmd_skb)->data, (void const *)(& tmp), 4UL); adapter->cmd_sent = 1U; ret = (*(adapter->if_ops.host_to_card))(adapter, 1, cmd_node->cmd_skb, (struct mwifiex_tx_param *)0); skb_pull(cmd_node->cmd_skb, 4U); } if (ret == -16) { cmd_node->cmd_skb = (struct sk_buff *)0; } else { } } else { { skb_push(cmd_node->cmd_skb, 4U); ret = (*(adapter->if_ops.host_to_card))(adapter, 1, cmd_node->cmd_skb, (struct mwifiex_tx_param *)0); skb_pull(cmd_node->cmd_skb, 4U); } } if (ret == -1) { { dev_err((struct device const *)adapter->dev, "DNLD_CMD: host to card failed\n"); } if ((unsigned int )adapter->iface_type == 2U) { adapter->cmd_sent = 0U; } else { } if (cmd_node->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = -1; } else { } { mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); tmp___2 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___2); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); adapter->dbg.num_cmd_host_to_card_failure = adapter->dbg.num_cmd_host_to_card_failure + 1U; } return (-1); } else { } { adapter->dbg.last_cmd_index = (u16 )(((int )adapter->dbg.last_cmd_index + 1) % 5); adapter->dbg.last_cmd_id[(int )adapter->dbg.last_cmd_index] = cmd_code; adapter->dbg.last_cmd_act[(int )adapter->dbg.last_cmd_index] = *((__le16 *)host_cmd + 8U); cmd_code = (unsigned int )cmd_code & 4095U; tmp___3 = msecs_to_jiffies(10000U); ldv_mod_timer_19___0(& adapter->cmd_timer, (unsigned long )jiffies + tmp___3); } return (0); } } static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter ) { int ret ; struct mwifiex_private *priv ; struct mwifiex_opt_sleep_confirm *sleep_cfm_buf ; struct sk_buff *sleep_cfm_tmp ; __le32 tmp ; struct mwifiex_private *tmp___0 ; struct mwifiex_private *tmp___1 ; { { sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *)(adapter->sleep_cfm)->data; priv = mwifiex_get_priv___0(adapter, 255); sleep_cfm_buf->seq_num = (unsigned short )((((int )adapter->seq_num & 255) | (((int )priv->bss_num & 15) << 8)) | (((int )priv->bss_type << 12) & 65535)); adapter->seq_num = (u16 )((int )adapter->seq_num + 1); } if ((unsigned int )adapter->iface_type == 2U) { { sleep_cfm_tmp = dev_alloc_skb(16U); skb_put(sleep_cfm_tmp, 16U); tmp = 4027448014U; memcpy((void *)sleep_cfm_tmp->data, (void const *)(& tmp), 4UL); memcpy((void *)sleep_cfm_tmp->data + 4U, (void const *)(adapter->sleep_cfm)->data, 12UL); ret = (*(adapter->if_ops.host_to_card))(adapter, 1, sleep_cfm_tmp, (struct mwifiex_tx_param *)0); } if (ret != -16) { { dev_kfree_skb_any(sleep_cfm_tmp); } } else { } } else { { skb_push(adapter->sleep_cfm, 4U); ret = (*(adapter->if_ops.host_to_card))(adapter, 1, adapter->sleep_cfm, (struct mwifiex_tx_param *)0); skb_pull(adapter->sleep_cfm, 4U); } } if (ret == -1) { { dev_err((struct device const *)adapter->dev, "SLEEP_CFM: failed\n"); adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure = adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure + 1U; } return (-1); } else { } { tmp___1 = mwifiex_get_priv___0(adapter, 255); } if (((unsigned long )tmp___1->bss_role & 1UL) == 0UL) { if ((unsigned int )sleep_cfm_buf->resp_ctrl == 0U) { adapter->ps_state = 3U; } else { adapter->ps_state = 2U; } if ((unsigned int )sleep_cfm_buf->resp_ctrl == 0U && ((unsigned int )adapter->is_hs_configured != 0U && (unsigned int )adapter->sleep_period.period == 0U)) { { adapter->pm_wakeup_card_req = 1U; tmp___0 = mwifiex_get_priv___0(adapter, 0); mwifiex_hs_activated_event(tmp___0, 1); } } else { } } else { } return (ret); } } int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter ) { struct cmd_ctrl_node *cmd_array ; u32 i ; void *tmp ; { { tmp = kcalloc(20UL, 88UL, 208U); cmd_array = (struct cmd_ctrl_node *)tmp; } if ((unsigned long )cmd_array == (unsigned long )((struct cmd_ctrl_node *)0)) { return (-12); } else { } adapter->cmd_pool = cmd_array; i = 0U; goto ldv_54621; ldv_54620: { (cmd_array + (unsigned long )i)->skb = dev_alloc_skb(2048U); } if ((unsigned long )(cmd_array + (unsigned long )i)->skb == (unsigned long )((struct sk_buff *)0)) { { dev_err((struct device const *)adapter->dev, "ALLOC_CMD_BUF: out of memory\n"); } return (-1); } else { } i = i + 1U; ldv_54621: ; if (i <= 19U) { goto ldv_54620; } else { } i = 0U; goto ldv_54624; ldv_54623: { mwifiex_insert_cmd_to_free_q(adapter, cmd_array + (unsigned long )i); i = i + 1U; } ldv_54624: ; if (i <= 19U) { goto ldv_54623; } else { } return (0); } } int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter ) { struct cmd_ctrl_node *cmd_array ; u32 i ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { if ((unsigned long )adapter->cmd_pool == (unsigned long )((struct cmd_ctrl_node *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_free_cmd_buffer"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "info: FREE_CMD_BUF: cmd_pool is null\n"; descriptor.lineno = 387U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: FREE_CMD_BUF: cmd_pool is null\n"); } } else { } return (0); } else { } cmd_array = adapter->cmd_pool; i = 0U; goto ldv_54636; ldv_54635: ; if ((unsigned long )(cmd_array + (unsigned long )i)->skb != (unsigned long )((struct sk_buff *)0)) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_free_cmd_buffer"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "cmd: free cmd buffer %d\n"; descriptor___0.lineno = 396U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: free cmd buffer %d\n", i); } } else { } { dev_kfree_skb_any((cmd_array + (unsigned long )i)->skb); } } else { } if ((unsigned long )(cmd_array + (unsigned long )i)->resp_skb == (unsigned long )((struct sk_buff *)0)) { goto ldv_54634; } else { } if ((unsigned int )adapter->iface_type == 2U) { { (*(adapter->if_ops.cmdrsp_complete))(adapter, (cmd_array + (unsigned long )i)->resp_skb); } } else { { dev_kfree_skb_any((cmd_array + (unsigned long )i)->resp_skb); } } ldv_54634: i = i + 1U; ldv_54636: ; if (i <= 19U) { goto ldv_54635; } else { } if ((unsigned long )adapter->cmd_pool != (unsigned long )((struct cmd_ctrl_node *)0)) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_free_cmd_buffer"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___1.format = "cmd: free cmd pool\n"; descriptor___1.lineno = 410U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "cmd: free cmd pool\n"); } } else { } { kfree((void const *)adapter->cmd_pool); adapter->cmd_pool = (struct cmd_ctrl_node *)0; } } else { } return (0); } } int mwifiex_process_event(struct mwifiex_adapter *adapter ) { int ret ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct sk_buff *skb ; u32 eventcause ; struct timeval tstamp ; struct mwifiex_rxinfo *rx_info ; struct _ddebug descriptor ; long tmp___0 ; { { tmp = mwifiex_get_priv___0(adapter, 255); priv = tmp; skb = adapter->event_skb; eventcause = adapter->event_cause; adapter->dbg.last_event_index = (u16 )(((int )adapter->dbg.last_event_index + 1) % 5); adapter->dbg.last_event[(int )adapter->dbg.last_event_index] = (unsigned short )eventcause; priv = mwifiex_get_priv_by_id(adapter, (int )((u8 )(eventcause >> 16)) & 15, (int )((u8 )(eventcause >> 24))); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { priv = mwifiex_get_priv___0(adapter, 255); } } else { } eventcause = eventcause & 65535U; adapter->event_cause = eventcause; if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { { rx_info = MWIFIEX_SKB_RXCB(skb); rx_info->bss_num = priv->bss_num; rx_info->bss_type = priv->bss_type; } } else { } if (eventcause - 10U > 1U) { { do_gettimeofday(& tstamp); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_event"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "event: %lu.%lu: cause: %#x\n"; descriptor.lineno = 462U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "event: %lu.%lu: cause: %#x\n", tstamp.tv_sec, tstamp.tv_usec, eventcause); } } else { } } else { { priv = mwifiex_get_priv___0(adapter, 0); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { priv = mwifiex_get_priv___0(adapter, 255); } } else { } } if ((unsigned int )priv->bss_role == 1U) { { ret = mwifiex_process_uap_event(priv); } } else { { ret = mwifiex_process_sta_event(priv); } } { adapter->event_cause = 0U; adapter->event_skb = (struct sk_buff *)0; (*(adapter->if_ops.event_complete))(adapter, skb); } return (ret); } } int mwifiex_send_cmd_sync(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf ) { int ret ; struct mwifiex_adapter *adapter ; { { ret = 0; adapter = priv->adapter; adapter->cmd_wait_q_required = 1U; ret = mwifiex_send_cmd_async(priv, (int )cmd_no, (int )cmd_action, cmd_oid, data_buf); } return (ret); } } int mwifiex_send_cmd_async(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf ) { int ret ; struct mwifiex_adapter *adapter ; struct cmd_ctrl_node *cmd_node ; struct host_cmd_ds_command *cmd_ptr ; unsigned char *tmp ; { adapter = priv->adapter; if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { { printk("\vmwifiex: PREP_CMD: adapter is NULL\n"); } return (-1); } else { } if ((int )adapter->is_suspended) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: device in suspended state\n"); } return (-1); } else { } if ((int )adapter->surprise_removed) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: card is removed\n"); } return (-1); } else { } if ((unsigned int )adapter->hw_status == 4U) { if ((unsigned int )cmd_no != 169U) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: FW in reset state\n"); } return (-1); } else { } } else { } { cmd_node = mwifiex_get_cmd_node(adapter); } if ((unsigned long )cmd_node == (unsigned long )((struct cmd_ctrl_node *)0)) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: no free cmd node\n"); } return (-1); } else { } { mwifiex_init_cmd_node(priv, cmd_node, cmd_oid, data_buf); } if ((unsigned long )cmd_node->cmd_skb == (unsigned long )((struct sk_buff *)0)) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: no free cmd buf\n"); } return (-1); } else { } { tmp = skb_put(cmd_node->cmd_skb, 208U); memset((void *)tmp, 0, 208UL); cmd_ptr = (struct host_cmd_ds_command *)(cmd_node->cmd_skb)->data; cmd_ptr->command = cmd_no; cmd_ptr->result = 0U; } if ((unsigned int )cmd_no != 0U) { { if ((int )cmd_no == 176) { goto case_176; } else { } if ((int )cmd_no == 177) { goto case_177; } else { } if ((int )cmd_no == 178) { goto case_178; } else { } if ((int )cmd_no == 181) { goto case_181; } else { } goto switch_default; case_176: /* CIL Label */ ; case_177: /* CIL Label */ ; case_178: /* CIL Label */ ; case_181: /* CIL Label */ { ret = mwifiex_uap_prepare_cmd(priv, (int )cmd_no, (int )cmd_action, cmd_oid, data_buf, (void *)cmd_ptr); } goto ldv_54674; switch_default: /* CIL Label */ { ret = mwifiex_sta_prepare_cmd(priv, (int )cmd_no, (int )cmd_action, cmd_oid, data_buf, (void *)cmd_ptr); } goto ldv_54674; switch_break: /* CIL Label */ ; } ldv_54674: ; } else { { ret = mwifiex_cmd_host_cmd(priv, cmd_ptr, (struct mwifiex_ds_misc_cmd *)data_buf); cmd_node->cmd_flag = cmd_node->cmd_flag | 1U; } } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "PREP_CMD: cmd %#x preparation failed\n", (int )cmd_no); mwifiex_insert_cmd_to_free_q(adapter, cmd_node); } return (-1); } else { } if ((unsigned int )cmd_no == 6U) { { mwifiex_queue_scan_cmd(priv, cmd_node); } } else { { mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, 1U); queue_work(adapter->workqueue, & adapter->main_work); } if (cmd_node->wait_q_enabled != 0U) { { ret = mwifiex_wait_queue_complete(adapter, cmd_node); } } else { } } return (ret); } } void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) { unsigned long flags ; raw_spinlock_t *tmp ; { if ((unsigned long )cmd_node == (unsigned long )((struct cmd_ctrl_node *)0)) { return; } else { } if (cmd_node->wait_q_enabled != 0U) { { mwifiex_complete_cmd(adapter, cmd_node); } } else { } { mwifiex_clean_cmd_node(adapter, cmd_node); tmp = spinlock_check(& adapter->cmd_free_q_lock); flags = _raw_spin_lock_irqsave(tmp); list_add_tail(& cmd_node->list, & adapter->cmd_free_q); spin_unlock_irqrestore(& adapter->cmd_free_q_lock, flags); } return; } } void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) { struct host_cmd_ds_command *host_cmd ; struct _ddebug descriptor ; int tmp ; long tmp___0 ; { { host_cmd = (struct host_cmd_ds_command *)(cmd_node->cmd_skb)->data; mwifiex_insert_cmd_to_free_q(adapter, cmd_node); atomic_dec(& adapter->cmd_pending); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_recycle_cmd_node"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: FREE_CMD: cmd=%#x, cmd_pending=%d\n"; descriptor.lineno = 647U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { tmp = atomic_read((atomic_t const *)(& adapter->cmd_pending)); __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: FREE_CMD: cmd=%#x, cmd_pending=%d\n", (int )host_cmd->command, tmp); } } else { } return; } } void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node , u32 add_tail ) { struct host_cmd_ds_command *host_cmd ; u16 command ; unsigned long flags ; struct host_cmd_ds_802_11_ps_mode_enh *pm ; raw_spinlock_t *tmp ; struct _ddebug descriptor ; int tmp___0 ; long tmp___1 ; { host_cmd = (struct host_cmd_ds_command *)0; host_cmd = (struct host_cmd_ds_command *)(cmd_node->cmd_skb)->data; if ((unsigned long )host_cmd == (unsigned long )((struct host_cmd_ds_command *)0)) { { dev_err((struct device const *)adapter->dev, "QUEUE_CMD: host_cmd is NULL\n"); } return; } else { } command = host_cmd->command; if ((unsigned int )command == 228U) { pm = & host_cmd->params.psmode_enh; if ((unsigned int )pm->action == 2U || (unsigned int )pm->action == 254U) { if (adapter->ps_state != 0U) { add_tail = 0U; } else { } } else { } } else { } { tmp = spinlock_check(& adapter->cmd_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp); } if (add_tail != 0U) { { list_add_tail(& cmd_node->list, & adapter->cmd_pending_q); } } else { { list_add(& cmd_node->list, & adapter->cmd_pending_q); } } { spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, flags); atomic_inc(& adapter->cmd_pending); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_insert_cmd_to_pending_q"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n"; descriptor.lineno = 693U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { tmp___0 = atomic_read((atomic_t const *)(& adapter->cmd_pending)); __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n", (int )command, tmp___0); } } else { } return; } } int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter ) { struct mwifiex_private *priv ; struct cmd_ctrl_node *cmd_node ; int ret ; struct host_cmd_ds_command *host_cmd ; unsigned long cmd_flags ; unsigned long cmd_pending_q_flags ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; struct list_head const *__mptr ; raw_spinlock_t *tmp___2 ; { ret = 0; if ((unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0)) { { dev_err((struct device const *)adapter->dev, "EXEC_NEXT_CMD: cmd in processing\n"); } return (-1); } else { } { tmp = spinlock_check(& adapter->mwifiex_cmd_lock); cmd_flags = _raw_spin_lock_irqsave(tmp); tmp___0 = spinlock_check(& adapter->cmd_pending_q_lock); cmd_pending_q_flags = _raw_spin_lock_irqsave(tmp___0); tmp___1 = list_empty((struct list_head const *)(& adapter->cmd_pending_q)); } if (tmp___1 != 0) { { spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, cmd_pending_q_flags); spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, cmd_flags); } return (0); } else { } { __mptr = (struct list_head const *)adapter->cmd_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, cmd_pending_q_flags); host_cmd = (struct host_cmd_ds_command *)(cmd_node->cmd_skb)->data; priv = cmd_node->priv; } if (adapter->ps_state != 0U) { { dev_err((struct device const *)adapter->dev, "%s: cannot send cmd in sleep state, this should not happen\n", "mwifiex_exec_next_cmd"); spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, cmd_flags); } return (ret); } else { } { tmp___2 = spinlock_check(& adapter->cmd_pending_q_lock); cmd_pending_q_flags = _raw_spin_lock_irqsave(tmp___2); list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, cmd_pending_q_flags); spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, cmd_flags); ret = mwifiex_dnld_cmd_to_fw(priv, cmd_node); priv = mwifiex_get_priv___0(adapter, 255); } if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0) && (unsigned int )host_cmd->command != 229U) { if ((unsigned int )adapter->hs_activated != 0U) { { adapter->is_hs_configured = 0U; mwifiex_hs_activated_event(priv, 0); } } else { } } else { } return (ret); } } int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter ) { struct host_cmd_ds_command *resp ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int ret ; uint16_t orig_cmdresp_no ; uint16_t cmdresp_no ; uint16_t cmdresp_result ; struct timeval tstamp ; unsigned long flags ; raw_spinlock_t *tmp___0 ; struct mwifiex_ds_misc_cmd *hostcmd ; uint16_t size ; struct _ddebug descriptor ; long tmp___1 ; u16 __min1 ; u16 __min2 ; struct _ddebug descriptor___0 ; long tmp___2 ; raw_spinlock_t *tmp___3 ; raw_spinlock_t *tmp___4 ; { { tmp = mwifiex_get_priv___0(adapter, 255); priv = tmp; ret = 0; ldv_del_timer_20___0(& adapter->cmd_timer); } if ((unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0) || (unsigned long )(adapter->curr_cmd)->resp_skb == (unsigned long )((struct sk_buff *)0)) { { resp = (struct host_cmd_ds_command *)(& adapter->upld_buf); dev_err((struct device const *)adapter->dev, "CMD_RESP: NULL curr_cmd, %#x\n", (int )resp->command); } return (-1); } else { } adapter->num_cmd_timeout = 0U; resp = (struct host_cmd_ds_command *)((adapter->curr_cmd)->resp_skb)->data; if (((adapter->curr_cmd)->cmd_flag & 2U) != 0U) { { dev_err((struct device const *)adapter->dev, "CMD_RESP: %#x been canceled\n", (int )resp->command); mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); tmp___0 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___0); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } return (-1); } else { } if ((int )(adapter->curr_cmd)->cmd_flag & 1) { { size = resp->size; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_cmdresp"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "info: host cmd resp size = %d\n"; descriptor.lineno = 814U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: host cmd resp size = %d\n", (int )size); } } else { } __min1 = size; __min2 = 2048U; size = (uint16_t )((int )__min1 < (int )__min2 ? __min1 : __min2); if ((unsigned long )(adapter->curr_cmd)->data_buf != (unsigned long )((void *)0)) { { hostcmd = (struct mwifiex_ds_misc_cmd *)(adapter->curr_cmd)->data_buf; hostcmd->len = (u32 )size; memcpy((void *)(& hostcmd->cmd), (void const *)resp, (size_t )size); } } else { } } else { } { orig_cmdresp_no = resp->command; priv = mwifiex_get_priv_by_id(adapter, (int )((u8 )(((int )resp->seq_num & 3840) >> 8)), (int )((u8 )((int )resp->seq_num >> 12))); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { priv = mwifiex_get_priv___0(adapter, 255); } } else { } { resp->command = (unsigned int )orig_cmdresp_no & 4095U; cmdresp_no = resp->command; cmdresp_result = resp->result; adapter->dbg.last_cmd_resp_index = (u16 )(((int )adapter->dbg.last_cmd_resp_index + 1) % 5); adapter->dbg.last_cmd_resp_id[(int )adapter->dbg.last_cmd_resp_index] = orig_cmdresp_no; do_gettimeofday(& tstamp); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_process_cmdresp"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "cmd: CMD_RESP: (%lu.%lu): 0x%x, result %d, len %d, seqno 0x%x\n"; descriptor___0.lineno = 846U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: CMD_RESP: (%lu.%lu): 0x%x, result %d, len %d, seqno 0x%x\n", tstamp.tv_sec, tstamp.tv_usec, (int )orig_cmdresp_no, (int )cmdresp_result, (int )resp->size, (int )resp->seq_num); } } else { } if ((int )((short )orig_cmdresp_no) >= 0) { { dev_err((struct device const *)adapter->dev, "CMD_RESP: invalid cmd resp\n"); } if ((adapter->curr_cmd)->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = -1; } else { } { mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); tmp___3 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___3); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } return (-1); } else { } if ((int )(adapter->curr_cmd)->cmd_flag & 1) { (adapter->curr_cmd)->cmd_flag = (adapter->curr_cmd)->cmd_flag & 4294967294U; if ((unsigned int )cmdresp_result == 0U && (unsigned int )cmdresp_no == 229U) { { ret = mwifiex_ret_802_11_hs_cfg(priv, resp); } } else { } } else { { ret = mwifiex_process_sta_cmdresp(priv, (int )cmdresp_no, resp); } } if ((unsigned int )adapter->hw_status == 1U) { if (ret != 0) { { dev_err((struct device const *)adapter->dev, "%s: cmd %#x failed during initialization\n", "mwifiex_process_cmdresp", (int )cmdresp_no); mwifiex_init_fw_complete(adapter); } return (-1); } else if ((int )adapter->last_init_cmd == (int )cmdresp_no) { adapter->hw_status = 3; } else { } } else { } if ((unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0)) { if ((adapter->curr_cmd)->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = ret; } else { } { mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); tmp___4 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___4); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } } else { } return (ret); } } void mwifiex_cmd_timeout_func(unsigned long function_context ) { struct mwifiex_adapter *adapter ; struct cmd_ctrl_node *cmd_node ; struct timeval tstamp ; struct _ddebug descriptor ; long tmp ; { adapter = (struct mwifiex_adapter *)function_context; adapter->num_cmd_timeout = adapter->num_cmd_timeout + 1U; adapter->dbg.num_cmd_timeout = adapter->dbg.num_cmd_timeout + 1U; if ((unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_timeout_func"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: empty curr_cmd\n"; descriptor.lineno = 911U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: empty curr_cmd\n"); } } else { } return; } else { } cmd_node = adapter->curr_cmd; if ((unsigned long )cmd_node != (unsigned long )((struct cmd_ctrl_node *)0)) { { adapter->dbg.timeout_cmd_id = adapter->dbg.last_cmd_id[(int )adapter->dbg.last_cmd_index]; adapter->dbg.timeout_cmd_act = adapter->dbg.last_cmd_act[(int )adapter->dbg.last_cmd_index]; do_gettimeofday(& tstamp); dev_err((struct device const *)adapter->dev, "%s: Timeout cmd id (%lu.%lu) = %#x, act = %#x\n", "mwifiex_cmd_timeout_func", tstamp.tv_sec, tstamp.tv_usec, (int )adapter->dbg.timeout_cmd_id, (int )adapter->dbg.timeout_cmd_act); dev_err((struct device const *)adapter->dev, "num_data_h2c_failure = %d\n", adapter->dbg.num_tx_host_to_card_failure); dev_err((struct device const *)adapter->dev, "num_cmd_h2c_failure = %d\n", adapter->dbg.num_cmd_host_to_card_failure); dev_err((struct device const *)adapter->dev, "num_cmd_timeout = %d\n", adapter->dbg.num_cmd_timeout); dev_err((struct device const *)adapter->dev, "num_tx_timeout = %d\n", adapter->dbg.num_tx_timeout); dev_err((struct device const *)adapter->dev, "last_cmd_index = %d\n", (int )adapter->dbg.last_cmd_index); dev_err((struct device const *)adapter->dev, "last_cmd_id: %*ph\n", 10, (u16 *)(& adapter->dbg.last_cmd_id)); dev_err((struct device const *)adapter->dev, "last_cmd_act: %*ph\n", 10, (u16 *)(& adapter->dbg.last_cmd_act)); dev_err((struct device const *)adapter->dev, "last_cmd_resp_index = %d\n", (int )adapter->dbg.last_cmd_resp_index); dev_err((struct device const *)adapter->dev, "last_cmd_resp_id: %*ph\n", 10, (u16 *)(& adapter->dbg.last_cmd_resp_id)); dev_err((struct device const *)adapter->dev, "last_event_index = %d\n", (int )adapter->dbg.last_event_index); dev_err((struct device const *)adapter->dev, "last_event: %*ph\n", 10, (u16 *)(& adapter->dbg.last_event)); dev_err((struct device const *)adapter->dev, "data_sent=%d cmd_sent=%d\n", (int )adapter->data_sent, (int )adapter->cmd_sent); dev_err((struct device const *)adapter->dev, "ps_mode=%d ps_state=%d\n", (int )adapter->ps_mode, adapter->ps_state); } if (cmd_node->wait_q_enabled != 0U) { { adapter->cmd_wait_q.status = -110; __wake_up(& adapter->cmd_wait_q.wait, 1U, 1, (void *)0); mwifiex_cancel_pending_ioctl(adapter); adapter->cmd_sent = 0U; } } else { } } else { } if ((unsigned int )adapter->hw_status == 1U) { { mwifiex_init_fw_complete(adapter); } } else { } if ((unsigned long )adapter->if_ops.card_reset != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.card_reset))(adapter); } } else { } return; } } void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter ) { struct cmd_ctrl_node *cmd_node ; struct cmd_ctrl_node *tmp_node ; unsigned long flags ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___1 ; struct list_head const *__mptr___1 ; raw_spinlock_t *tmp___2 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; raw_spinlock_t *tmp___3 ; struct list_head const *__mptr___4 ; raw_spinlock_t *tmp___4 ; { cmd_node = (struct cmd_ctrl_node *)0; if ((unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0) && (adapter->curr_cmd)->wait_q_enabled != 0U) { { tmp = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp); (adapter->curr_cmd)->wait_q_enabled = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); adapter->cmd_wait_q.status = -1; mwifiex_complete_cmd(adapter, adapter->curr_cmd); } } else { } { tmp___0 = spinlock_check(& adapter->cmd_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)adapter->cmd_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; __mptr___0 = (struct list_head const *)cmd_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___0; } goto ldv_54784; ldv_54783: { list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, flags); } if (cmd_node->wait_q_enabled != 0U) { { adapter->cmd_wait_q.status = -1; mwifiex_complete_cmd(adapter, cmd_node); cmd_node->wait_q_enabled = 0U; } } else { } { mwifiex_recycle_cmd_node(adapter, cmd_node); tmp___1 = spinlock_check(& adapter->cmd_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___1); cmd_node = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___1; } ldv_54784: ; if ((unsigned long )(& cmd_node->list) != (unsigned long )(& adapter->cmd_pending_q)) { goto ldv_54783; } else { } { spin_unlock_irqrestore(& adapter->cmd_pending_q_lock, flags); tmp___2 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___2); __mptr___2 = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr___2; __mptr___3 = (struct list_head const *)cmd_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___3; } goto ldv_54799; ldv_54798: { list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); cmd_node->wait_q_enabled = 0U; mwifiex_insert_cmd_to_free_q(adapter, cmd_node); tmp___3 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___3); cmd_node = tmp_node; __mptr___4 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___4; } ldv_54799: ; if ((unsigned long )(& cmd_node->list) != (unsigned long )(& adapter->scan_pending_q)) { goto ldv_54798; } else { } { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); tmp___4 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___4); adapter->scan_processing = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } return; } } void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter ) { struct cmd_ctrl_node *cmd_node ; struct cmd_ctrl_node *tmp_node ; unsigned long cmd_flags ; unsigned long scan_pending_q_flags ; bool cancel_scan_cmd ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___1 ; struct list_head const *__mptr___1 ; raw_spinlock_t *tmp___2 ; { cmd_node = (struct cmd_ctrl_node *)0; tmp_node = (struct cmd_ctrl_node *)0; cancel_scan_cmd = 0; if ((unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0) && (adapter->curr_cmd)->wait_q_enabled != 0U) { { tmp = spinlock_check(& adapter->mwifiex_cmd_lock); cmd_flags = _raw_spin_lock_irqsave(tmp); cmd_node = adapter->curr_cmd; cmd_node->wait_q_enabled = 0U; cmd_node->cmd_flag = cmd_node->cmd_flag | 2U; mwifiex_recycle_cmd_node(adapter, cmd_node); mwifiex_complete_cmd(adapter, adapter->curr_cmd); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, cmd_flags); } } else { } { tmp___0 = spinlock_check(& adapter->scan_pending_q_lock); scan_pending_q_flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; __mptr___0 = (struct list_head const *)cmd_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___0; } goto ldv_54828; ldv_54827: { list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, scan_pending_q_flags); cmd_node->wait_q_enabled = 0U; mwifiex_insert_cmd_to_free_q(adapter, cmd_node); tmp___1 = spinlock_check(& adapter->scan_pending_q_lock); scan_pending_q_flags = _raw_spin_lock_irqsave(tmp___1); cancel_scan_cmd = 1; cmd_node = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___1; } ldv_54828: ; if ((unsigned long )(& cmd_node->list) != (unsigned long )(& adapter->scan_pending_q)) { goto ldv_54827; } else { } { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, scan_pending_q_flags); } if ((int )cancel_scan_cmd) { { tmp___2 = spinlock_check(& adapter->mwifiex_cmd_lock); cmd_flags = _raw_spin_lock_irqsave(tmp___2); adapter->scan_processing = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, cmd_flags); } } else { } adapter->cmd_wait_q.status = -1; return; } } void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter ) { struct _ddebug descriptor ; char *tmp___0 ; int tmp___1 ; long tmp___2 ; int tmp___3 ; { if ((unsigned int )adapter->cmd_sent == 0U && (unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { if ((unsigned int )*((unsigned short *)adapter + 1673UL) == 0U && ((unsigned int )adapter->iface_type == 2U || (unsigned int )adapter->data_received == 0U)) { if ((unsigned int )adapter->iface_type != 2U) { { mwifiex_dnld_sleep_confirm_cmd(adapter); } } else { { tmp___3 = skb_queue_empty((struct sk_buff_head const *)(& adapter->usb_rx_data_q)); } if (tmp___3 != 0) { { mwifiex_dnld_sleep_confirm_cmd(adapter); } } else { goto _L; } } } else { goto _L; } } else { _L: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_check_ps_cond"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: Delay Sleep Confirm (%s%s%s)\n"; descriptor.lineno = 1110U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___2 != 0L) { if ((unsigned int )*((unsigned short *)adapter + 1673UL) != 0U || ((unsigned int )adapter->iface_type != 2U && (unsigned int )adapter->data_received != 0U)) { tmp___0 = (char *)"R"; } else if ((unsigned int )adapter->iface_type == 2U) { { tmp___1 = skb_queue_empty((struct sk_buff_head const *)(& adapter->usb_rx_data_q)); } if (tmp___1 == 0) { tmp___0 = (char *)"R"; } else { tmp___0 = (char *)""; } } else { tmp___0 = (char *)""; } { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: Delay Sleep Confirm (%s%s%s)\n", (unsigned int )adapter->cmd_sent != 0U ? (char *)"D" : (char *)"", (unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0) ? (char *)"C" : (char *)"", tmp___0); } } else { } } return; } } void mwifiex_hs_activated_event(struct mwifiex_private *priv , u8 activated ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { if ((unsigned int )activated != 0U) { if ((unsigned int )(priv->adapter)->is_hs_configured != 0U) { { (priv->adapter)->hs_activated = 1U; mwifiex_update_rxreor_flags(priv->adapter, 1); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_hs_activated_event"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "event: hs_activated\n"; descriptor.lineno = 1126U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "event: hs_activated\n"); } } else { } { (priv->adapter)->hs_activate_wait_q_woken = 1U; __wake_up(& (priv->adapter)->hs_activate_wait_q, 1U, 1, (void *)0); } } else { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_hs_activated_event"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "event: HS not configured\n"; descriptor___0.lineno = 1131U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "event: HS not configured\n"); } } else { } } } else { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_hs_activated_event"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___1.format = "event: hs_deactivated\n"; descriptor___1.lineno = 1134U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "event: hs_deactivated\n"); } } else { } (priv->adapter)->hs_activated = 0U; } return; } } int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_hs_cfg_enh *phs_cfg ; uint32_t conditions ; struct _ddebug descriptor ; long tmp ; { adapter = priv->adapter; phs_cfg = & resp->params.opt_hs_cfg; conditions = phs_cfg->params.hs_config.conditions; if ((unsigned int )phs_cfg->action == 2U && (unsigned int )adapter->iface_type != 2U) { { mwifiex_hs_activated_event(priv, 1); } return (0); } else { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_hs_cfg"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: CMD_RESP: HS_CFG cmd reply result=%#x, conditions=0x%x gpio=0x%x gap=0x%x\n"; descriptor.lineno = 1166U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: CMD_RESP: HS_CFG cmd reply result=%#x, conditions=0x%x gpio=0x%x gap=0x%x\n", (int )resp->result, conditions, (int )phs_cfg->params.hs_config.gpio, (int )phs_cfg->params.hs_config.gap); } } else { } } if (conditions != 4294967295U) { adapter->is_hs_configured = 1U; if ((unsigned int )adapter->iface_type == 2U) { { mwifiex_hs_activated_event(priv, 1); } } else { } } else { adapter->is_hs_configured = 0U; if ((unsigned int )adapter->hs_activated != 0U) { { mwifiex_hs_activated_event(priv, 0); } } else { } } return (0); } } void mwifiex_process_hs_config(struct mwifiex_adapter *adapter ) { struct _ddebug descriptor ; long tmp ; struct mwifiex_private *tmp___0 ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_hs_config"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "info: %s: auto cancelling host sleep since there is interrupt from the firmware\n"; descriptor.lineno = 1189U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: %s: auto cancelling host sleep since there is interrupt from the firmware\n", "mwifiex_process_hs_config"); } } else { } { (*(adapter->if_ops.wakeup))(adapter); adapter->hs_activated = 0U; adapter->is_hs_configured = 0U; adapter->is_suspended = 0; tmp___0 = mwifiex_get_priv___0(adapter, 255); mwifiex_hs_activated_event(tmp___0, 0); } return; } } static char const __kstrtab_mwifiex_process_hs_config[26U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'h', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_process_hs_config ; struct kernel_symbol const __ksymtab_mwifiex_process_hs_config = {(unsigned long )(& mwifiex_process_hs_config), (char const *)(& __kstrtab_mwifiex_process_hs_config)}; void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter , u8 *pbuf , u32 upld_len ) { struct host_cmd_ds_command *cmd ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; uint16_t result ; uint16_t command ; uint16_t seq_num ; struct mwifiex_private *tmp___0 ; { { cmd = (struct host_cmd_ds_command *)pbuf; tmp = mwifiex_get_priv___0(adapter, 255); priv = tmp; result = cmd->result; command = cmd->command; seq_num = cmd->seq_num; } if (upld_len == 0U) { { dev_err((struct device const *)adapter->dev, "%s: cmd size is 0\n", "mwifiex_process_sleep_confirm_resp"); } return; } else { } { priv = mwifiex_get_priv_by_id(adapter, (int )((u8 )(((int )seq_num & 3840) >> 8)), (int )((u8 )((int )seq_num >> 12))); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { priv = mwifiex_get_priv___0(adapter, 255); } } else { } seq_num = (unsigned int )seq_num & 255U; command = (unsigned int )command & 4095U; if ((unsigned int )command != 228U) { { dev_err((struct device const *)adapter->dev, "%s: rcvd unexpected resp for cmd %#x, result = %x\n", "mwifiex_process_sleep_confirm_resp", (int )command, (int )result); } return; } else { } if ((unsigned int )result != 0U) { { dev_err((struct device const *)adapter->dev, "%s: sleep confirm cmd failed\n", "mwifiex_process_sleep_confirm_resp"); adapter->pm_wakeup_card_req = 0U; adapter->ps_state = 0U; } return; } else { } adapter->pm_wakeup_card_req = 1U; if ((unsigned int )adapter->is_hs_configured != 0U) { { tmp___0 = mwifiex_get_priv___0(adapter, 255); mwifiex_hs_activated_event(tmp___0, 1); } } else { } adapter->ps_state = 3U; cmd->command = command; cmd->seq_num = seq_num; return; } } static char const __kstrtab_mwifiex_process_sleep_confirm_resp[35U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'l', 'e', 'e', 'p', '_', 'c', 'o', 'n', 'f', 'i', 'r', 'm', '_', 'r', 'e', 's', 'p', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_process_sleep_confirm_resp ; struct kernel_symbol const __ksymtab_mwifiex_process_sleep_confirm_resp = {(unsigned long )(& mwifiex_process_sleep_confirm_resp), (char const *)(& __kstrtab_mwifiex_process_sleep_confirm_resp)}; int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , uint16_t ps_bitmap , struct mwifiex_ds_auto_ds *auto_ds ) { struct host_cmd_ds_802_11_ps_mode_enh *psmode_enh ; u8 *tlv ; u16 cmd_size ; struct mwifiex_adapter *adapter ; struct mwifiex_ie_types_ps_param *ps_tlv ; struct mwifiex_ps_param *ps_mode ; struct _ddebug descriptor ; long tmp ; struct mwifiex_ie_types_auto_ds_param *auto_ds_tlv ; u16 idletime ; struct _ddebug descriptor___0 ; long tmp___0 ; { psmode_enh = & cmd->params.psmode_enh; cmd_size = 0U; cmd->command = 228U; if ((unsigned int )cmd_action == 254U) { psmode_enh->action = 254U; psmode_enh->params.ps_bitmap = ps_bitmap; cmd->size = 12U; } else if ((unsigned int )cmd_action == 0U) { psmode_enh->action = 0U; psmode_enh->params.ps_bitmap = ps_bitmap; cmd->size = 12U; } else if ((unsigned int )cmd_action == 255U) { psmode_enh->action = 255U; psmode_enh->params.ps_bitmap = ps_bitmap; cmd_size = 12U; tlv = (u8 *)cmd + (unsigned long )cmd_size; if (((int )ps_bitmap & 16) != 0) { { adapter = priv->adapter; ps_tlv = (struct mwifiex_ie_types_ps_param *)tlv; ps_mode = & ps_tlv->param; ps_tlv->header.type = 370U; ps_tlv->header.len = 14U; cmd_size = (unsigned int )cmd_size + 18U; tlv = tlv + 18UL; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_enh_power_mode"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "cmd: PS Command: Enter PS\n"; descriptor.lineno = 1307U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: PS Command: Enter PS\n"); } } else { } ps_mode->null_pkt_interval = adapter->null_pkt_interval; ps_mode->multiple_dtims = adapter->multiple_dtim; ps_mode->bcn_miss_timeout = adapter->bcn_miss_time_out; ps_mode->local_listen_interval = adapter->local_listen_interval; ps_mode->adhoc_wake_period = adapter->adhoc_awake_period; ps_mode->delay_to_ps = adapter->delay_to_ps; ps_mode->mode = adapter->enhanced_ps_mode; } else { } if ((int )ps_bitmap & 1) { auto_ds_tlv = (struct mwifiex_ie_types_auto_ds_param *)tlv; idletime = 0U; auto_ds_tlv->header.type = 369U; auto_ds_tlv->header.len = 2U; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; if ((unsigned long )auto_ds != (unsigned long )((struct mwifiex_ds_auto_ds *)0)) { idletime = auto_ds->idle_time; } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_enh_power_mode"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "cmd: PS Command: Enter Auto Deep Sleep\n"; descriptor___0.lineno = 1338U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: PS Command: Enter Auto Deep Sleep\n"); } } else { } auto_ds_tlv->deep_sleep_timeout = idletime; } else { } cmd->size = cmd_size; } else { } return (0); } } int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , struct mwifiex_ds_pm_cfg *pm_cfg ) { struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_ps_mode_enh *ps_mode ; uint16_t action ; uint16_t ps_bitmap ; uint16_t auto_ps_bitmap ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; struct _ddebug descriptor___4 ; long tmp___4 ; struct _ddebug descriptor___5 ; long tmp___5 ; { { adapter = priv->adapter; ps_mode = & resp->params.psmode_enh; action = ps_mode->action; ps_bitmap = ps_mode->params.ps_bitmap; auto_ps_bitmap = ps_mode->params.ps_bitmap; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_enh_power_mode"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "info: %s: PS_MODE cmd reply result=%#x action=%#X\n"; descriptor.lineno = 1367U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: %s: PS_MODE cmd reply result=%#x action=%#X\n", "mwifiex_ret_enh_power_mode", (int )resp->result, (int )action); } } else { } if ((unsigned int )action == 255U) { if ((int )auto_ps_bitmap & 1) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_enh_power_mode"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "cmd: Enabled auto deep sleep\n"; descriptor___0.lineno = 1370U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: Enabled auto deep sleep\n"); } } else { } (priv->adapter)->is_deep_sleep = 1U; } else { } if (((int )auto_ps_bitmap & 16) != 0) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_enh_power_mode"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___1.format = "cmd: Enabled STA power save\n"; descriptor___1.lineno = 1374U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "cmd: Enabled STA power save\n"); } } else { } if ((unsigned int )adapter->sleep_period.period != 0U) { { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_enh_power_mode"; descriptor___2.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___2.format = "cmd: set to uapsd/pps mode\n"; descriptor___2.lineno = 1377U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "cmd: set to uapsd/pps mode\n"); } } else { } } else { } } else { } } else if ((unsigned int )action == 254U) { if ((int )ps_bitmap & 1) { { (priv->adapter)->is_deep_sleep = 0U; descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_ret_enh_power_mode"; descriptor___3.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___3.format = "cmd: Disabled auto deep sleep\n"; descriptor___3.lineno = 1382U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "cmd: Disabled auto deep sleep\n"); } } else { } } else { } if (((int )ps_bitmap & 16) != 0) { { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_ret_enh_power_mode"; descriptor___4.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___4.format = "cmd: Disabled STA power save\n"; descriptor___4.lineno = 1385U; descriptor___4.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "cmd: Disabled STA power save\n"); } } else { } if ((unsigned int )adapter->sleep_period.period != 0U) { adapter->delay_null_pkt = 0U; adapter->tx_lock_flag = 0U; adapter->pps_uapsd_mode = 0U; } else { } } else { } } else if ((unsigned int )action == 0U) { if (((int )ps_bitmap & 16) != 0) { adapter->ps_mode = 1U; } else { adapter->ps_mode = 0U; } { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_ret_enh_power_mode"; descriptor___5.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___5.format = "cmd: ps_bitmap=%#x\n"; descriptor___5.lineno = 1398U; descriptor___5.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "cmd: ps_bitmap=%#x\n", (int )ps_bitmap); } } else { } if ((unsigned long )pm_cfg != (unsigned long )((struct mwifiex_ds_pm_cfg *)0)) { if (((int )ps_bitmap & 16) != 0) { pm_cfg->param.ps_mode = 1U; } else { pm_cfg->param.ps_mode = 0U; } } else { } } else { } return (0); } } int mwifiex_cmd_get_hw_spec(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd ) { struct host_cmd_ds_get_hw_spec *hw_spec ; { { hw_spec = & cmd->params.hw_spec; cmd->command = 3U; cmd->size = 71U; memcpy((void *)(& hw_spec->permanent_addr), (void const *)(& priv->curr_addr), 6UL); } return (0); } } int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_get_hw_spec *hw_spec ; struct mwifiex_adapter *adapter ; int i ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; { hw_spec = & resp->params.hw_spec; adapter = priv->adapter; adapter->fw_cap_info = hw_spec->fw_cap_info; if (((unsigned long )adapter->fw_cap_info & 16128UL) != 0UL) { adapter->fw_bands = (unsigned int )((unsigned char )((((adapter->fw_cap_info & 12288U) << 1) | (adapter->fw_cap_info & 4294905855U)) >> 8)) & 127U; } else { adapter->fw_bands = 1U; } adapter->config_bands = adapter->fw_bands; if (((int )adapter->fw_bands & 4) != 0) { if (((int )adapter->fw_bands & 8) != 0) { adapter->config_bands = (u8 )((unsigned int )adapter->config_bands | 16U); adapter->fw_bands = (u8 )((unsigned int )adapter->fw_bands | 16U); } else { } if (((int )adapter->fw_bands & 16) != 0) { adapter->adhoc_start_band = 20U; adapter->adhoc_11n_enabled = 1U; } else { adapter->adhoc_start_band = 4U; } priv->adhoc_channel = 36U; } else if (((int )adapter->fw_bands & 8) != 0) { adapter->adhoc_start_band = 11U; priv->adhoc_channel = 6U; adapter->adhoc_11n_enabled = 1U; } else if (((int )adapter->fw_bands & 2) != 0) { adapter->adhoc_start_band = 3U; priv->adhoc_channel = 6U; } else if ((int )adapter->fw_bands & 1) { adapter->adhoc_start_band = 1U; priv->adhoc_channel = 6U; } else { } adapter->fw_release_number = hw_spec->fw_release_number; adapter->number_of_antenna = hw_spec->number_of_antenna; if (hw_spec->dot_11ac_dev_cap != 0U) { adapter->is_hw_11ac_capable = 1U; adapter->hw_dot_11ac_dev_cap = hw_spec->dot_11ac_dev_cap; adapter->usr_dot_11ac_dev_cap_bg = adapter->hw_dot_11ac_dev_cap; adapter->usr_dot_11ac_dev_cap_a = adapter->hw_dot_11ac_dev_cap; adapter->hw_dot_11ac_mcs_support = hw_spec->dot_11ac_mcs_support; adapter->usr_dot_11ac_mcs_support = adapter->hw_dot_11ac_mcs_support; } else { adapter->is_hw_11ac_capable = 0U; } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_get_hw_spec"; descriptor.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor.format = "info: GET_HW_SPEC: fw_release_number- %#x\n"; descriptor.lineno = 1514U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: GET_HW_SPEC: fw_release_number- %#x\n", adapter->fw_release_number); } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_get_hw_spec"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___0.format = "info: GET_HW_SPEC: permanent addr: %pM\n"; descriptor___0.lineno = 1516U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: GET_HW_SPEC: permanent addr: %pM\n", (u8 *)(& hw_spec->permanent_addr)); } } else { } { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_get_hw_spec"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___1.format = "info: GET_HW_SPEC: hw_if_version=%#x version=%#x\n"; descriptor___1.lineno = 1520U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: GET_HW_SPEC: hw_if_version=%#x version=%#x\n", (int )hw_spec->hw_if_version, (int )hw_spec->version); } } else { } if ((unsigned int )priv->curr_addr[0] == 255U) { { memmove((void *)(& priv->curr_addr), (void const *)(& hw_spec->permanent_addr), 6UL); } } else { } adapter->region_code = hw_spec->region_code; i = 0; goto ldv_54941; ldv_54940: ; if ((int )adapter->region_code == (int )region_code_index[i]) { goto ldv_54939; } else { } i = i + 1; ldv_54941: ; if (i <= 6) { goto ldv_54940; } else { } ldv_54939: ; if (i > 6) { { adapter->region_code = 16U; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_get_hw_spec"; descriptor___2.filename = "drivers/net/wireless/mwifiex/cmdevt.c"; descriptor___2.format = "cmd: unknown region code, use default (USA)\n"; descriptor___2.lineno = 1536U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "cmd: unknown region code, use default (USA)\n"); } } else { } } else { } adapter->hw_dot_11n_dev_cap = hw_spec->dot_11n_dev_cap; adapter->hw_dev_mcs_support = hw_spec->dev_mcs_support; if ((unsigned long )adapter->if_ops.update_mp_end_port != (unsigned long )((void (*)(struct mwifiex_adapter * , u16 ))0)) { { (*(adapter->if_ops.update_mp_end_port))(adapter, (int )hw_spec->mp_end_port); } } else { } return (0); } } __inline static void atomic_dec(atomic_t *v ) { { { ldv_atomic_dec(v); } return; } } static int ldv_mod_timer_19___0(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; tmp___0 = ldv_mod_timer(ldv_func_res, ldv_func_arg1, ldv_func_arg2); } return (tmp___0); return (ldv_func_res); } } static int ldv_del_timer_20___0(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___1 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } extern void __bad_percpu_size(void) ; extern int __preempt_count ; __inline static int preempt_count(void) { int pfo_ret__ ; { { if (4UL == 1UL) { goto case_1; } else { } if (4UL == 2UL) { goto case_2; } else { } if (4UL == 4UL) { goto case_4; } else { } if (4UL == 8UL) { goto case_8; } else { } goto switch_default; case_1: /* CIL Label */ __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "m" (__preempt_count)); goto ldv_6302; case_2: /* CIL Label */ __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6302; case_4: /* CIL Label */ __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6302; case_8: /* CIL Label */ __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6302; switch_default: /* CIL Label */ { __bad_percpu_size(); } switch_break: /* CIL Label */ ; } ldv_6302: ; return (pfo_ret__ & 2147483647); } } extern int netif_rx(struct sk_buff * ) ; extern int netif_rx_ni(struct sk_buff * ) ; extern bool cfg80211_rx_mgmt(struct wireless_dev * , int , int , u8 const * , size_t , u32 , gfp_t ) ; extern __be16 eth_type_trans(struct sk_buff * , struct net_device * ) ; int mwifiex_recv_packet(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_process_mgmt_packet(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_get_debug_info(struct mwifiex_private *priv , struct mwifiex_debug_info *info___0 ) ; int mwifiex_init_shutdown_fw(struct mwifiex_private *priv , u32 func_init_shutdown ) ; int mwifiex_get_rx_reorder_tbl(struct mwifiex_private *priv , struct mwifiex_ds_rx_reorder_tbl *buf ) ; int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv , struct mwifiex_ds_tx_ba_stream_tbl *buf ) ; int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter ) { { { adapter->init_wait_q_woken = 1U; __wake_up(& adapter->init_wait_q, 1U, 1, (void *)0); } return (0); } } int mwifiex_shutdown_fw_complete(struct mwifiex_adapter *adapter ) { { { adapter->hw_status = 6; adapter->init_wait_q_woken = 1U; __wake_up(& adapter->init_wait_q, 1U, 1, (void *)0); } return (0); } } int mwifiex_init_shutdown_fw(struct mwifiex_private *priv , u32 func_init_shutdown ) { u16 cmd ; int tmp ; { if (func_init_shutdown == 1U) { cmd = 169U; } else if (func_init_shutdown == 2U) { cmd = 170U; } else { { dev_err((struct device const *)(priv->adapter)->dev, "unsupported parameter\n"); } return (-1); } { tmp = mwifiex_send_cmd_sync(priv, (int )cmd, 1, 0U, (void *)0); } return (tmp); } } static char const __kstrtab_mwifiex_init_shutdown_fw[25U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'i', 'n', 'i', 't', '_', 's', 'h', 'u', 't', 'd', 'o', 'w', 'n', '_', 'f', 'w', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_init_shutdown_fw ; struct kernel_symbol const __ksymtab_mwifiex_init_shutdown_fw = {(unsigned long )(& mwifiex_init_shutdown_fw), (char const *)(& __kstrtab_mwifiex_init_shutdown_fw)}; int mwifiex_get_debug_info(struct mwifiex_private *priv , struct mwifiex_debug_info *info___0 ) { struct mwifiex_adapter *adapter ; int tmp ; int tmp___0 ; { adapter = priv->adapter; if ((unsigned long )info___0 != (unsigned long )((struct mwifiex_debug_info *)0)) { { memcpy((void *)(& info___0->packets_out), (void const *)(& priv->wmm.packets_out), 32UL); info___0->curr_tx_buf_size = (unsigned int )adapter->curr_tx_buf_size; info___0->tx_buf_size = (unsigned int )adapter->tx_buf_size; tmp = mwifiex_get_rx_reorder_tbl(priv, (struct mwifiex_ds_rx_reorder_tbl *)(& info___0->rx_tbl)); info___0->rx_tbl_num = (u32 )tmp; tmp___0 = mwifiex_get_tx_ba_stream_tbl(priv, (struct mwifiex_ds_tx_ba_stream_tbl *)(& info___0->tx_tbl)); info___0->tx_tbl_num = (u32 )tmp___0; info___0->ps_mode = adapter->ps_mode; info___0->ps_state = adapter->ps_state; info___0->is_deep_sleep = adapter->is_deep_sleep; info___0->pm_wakeup_card_req = adapter->pm_wakeup_card_req; info___0->pm_wakeup_fw_try = adapter->pm_wakeup_fw_try; info___0->is_hs_configured = adapter->is_hs_configured; info___0->hs_activated = adapter->hs_activated; info___0->num_cmd_host_to_card_failure = adapter->dbg.num_cmd_host_to_card_failure; info___0->num_cmd_sleep_cfm_host_to_card_failure = adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure; info___0->num_tx_host_to_card_failure = adapter->dbg.num_tx_host_to_card_failure; info___0->num_event_deauth = adapter->dbg.num_event_deauth; info___0->num_event_disassoc = adapter->dbg.num_event_disassoc; info___0->num_event_link_lost = adapter->dbg.num_event_link_lost; info___0->num_cmd_deauth = adapter->dbg.num_cmd_deauth; info___0->num_cmd_assoc_success = adapter->dbg.num_cmd_assoc_success; info___0->num_cmd_assoc_failure = adapter->dbg.num_cmd_assoc_failure; info___0->num_tx_timeout = adapter->dbg.num_tx_timeout; info___0->num_cmd_timeout = adapter->dbg.num_cmd_timeout; info___0->timeout_cmd_id = adapter->dbg.timeout_cmd_id; info___0->timeout_cmd_act = adapter->dbg.timeout_cmd_act; memcpy((void *)(& info___0->last_cmd_id), (void const *)(& adapter->dbg.last_cmd_id), 10UL); memcpy((void *)(& info___0->last_cmd_act), (void const *)(& adapter->dbg.last_cmd_act), 10UL); info___0->last_cmd_index = adapter->dbg.last_cmd_index; memcpy((void *)(& info___0->last_cmd_resp_id), (void const *)(& adapter->dbg.last_cmd_resp_id), 10UL); info___0->last_cmd_resp_index = adapter->dbg.last_cmd_resp_index; memcpy((void *)(& info___0->last_event), (void const *)(& adapter->dbg.last_event), 10UL); info___0->last_event_index = adapter->dbg.last_event_index; info___0->data_sent = adapter->data_sent; info___0->cmd_sent = adapter->cmd_sent; info___0->cmd_resp_received = adapter->cmd_resp_received; } } else { } return (0); } } int mwifiex_process_mgmt_packet(struct mwifiex_private *priv , struct sk_buff *skb ) { struct rxpd *rx_pd ; u16 pkt_len ; { if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-1); } else { } { rx_pd = (struct rxpd *)skb->data; skb_pull(skb, (unsigned int )rx_pd->rx_pkt_offset); skb_pull(skb, 2U); pkt_len = rx_pd->rx_pkt_length; memmove((void *)skb->data + 24U, (void const *)skb->data + 30U, (unsigned long )pkt_len - 30UL); pkt_len = (unsigned int )pkt_len - 8U; rx_pd->rx_pkt_length = pkt_len; cfg80211_rx_mgmt(priv->wdev, (int )priv->roc_cfg.chan.center_freq, (int )((short )rx_pd->snr) + (int )((short )rx_pd->nf), (u8 const *)skb->data, (size_t )pkt_len, 0U, 32U); } return (0); } } int mwifiex_recv_packet(struct mwifiex_private *priv , struct sk_buff *skb ) { int tmp ; { if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-1); } else { } { priv->stats.rx_bytes = priv->stats.rx_bytes + (unsigned long )skb->len; priv->stats.rx_packets = priv->stats.rx_packets + 1UL; skb->dev = priv->netdev; skb->protocol = eth_type_trans(skb, priv->netdev); skb->ip_summed = 0U; } if ((unsigned int )(priv->adapter)->iface_type - 1U <= 1U && skb->truesize > 4096U) { skb->truesize = (skb->truesize + skb->len) - 4096U; } else { } { tmp = preempt_count(); } if (((unsigned long )tmp & 2096896UL) != 0UL) { { netif_rx(skb); } } else { { netif_rx_ni(skb); } } return (0); } } int mwifiex_complete_cmd(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_node ) { struct _ddebug descriptor ; long tmp ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_complete_cmd"; descriptor.filename = "drivers/net/wireless/mwifiex/util.c"; descriptor.format = "cmd completed: status=%d\n"; descriptor.lineno = 244U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd completed: status=%d\n", adapter->cmd_wait_q.status); } } else { } *(cmd_node->condition) = 1U; if (adapter->cmd_wait_q.status == -110) { { dev_err((struct device const *)adapter->dev, "cmd timeout\n"); } } else { { __wake_up(& adapter->cmd_wait_q.wait, 1U, 1, (void *)0); } } return (0); } } __inline static void atomic_dec(atomic_t *v ) ; __inline static int atomic_add_return(int i , atomic_t *v ) ; __inline static int atomic_sub_return(int i , atomic_t *v ) { int tmp ; { { tmp = atomic_add_return(- i, v); } return (tmp); } } int mwifiex_process_tx(struct mwifiex_private *priv , struct sk_buff *skb , struct mwifiex_tx_param *tx_param ) ; int mwifiex_write_data_complete(struct mwifiex_adapter *adapter , struct sk_buff *skb , int aggr , int status ) ; int mwifiex_process_sta_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_process_uap_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) ; void *mwifiex_process_sta_txpd(struct mwifiex_private *priv , struct sk_buff *skb ) ; void *mwifiex_process_uap_txpd(struct mwifiex_private *priv , struct sk_buff *skb ) ; __inline static struct mwifiex_private *mwifiex_get_priv_by_id___0(struct mwifiex_adapter *adapter , u8 bss_num , u8 bss_type ) { int i ; { i = 0; goto ldv_54106; ldv_54105: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((int )(adapter->priv[i])->bss_num == (int )bss_num && (int )(adapter->priv[i])->bss_type == (int )bss_type) { goto ldv_54104; } else { } } else { } i = i + 1; ldv_54106: ; if (i < (int )adapter->priv_num) { goto ldv_54105; } else { } ldv_54104: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } __inline static struct mwifiex_private *mwifiex_get_priv___1(struct mwifiex_adapter *adapter , enum mwifiex_bss_role bss_role ) { int i ; { i = 0; goto ldv_54114; ldv_54113: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((unsigned int )bss_role == 255U || ((unsigned long )(adapter->priv[i])->bss_role & 1UL) == (unsigned long )bss_role) { goto ldv_54112; } else { } } else { } i = i + 1; ldv_54114: ; if (i < (int )adapter->priv_num) { goto ldv_54113; } else { } ldv_54112: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } static u16 const mwifiex_1d_to_wmm_queue___0[8U] = { 1U, 0U, 0U, 1U, 2U, 2U, 3U, 3U}; int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter , struct sk_buff *skb ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct rxpd *local_rx_pd ; struct mwifiex_rxinfo *rx_info ; struct mwifiex_rxinfo *tmp___0 ; int ret ; { { tmp = mwifiex_get_priv___1(adapter, 255); priv = tmp; tmp___0 = MWIFIEX_SKB_RXCB(skb); rx_info = tmp___0; local_rx_pd = (struct rxpd *)skb->data; priv = mwifiex_get_priv_by_id___0(adapter, (int )local_rx_pd->bss_num & 15, (int )local_rx_pd->bss_type); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { priv = mwifiex_get_priv___1(adapter, 255); } } else { } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { { dev_err((struct device const *)adapter->dev, "data: priv not found. Drop RX packet\n"); dev_kfree_skb_any(skb); } return (-1); } else { } rx_info->bss_num = priv->bss_num; rx_info->bss_type = priv->bss_type; if ((unsigned int )priv->bss_role == 1U) { { ret = mwifiex_process_uap_rx_packet(priv, skb); } } else { { ret = mwifiex_process_sta_rx_packet(priv, skb); } } if ((unsigned long )adapter->if_ops.data_complete != (unsigned long )((int (*)(struct mwifiex_adapter * ))0)) { { (*(adapter->if_ops.data_complete))(adapter); } } else { } return (ret); } } static char const __kstrtab_mwifiex_handle_rx_packet[25U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'h', 'a', 'n', 'd', 'l', 'e', '_', 'r', 'x', '_', 'p', 'a', 'c', 'k', 'e', 't', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_handle_rx_packet ; struct kernel_symbol const __ksymtab_mwifiex_handle_rx_packet = {(unsigned long )(& mwifiex_handle_rx_packet), (char const *)(& __kstrtab_mwifiex_handle_rx_packet)}; int mwifiex_process_tx(struct mwifiex_private *priv , struct sk_buff *skb , struct mwifiex_tx_param *tx_param ) { int ret ; struct mwifiex_adapter *adapter ; u8 *head_ptr ; struct txpd *local_tx_pd ; void *tmp ; void *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; { ret = -1; adapter = priv->adapter; local_tx_pd = (struct txpd *)0; if ((unsigned int )priv->bss_role == 1U) { { tmp = mwifiex_process_uap_txpd(priv, skb); head_ptr = (u8 *)tmp; } } else { { tmp___0 = mwifiex_process_sta_txpd(priv, skb); head_ptr = (u8 *)tmp___0; } } if ((unsigned long )head_ptr != (unsigned long )((u8 *)0U)) { if (((unsigned long )priv->bss_role & 1UL) == 0UL) { local_tx_pd = (struct txpd *)head_ptr + 4U; } else { } if ((unsigned int )adapter->iface_type == 2U) { { adapter->data_sent = 1U; skb_pull(skb, 4U); ret = (*(adapter->if_ops.host_to_card))(adapter, 2, skb, (struct mwifiex_tx_param *)0); } } else { { ret = (*(adapter->if_ops.host_to_card))(adapter, 0, skb, tx_param); } } } else { } { if (ret == -63) { goto case_neg_63; } else { } if (ret == -16) { goto case_neg_16; } else { } if (ret == -1) { goto case_neg_1; } else { } if (ret == -115) { goto case_neg_115; } else { } if (ret == 0) { goto case_0; } else { } goto switch_default; case_neg_63: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_tx"; descriptor.filename = "drivers/net/wireless/mwifiex/txrx.c"; descriptor.format = "data: -ENOSR is returned\n"; descriptor.lineno = 115U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: -ENOSR is returned\n"); } } else { } goto ldv_54393; case_neg_16: /* CIL Label */ ; if ((((unsigned long )priv->bss_role & 1UL) == 0UL && (unsigned int )adapter->pps_uapsd_mode != 0U) && (unsigned int )adapter->tx_lock_flag != 0U) { (priv->adapter)->tx_lock_flag = 0U; if ((unsigned long )local_tx_pd != (unsigned long )((struct txpd *)0)) { local_tx_pd->flags = 0U; } else { } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_process_tx"; descriptor___0.filename = "drivers/net/wireless/mwifiex/txrx.c"; descriptor___0.format = "data: -EBUSY is returned\n"; descriptor___0.lineno = 124U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "data: -EBUSY is returned\n"); } } else { } goto ldv_54393; case_neg_1: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } { dev_err((struct device const *)adapter->dev, "mwifiex_write_data_async failed: 0x%X\n", ret); adapter->dbg.num_tx_host_to_card_failure = adapter->dbg.num_tx_host_to_card_failure + 1U; mwifiex_write_data_complete(adapter, skb, 0, ret); } goto ldv_54393; case_neg_115: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } goto ldv_54393; case_0: /* CIL Label */ { mwifiex_write_data_complete(adapter, skb, 0, ret); } goto ldv_54393; switch_default: /* CIL Label */ ; goto ldv_54393; switch_break: /* CIL Label */ ; } ldv_54393: ; return (ret); } } int mwifiex_write_data_complete(struct mwifiex_adapter *adapter , struct sk_buff *skb , int aggr , int status ) { struct mwifiex_private *priv ; struct mwifiex_txinfo *tx_info ; struct netdev_queue *txq ; int index ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; { if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (0); } else { } { tx_info = MWIFIEX_SKB_TXCB(skb); priv = mwifiex_get_priv_by_id___0(adapter, (int )tx_info->bss_num, (int )tx_info->bss_type); } if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { goto done; } else { } if ((unsigned int )adapter->iface_type == 2U) { adapter->data_sent = 0U; } else { } { mwifiex_set_trans_start(priv->netdev); } if (status == 0) { priv->stats.tx_packets = priv->stats.tx_packets + 1UL; priv->stats.tx_bytes = priv->stats.tx_bytes + (unsigned long )tx_info->pkt_len; if ((unsigned int )priv->tx_timeout_cnt != 0U) { priv->tx_timeout_cnt = 0U; } else { } } else { priv->stats.tx_errors = priv->stats.tx_errors + 1UL; } if (((unsigned long )tx_info->flags & 2UL) != 0UL) { { atomic_sub_return(1, & adapter->pending_bridged_pkts); } } else { } if (aggr != 0) { goto done; } else { } { atomic_dec(& adapter->tx_pending); index = (int )mwifiex_1d_to_wmm_queue___0[skb->priority]; tmp___1 = atomic_sub_return(1, (atomic_t *)(& priv->wmm_tx_pending) + (unsigned long )index); } if (tmp___1 <= 79) { { txq = netdev_get_tx_queue((struct net_device const *)priv->netdev, (unsigned int )index); tmp___0 = netif_tx_queue_stopped((struct netdev_queue const *)txq); } if ((int )tmp___0) { { netif_tx_wake_queue(txq); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_write_data_complete"; descriptor.filename = "drivers/net/wireless/mwifiex/txrx.c"; descriptor.format = "wake queue: %d\n"; descriptor.lineno = 199U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "wake queue: %d\n", index); } } else { } } else { } } else { } done: { dev_kfree_skb_any(skb); } return (0); } } static char const __kstrtab_mwifiex_write_data_complete[28U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'w', 'r', 'i', 't', 'e', '_', 'd', 'a', 't', 'a', '_', 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_write_data_complete ; struct kernel_symbol const __ksymtab_mwifiex_write_data_complete = {(unsigned long )(& mwifiex_write_data_complete), (char const *)(& __kstrtab_mwifiex_write_data_complete)}; extern void __list_del_entry(struct list_head * ) ; __inline static void list_move(struct list_head *list , struct list_head *head ) { { { __list_del_entry(list); list_add(list, head); } return; } } extern int memcmp(void const * , void const * , size_t ) ; __inline static void atomic_inc(atomic_t *v ) ; __inline static void atomic_dec(atomic_t *v ) ; extern struct timeval ns_to_timeval(s64 const ) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static struct sk_buff *skb_peek(struct sk_buff_head const *list_ ) { struct sk_buff *skb ; { skb = list_->next; if ((unsigned long )skb == (unsigned long )((struct sk_buff *)list_)) { skb = (struct sk_buff *)0; } else { } return (skb); } } extern void skb_queue_tail(struct sk_buff_head * , struct sk_buff * ) ; struct mwifiex_sta_node *mwifiex_get_sta_entry(struct mwifiex_private *priv , u8 *mac ) ; void mwifiex_set_ba_params(struct mwifiex_private *priv ) ; __inline static u8 mwifiex_queuing_ra_based(struct mwifiex_private *priv ) { { if (priv->bss_mode == 2U && ((unsigned long )priv->bss_role & 1UL) == 0UL) { return (0U); } else { } return (1U); } } __inline static bool mwifiex_is_skb_mgmt_frame(struct sk_buff *skb ) { { return (*((__le32 *)skb->data) == 229U); } } __inline static int mwifiex_get_tid(struct mwifiex_ra_list_tbl *ptr ) { struct sk_buff *skb ; int tmp ; { { tmp = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp != 0) { return (0); } else { } { skb = skb_peek((struct sk_buff_head const *)(& ptr->skb_head)); } return ((int )skb->priority); } } __inline static int mwifiex_wmm_list_len(struct list_head *head ) { struct list_head *pos ; int count ; { count = 0; pos = head->next; goto ldv_54315; ldv_54314: count = count + 1; pos = pos->next; ldv_54315: ; if ((unsigned long )pos != (unsigned long )head) { goto ldv_54314; } else { } return (count); } } void mwifiex_ralist_add(struct mwifiex_private *priv , u8 *ra ) ; void mwifiex_rotate_priolists(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ra , int tid ) ; int mwifiex_is_ralist_valid(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ra_list , int ptr_index ) ; u8 mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv , struct sk_buff const *skb ) ; u32 mwifiex_wmm_process_association_req(struct mwifiex_private *priv , u8 **assoc_buf , struct ieee_types_wmm_parameter *wmm_ie , struct ieee80211_ht_cap *ht_cap ) ; void mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv , struct ieee_types_wmm_parameter *wmm_ie ) ; void mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv ) ; int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv , struct host_cmd_ds_command const *resp ) ; int mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *pra_list , int ptrindex , unsigned long ra_list_flags ) ; __inline static void mwifiex_reset_11n_rx_seq_num(struct mwifiex_private *priv ) { { { memset((void *)(& priv->rx_seq), 255, 16UL); } return; } } void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv ) ; void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv ) ; struct mwifiex_tx_ba_stream_tbl *mwifiex_get_ba_tbl(struct mwifiex_private *priv , int tid , u8 *ra ) ; void mwifiex_create_ba_tbl(struct mwifiex_private *priv , u8 *ra , int tid , enum mwifiex_ba_status ba_status ) ; int mwifiex_send_addba(struct mwifiex_private *priv , int tid , u8 *peer_mac ) ; int mwifiex_send_delba(struct mwifiex_private *priv , int tid , u8 *peer_mac , int initiator ) ; __inline static u8 mwifiex_is_ampdu_allowed(struct mwifiex_private *priv , int tid ) { { return ((unsigned int )priv->aggr_prio_tbl[tid].ampdu_ap != 255U); } } __inline static u8 mwifiex_is_amsdu_allowed(struct mwifiex_private *priv , int tid ) { { return ((u8 )((unsigned int )priv->aggr_prio_tbl[tid].amsdu != 255U && ((unsigned int )priv->is_data_rate_auto != 0U || ((int )priv->bitmap_rates[2] & 3) == 0))); } } __inline static u8 mwifiex_space_avail_for_new_ba_stream(struct mwifiex_adapter *adapter ) { struct mwifiex_private *priv ; u8 i ; u32 ba_stream_num ; int tmp ; { ba_stream_num = 0U; i = 0U; goto ldv_54505; ldv_54504: priv = adapter->priv[(int )i]; if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0)) { { tmp = mwifiex_wmm_list_len(& priv->tx_ba_stream_tbl_ptr); ba_stream_num = ba_stream_num + (u32 )tmp; } } else { } i = (u8 )((int )i + 1); ldv_54505: ; if ((int )i < (int )adapter->priv_num) { goto ldv_54504; } else { } return (ba_stream_num <= 1U); } } __inline static u8 mwifiex_find_stream_to_delete(struct mwifiex_private *priv , int ptr_tid , int *ptid , u8 *ra ) { int tid ; u8 ret ; struct mwifiex_tx_ba_stream_tbl *tx_tbl ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { { ret = 0U; tid = (int )priv->aggr_prio_tbl[ptr_tid].ampdu_user; tmp = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tx_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; } goto ldv_54525; ldv_54524: ; if (tid > (int )priv->aggr_prio_tbl[tx_tbl->tid].ampdu_user) { { tid = (int )priv->aggr_prio_tbl[tx_tbl->tid].ampdu_user; *ptid = tx_tbl->tid; memcpy((void *)ra, (void const *)(& tx_tbl->ra), 6UL); ret = 1U; } } else { } __mptr___0 = (struct list_head const *)tx_tbl->list.next; tx_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; ldv_54525: ; if ((unsigned long )(& tx_tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54524; } else { } { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return (ret); } } __inline static int mwifiex_is_ba_stream_setup(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ptr , int tid ) { struct mwifiex_tx_ba_stream_tbl *tx_tbl ; { { tx_tbl = mwifiex_get_ba_tbl(priv, tid, (u8 *)(& ptr->ra)); } if ((unsigned long )tx_tbl != (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0) && (unsigned int )tx_tbl->ba_status != 0U) { return (1); } else { } return (0); } } __inline static int mwifiex_is_sta_11n_enabled(struct mwifiex_private *priv , struct mwifiex_sta_node *node ) { { if (((unsigned long )node == (unsigned long )((struct mwifiex_sta_node *)0) || (unsigned int )priv->bss_role != 1U) || (unsigned int )priv->ap_11n_enabled == 0U) { return (0); } else { } return ((int )node->is_11n_enabled); } } static bool enable_tx_amsdu ; static u8 const wmm_info_ie[9U] = { 221U, 7U, 0U, 80U, 242U, 2U, 0U, 1U, 0U}; static u8 const wmm_aci_to_qidx_map[4U] = { 1U, 0U, 2U, 3U}; static u8 tos_to_tid[8U] = { 1U, 2U, 0U, 3U, 4U, 5U, 6U, 7U}; static u8 tos_to_tid_inv[8U] = { 2U, 0U, 1U, 3U, 4U, 5U, 6U, 7U}; static u8 ac_to_tid[4U][2U] = { { 1U, 2U}, { 0U, 3U}, { 4U, 5U}, { 6U, 7U}}; static void mwifiex_wmm_ac_debug_print(struct ieee_types_wmm_ac_parameters const *ac_param ) { char const *ac_str[4U] ; struct _ddebug descriptor ; long tmp ; { { ac_str[0] = "BK"; ac_str[1] = "BE"; ac_str[2] = "VI"; ac_str[3] = "VO"; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_ac_debug_print"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, EcwMin=%d, EcwMax=%d, TxopLimit=%d\n"; descriptor.lineno = 101U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, EcwMin=%d, EcwMax=%d, TxopLimit=%d\n", ac_str[(int )wmm_aci_to_qidx_map[((int )ac_param->aci_aifsn_bitmap & 96) >> 5]], ((int )ac_param->aci_aifsn_bitmap & 96) >> 5, ((int )ac_param->aci_aifsn_bitmap & 16) >> 4, (int )ac_param->aci_aifsn_bitmap & 15, (int )ac_param->ecw_bitmap & 15, (int )((int const )ac_param->ecw_bitmap >> 4), (int )ac_param->tx_op_limit); } } else { } return; } } static struct mwifiex_ra_list_tbl *mwifiex_wmm_allocate_ralist_node(struct mwifiex_adapter *adapter , u8 *ra ) { struct mwifiex_ra_list_tbl *ra_list ; void *tmp ; struct _ddebug descriptor ; long tmp___0 ; { { tmp = kzalloc(136UL, 32U); ra_list = (struct mwifiex_ra_list_tbl *)tmp; } if ((unsigned long )ra_list == (unsigned long )((struct mwifiex_ra_list_tbl *)0)) { return ((struct mwifiex_ra_list_tbl *)0); } else { } { INIT_LIST_HEAD(& ra_list->list); skb_queue_head_init(& ra_list->skb_head); memcpy((void *)(& ra_list->ra), (void const *)ra, 6UL); ra_list->total_pkt_count = 0U; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_allocate_ralist_node"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: allocated ra_list %p\n"; descriptor.lineno = 125U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: allocated ra_list %p\n", ra_list); } } else { } return (ra_list); } } static u8 mwifiex_get_random_ba_threshold(void) { u32 sec ; u32 usec ; struct timeval ba_tstamp ; u8 ba_threshold ; { { do_gettimeofday(& ba_tstamp); sec = ((u32 )ba_tstamp.tv_sec & 65535U) + (u32 )(ba_tstamp.tv_sec >> 16); usec = ((u32 )ba_tstamp.tv_usec & 65535U) + (u32 )(ba_tstamp.tv_usec >> 16); ba_threshold = ((unsigned int )((u8 )usec) & 15U) + 16U; } return (ba_threshold); } } void mwifiex_ralist_add(struct mwifiex_private *priv , u8 *ra ) { int i ; struct mwifiex_ra_list_tbl *ra_list ; struct mwifiex_adapter *adapter ; struct mwifiex_sta_node *node ; unsigned long flags ; raw_spinlock_t *tmp ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; u8 tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; { { adapter = priv->adapter; tmp = spinlock_check(& priv->sta_list_spinlock); flags = _raw_spin_lock_irqsave(tmp); node = mwifiex_get_sta_entry(priv, ra); spin_unlock_irqrestore(& priv->sta_list_spinlock, flags); i = 0; } goto ldv_54591; ldv_54590: { ra_list = mwifiex_wmm_allocate_ralist_node(adapter, ra); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ralist_add"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: created ra_list %p\n"; descriptor.lineno = 172U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: created ra_list %p\n", ra_list); } } else { } if ((unsigned long )ra_list == (unsigned long )((struct mwifiex_ra_list_tbl *)0)) { goto ldv_54588; } else { } { ra_list->is_11n_enabled = 0U; tmp___2 = mwifiex_queuing_ra_based(priv); } if ((unsigned int )tmp___2 == 0U) { ra_list->is_11n_enabled = (u32 )(((unsigned int )(priv->adapter)->config_bands & 24U) != 0U && (unsigned long )priv->curr_bss_params.bss_descriptor.bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)); } else { { tmp___1 = mwifiex_is_sta_11n_enabled(priv, node); ra_list->is_11n_enabled = (u32 )tmp___1; } if (ra_list->is_11n_enabled != 0U) { ra_list->max_amsdu = node->max_amsdu; } else { } } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ralist_add"; descriptor___0.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___0.format = "data: ralist %p: is_11n_enabled=%d\n"; descriptor___0.lineno = 188U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "data: ralist %p: is_11n_enabled=%d\n", ra_list, ra_list->is_11n_enabled); } } else { } if (ra_list->is_11n_enabled != 0U) { { ra_list->ba_pkt_count = 0U; ra_list->ba_packet_thr = mwifiex_get_random_ba_threshold(); } } else { } { list_add_tail(& ra_list->list, & priv->wmm.tid_tbl_ptr[i].ra_list); i = i + 1; } ldv_54591: ; if (i <= 7) { goto ldv_54590; } else { } ldv_54588: ; return; } } static void mwifiex_wmm_default_queue_priorities(struct mwifiex_private *priv ) { { priv->wmm.queue_priority[0] = 3U; priv->wmm.queue_priority[1] = 2U; priv->wmm.queue_priority[2] = 1U; priv->wmm.queue_priority[3] = 0U; return; } } static void mwifiex_wmm_queue_priorities_tid(struct mwifiex_wmm_desc *wmm ) { u8 *queue_priority ; int i ; { queue_priority = (u8 *)(& wmm->queue_priority); i = 0; goto ldv_54601; ldv_54600: tos_to_tid[i * -2 + 7] = ac_to_tid[(int )*(queue_priority + (unsigned long )i)][1]; tos_to_tid[(3 - i) * 2] = ac_to_tid[(int )*(queue_priority + (unsigned long )i)][0]; i = i + 1; ldv_54601: ; if (i <= 3) { goto ldv_54600; } else { } i = 0; goto ldv_54604; ldv_54603: tos_to_tid_inv[(int )tos_to_tid[i]] = (unsigned char )i; i = i + 1; ldv_54604: ; if (i <= 7) { goto ldv_54603; } else { } { atomic_set(& wmm->highest_queued_prio, 7); } return; } } void mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv , struct ieee_types_wmm_parameter *wmm_ie ) { u16 cw_min ; u16 avg_back_off ; u16 tmp[4U] ; u32 i ; u32 j ; u32 num_ac ; u8 ac_idx ; struct _ddebug descriptor ; long tmp___0 ; u8 ecw ; u8 aci_aifsn ; struct _ddebug descriptor___0 ; long tmp___1 ; u16 __tmp ; u8 __tmp___0 ; u8 __tmp___1 ; { if ((unsigned long )wmm_ie == (unsigned long )((struct ieee_types_wmm_parameter *)0) || (unsigned int )priv->wmm_enabled == 0U) { { mwifiex_wmm_default_queue_priorities(priv); } return; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_setup_queue_priorities"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: WMM Parameter IE: version=%d, qos_info Parameter Set Count=%d, Reserved=%#x\n"; descriptor.lineno = 253U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: WMM Parameter IE: version=%d, qos_info Parameter Set Count=%d, Reserved=%#x\n", (int )wmm_ie->vend_hdr.version, (int )wmm_ie->qos_info_bitmap & 15, (int )wmm_ie->reserved); } } else { } num_ac = 0U; goto ldv_54625; ldv_54624: { ecw = wmm_ie->ac_params[num_ac].ecw_bitmap; aci_aifsn = wmm_ie->ac_params[num_ac].aci_aifsn_bitmap; cw_min = (unsigned int )((u16 )(1 << ((int )ecw & 15))) + 65535U; avg_back_off = (unsigned int )((u16 )((int )cw_min >> 1)) + ((unsigned int )((u16 )aci_aifsn) & 15U); ac_idx = wmm_aci_to_qidx_map[((int )aci_aifsn & 96) >> 5]; priv->wmm.queue_priority[(int )ac_idx] = ac_idx; tmp[(int )ac_idx] = avg_back_off; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_wmm_setup_queue_priorities"; descriptor___0.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___0.format = "info: WMM: CWmax=%d CWmin=%d Avg Back-off=%d\n"; descriptor___0.lineno = 268U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: WMM: CWmax=%d CWmin=%d Avg Back-off=%d\n", (1 << ((int )ecw >> 4)) + -1, (int )cw_min, (int )avg_back_off); } } else { } { mwifiex_wmm_ac_debug_print((struct ieee_types_wmm_ac_parameters const *)(& wmm_ie->ac_params) + (unsigned long )num_ac); num_ac = num_ac + 1U; } ldv_54625: ; if (num_ac <= 3U) { goto ldv_54624; } else { } i = 0U; goto ldv_54634; ldv_54633: j = 1U; goto ldv_54631; ldv_54630: ; if ((int )tmp[j - 1U] > (int )tmp[j]) { __tmp = tmp[j - 1U]; tmp[j - 1U] = tmp[j]; tmp[j] = __tmp; __tmp___0 = priv->wmm.queue_priority[j - 1U]; priv->wmm.queue_priority[j - 1U] = priv->wmm.queue_priority[j]; priv->wmm.queue_priority[j] = __tmp___0; } else if ((int )tmp[j - 1U] == (int )tmp[j]) { if ((int )priv->wmm.queue_priority[j - 1U] < (int )priv->wmm.queue_priority[j]) { __tmp___1 = priv->wmm.queue_priority[j - 1U]; priv->wmm.queue_priority[j - 1U] = priv->wmm.queue_priority[j]; priv->wmm.queue_priority[j] = __tmp___1; } else { } } else { } j = j + 1U; ldv_54631: ; if (j < num_ac - i) { goto ldv_54630; } else { } i = i + 1U; ldv_54634: ; if (i < num_ac) { goto ldv_54633; } else { } { mwifiex_wmm_queue_priorities_tid(& priv->wmm); } return; } } static enum mwifiex_wmm_ac_e mwifiex_wmm_eval_downgrade_ac(struct mwifiex_private *priv , enum mwifiex_wmm_ac_e eval_ac ) { int down_ac ; enum mwifiex_wmm_ac_e ret_ac ; struct mwifiex_wmm_ac_status *ac_status ; { ac_status = (struct mwifiex_wmm_ac_status *)(& priv->wmm.ac_status) + (unsigned long )eval_ac; if ((unsigned int )ac_status->disabled == 0U) { return (eval_ac); } else { } ret_ac = 0; down_ac = 0; goto ldv_54644; ldv_54643: ac_status = (struct mwifiex_wmm_ac_status *)(& priv->wmm.ac_status) + (unsigned long )down_ac; if ((unsigned int )ac_status->disabled == 0U && (unsigned int )ac_status->flow_required == 0U) { ret_ac = (enum mwifiex_wmm_ac_e )down_ac; } else { } down_ac = down_ac + 1; ldv_54644: ; if (down_ac < (int )eval_ac) { goto ldv_54643; } else { } return (ret_ac); } } void mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv ) { int ac_val ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_setup_ac_downgrade"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: WMM: AC Priorities:BK(0), BE(1), VI(2), VO(3)\n"; descriptor.lineno = 342U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: WMM: AC Priorities:BK(0), BE(1), VI(2), VO(3)\n"); } } else { } if ((unsigned int )priv->wmm_enabled == 0U) { ac_val = 0; goto ldv_54653; ldv_54652: priv->wmm.ac_down_graded_vals[ac_val] = (enum mwifiex_wmm_ac_e )ac_val; ac_val = ac_val + 1; ldv_54653: ; if (ac_val <= 3) { goto ldv_54652; } else { } } else { ac_val = 0; goto ldv_54657; ldv_54656: { priv->wmm.ac_down_graded_vals[ac_val] = mwifiex_wmm_eval_downgrade_ac(priv, (int )((enum mwifiex_wmm_ac_e )ac_val)); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_wmm_setup_ac_downgrade"; descriptor___0.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___0.format = "info: WMM: AC PRIO %d maps to %d\n"; descriptor___0.lineno = 356U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: WMM: AC PRIO %d maps to %d\n", ac_val, (int )priv->wmm.ac_down_graded_vals[ac_val]); } } else { } ac_val = ac_val + 1; ldv_54657: ; if (ac_val <= 3) { goto ldv_54656; } else { } } return; } } static enum mwifiex_wmm_ac_e mwifiex_wmm_convert_tos_to_ac(struct mwifiex_adapter *adapter , u32 tos ) { enum mwifiex_wmm_ac_e tos_to_ac[8U] ; { tos_to_ac[0] = 1; tos_to_ac[1] = 0; tos_to_ac[2] = 0; tos_to_ac[3] = 1; tos_to_ac[4] = 2; tos_to_ac[5] = 2; tos_to_ac[6] = 3; tos_to_ac[7] = 3; if (tos > 7U) { return (1); } else { } return (tos_to_ac[tos]); } } static u8 mwifiex_wmm_downgrade_tid(struct mwifiex_private *priv , u32 tid ) { enum mwifiex_wmm_ac_e ac ; enum mwifiex_wmm_ac_e ac_down ; u8 new_tid ; { { ac = mwifiex_wmm_convert_tos_to_ac(priv->adapter, tid); ac_down = priv->wmm.ac_down_graded_vals[(int )ac]; new_tid = ac_to_tid[(int )ac_down][tid & 1U]; } return (new_tid); } } void mwifiex_wmm_init(struct mwifiex_adapter *adapter ) { int i ; int j ; struct mwifiex_private *priv ; u8 tmp ; u8 tmp___0 ; u8 tmp___1 ; u8 tmp___2 ; { j = 0; goto ldv_54684; ldv_54683: priv = adapter->priv[j]; if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { goto ldv_54679; } else { } i = 0; goto ldv_54681; ldv_54680: priv->aggr_prio_tbl[i].amsdu = tos_to_tid_inv[i]; priv->aggr_prio_tbl[i].ampdu_ap = tos_to_tid_inv[i]; priv->aggr_prio_tbl[i].ampdu_user = tos_to_tid_inv[i]; i = i + 1; ldv_54681: ; if (i <= 7) { goto ldv_54680; } else { } { tmp___0 = 255U; priv->aggr_prio_tbl[6].ampdu_user = tmp___0; tmp = tmp___0; priv->aggr_prio_tbl[6].ampdu_ap = tmp; priv->aggr_prio_tbl[6].amsdu = tmp; tmp___2 = 255U; priv->aggr_prio_tbl[7].ampdu_user = tmp___2; tmp___1 = tmp___2; priv->aggr_prio_tbl[7].ampdu_ap = tmp___1; priv->aggr_prio_tbl[7].amsdu = tmp___1; mwifiex_set_ba_params(priv); mwifiex_reset_11n_rx_seq_num(priv); atomic_set(& priv->wmm.tx_pkts_queued, 0); atomic_set(& priv->wmm.highest_queued_prio, 7); } ldv_54679: j = j + 1; ldv_54684: ; if (j < (int )adapter->priv_num) { goto ldv_54683; } else { } return; } } int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter ) { int i ; struct mwifiex_private *priv ; int tmp ; { i = 0; goto ldv_54692; ldv_54691: priv = adapter->priv[i]; if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0)) { { tmp = atomic_read((atomic_t const *)(& priv->wmm.tx_pkts_queued)); } if (tmp != 0) { return (0); } else { } } else { } i = i + 1; ldv_54692: ; if (i < (int )adapter->priv_num) { goto ldv_54691; } else { } return (1); } } static void mwifiex_wmm_del_pkts_in_ralist_node(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ra_list ) { struct mwifiex_adapter *adapter ; struct sk_buff *skb ; struct sk_buff *tmp ; { adapter = priv->adapter; skb = ra_list->skb_head.next; tmp = skb->next; goto ldv_54702; ldv_54701: { mwifiex_write_data_complete(adapter, skb, 0, -1); skb = tmp; tmp = skb->next; } ldv_54702: ; if ((unsigned long )skb != (unsigned long )((struct sk_buff *)(& ra_list->skb_head))) { goto ldv_54701; } else { } return; } } static void mwifiex_wmm_del_pkts_in_ralist(struct mwifiex_private *priv , struct list_head *ra_list_head ) { struct mwifiex_ra_list_tbl *ra_list ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)ra_list_head->next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr; goto ldv_54714; ldv_54713: { mwifiex_wmm_del_pkts_in_ralist_node(priv, ra_list); __mptr___0 = (struct list_head const *)ra_list->list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr___0; } ldv_54714: ; if ((unsigned long )(& ra_list->list) != (unsigned long )ra_list_head) { goto ldv_54713; } else { } return; } } static void mwifiex_wmm_cleanup_queues(struct mwifiex_private *priv ) { int i ; { i = 0; goto ldv_54721; ldv_54720: { mwifiex_wmm_del_pkts_in_ralist(priv, & priv->wmm.tid_tbl_ptr[i].ra_list); i = i + 1; } ldv_54721: ; if (i <= 7) { goto ldv_54720; } else { } { atomic_set(& priv->wmm.tx_pkts_queued, 0); atomic_set(& priv->wmm.highest_queued_prio, 7); } return; } } static void mwifiex_wmm_delete_all_ralist(struct mwifiex_private *priv ) { struct mwifiex_ra_list_tbl *ra_list ; struct mwifiex_ra_list_tbl *tmp_node ; int i ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { i = 0; goto ldv_54741; ldv_54740: { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_delete_all_ralist"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: ra_list: freeing buf for tid %d\n"; descriptor.lineno = 523U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: ra_list: freeing buf for tid %d\n", i); } } else { } __mptr = (struct list_head const *)priv->wmm.tid_tbl_ptr[i].ra_list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr; __mptr___0 = (struct list_head const *)ra_list->list.next; tmp_node = (struct mwifiex_ra_list_tbl *)__mptr___0; goto ldv_54738; ldv_54737: { list_del(& ra_list->list); kfree((void const *)ra_list); ra_list = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct mwifiex_ra_list_tbl *)__mptr___1; } ldv_54738: ; if ((unsigned long )(& ra_list->list) != (unsigned long )(& priv->wmm.tid_tbl_ptr[i].ra_list)) { goto ldv_54737; } else { } { INIT_LIST_HEAD(& priv->wmm.tid_tbl_ptr[i].ra_list); i = i + 1; } ldv_54741: ; if (i <= 7) { goto ldv_54740; } else { } return; } } void mwifiex_clean_txrx(struct mwifiex_private *priv ) { unsigned long flags ; raw_spinlock_t *tmp ; { { mwifiex_11n_cleanup_reorder_tbl(priv); tmp = spinlock_check(& priv->wmm.ra_list_spinlock); flags = _raw_spin_lock_irqsave(tmp); mwifiex_wmm_cleanup_queues(priv); mwifiex_11n_delete_all_tx_ba_stream_tbl(priv); } if ((unsigned long )(priv->adapter)->if_ops.cleanup_mpa_buf != (unsigned long )((void (*)(struct mwifiex_adapter * ))0)) { { (*((priv->adapter)->if_ops.cleanup_mpa_buf))(priv->adapter); } } else { } { mwifiex_wmm_delete_all_ralist(priv); memcpy((void *)(& tos_to_tid), (void const *)(& ac_to_tid), 8UL); } if ((unsigned long )(priv->adapter)->if_ops.clean_pcie_ring != (unsigned long )((int (*)(struct mwifiex_adapter * ))0) && ! (priv->adapter)->surprise_removed) { { (*((priv->adapter)->if_ops.clean_pcie_ring))(priv->adapter); } } else { } { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); } return; } } static struct mwifiex_ra_list_tbl *mwifiex_wmm_get_ralist_node(struct mwifiex_private *priv , u8 tid , u8 *ra_addr ) { struct mwifiex_ra_list_tbl *ra_list ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)priv->wmm.tid_tbl_ptr[(int )tid].ra_list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr; goto ldv_54761; ldv_54760: { tmp = memcmp((void const *)(& ra_list->ra), (void const *)ra_addr, 6UL); } if (tmp == 0) { return (ra_list); } else { } __mptr___0 = (struct list_head const *)ra_list->list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr___0; ldv_54761: ; if ((unsigned long )(& ra_list->list) != (unsigned long )(& priv->wmm.tid_tbl_ptr[(int )tid].ra_list)) { goto ldv_54760; } else { } return ((struct mwifiex_ra_list_tbl *)0); } } static struct mwifiex_ra_list_tbl *mwifiex_wmm_get_queue_raptr(struct mwifiex_private *priv , u8 tid , u8 *ra_addr ) { struct mwifiex_ra_list_tbl *ra_list ; struct mwifiex_ra_list_tbl *tmp ; { { ra_list = mwifiex_wmm_get_ralist_node(priv, (int )tid, ra_addr); } if ((unsigned long )ra_list != (unsigned long )((struct mwifiex_ra_list_tbl *)0)) { return (ra_list); } else { } { mwifiex_ralist_add(priv, ra_addr); tmp = mwifiex_wmm_get_ralist_node(priv, (int )tid, ra_addr); } return (tmp); } } int mwifiex_is_ralist_valid(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ra_list , int ptr_index ) { struct mwifiex_ra_list_tbl *rlist ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)priv->wmm.tid_tbl_ptr[ptr_index].ra_list.next; rlist = (struct mwifiex_ra_list_tbl *)__mptr; goto ldv_54780; ldv_54779: ; if ((unsigned long )rlist == (unsigned long )ra_list) { return (1); } else { } __mptr___0 = (struct list_head const *)rlist->list.next; rlist = (struct mwifiex_ra_list_tbl *)__mptr___0; ldv_54780: ; if ((unsigned long )(& rlist->list) != (unsigned long )(& priv->wmm.tid_tbl_ptr[ptr_index].ra_list)) { goto ldv_54779; } else { } return (0); } } void mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; u32 tid ; struct mwifiex_ra_list_tbl *ra_list ; u8 ra[6U] ; u8 tid_down ; unsigned long flags ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; raw_spinlock_t *tmp___2 ; struct list_head const *__mptr ; int tmp___3 ; bool tmp___4 ; u8 tmp___5 ; bool tmp___6 ; int tmp___7 ; int tmp___8 ; { adapter = priv->adapter; if ((unsigned int )priv->media_connected == 0U) { { tmp___0 = mwifiex_is_skb_mgmt_frame(skb); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_add_buf_txqueue"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "data: drop packet in disconnect\n"; descriptor.lineno = 646U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: drop packet in disconnect\n"); } } else { } { mwifiex_write_data_complete(adapter, skb, 0, -1); } return; } else { } } else { } { tid = skb->priority; tmp___2 = spinlock_check(& priv->wmm.ra_list_spinlock); flags = _raw_spin_lock_irqsave(tmp___2); tid_down = mwifiex_wmm_downgrade_tid(priv, tid); tmp___5 = mwifiex_queuing_ra_based(priv); } if ((unsigned int )tmp___5 == 0U) { { tmp___6 = mwifiex_is_skb_mgmt_frame(skb); } if (tmp___6) { tmp___7 = 0; } else { tmp___7 = 1; } if (tmp___7) { { tmp___3 = list_empty((struct list_head const *)(& priv->wmm.tid_tbl_ptr[(int )tid_down].ra_list)); } if (tmp___3 == 0) { __mptr = (struct list_head const *)priv->wmm.tid_tbl_ptr[(int )tid_down].ra_list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr; } else { ra_list = (struct mwifiex_ra_list_tbl *)0; } } else { goto _L; } } else { _L: /* CIL Label */ { memcpy((void *)(& ra), (void const *)skb->data, 6UL); } if ((int )ra[0] & 1) { { memset((void *)(& ra), 255, 6UL); } } else { { tmp___4 = mwifiex_is_skb_mgmt_frame(skb); } if ((int )tmp___4) { { memset((void *)(& ra), 255, 6UL); } } else { } } { ra_list = mwifiex_wmm_get_queue_raptr(priv, (int )tid_down, (u8 *)(& ra)); } } if ((unsigned long )ra_list == (unsigned long )((struct mwifiex_ra_list_tbl *)0)) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); mwifiex_write_data_complete(adapter, skb, 0, -1); } return; } else { } { skb_queue_tail(& ra_list->skb_head, skb); ra_list->ba_pkt_count = (u16 )((int )ra_list->ba_pkt_count + 1); ra_list->total_pkt_count = (u16 )((int )ra_list->total_pkt_count + 1); tmp___8 = atomic_read((atomic_t const *)(& priv->wmm.highest_queued_prio)); } if (tmp___8 < (int )tos_to_tid_inv[(int )tid_down]) { { atomic_set(& priv->wmm.highest_queued_prio, (int )tos_to_tid_inv[(int )tid_down]); } } else { } { atomic_inc(& priv->wmm.tx_pkts_queued); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); } return; } } int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv , struct host_cmd_ds_command const *resp ) { u8 *curr ; uint16_t resp_len ; uint16_t tlv_len ; bool valid ; struct mwifiex_ie_types_data *tlv_hdr ; struct mwifiex_ie_types_wmm_queue_status *tlv_wmm_qstatus ; struct ieee_types_wmm_parameter *wmm_param_ie ; struct mwifiex_wmm_ac_status *ac_status ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { { curr = (u8 *)(& resp->params.get_wmm_status); resp_len = resp->size; valid = 1; wmm_param_ie = (struct ieee_types_wmm_parameter *)0; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_wmm_get_status"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: WMM: WMM_GET_STATUS cmdresp received: %d\n"; descriptor.lineno = 720U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: WMM: WMM_GET_STATUS cmdresp received: %d\n", (int )resp_len); } } else { } goto ldv_54821; ldv_54820: tlv_hdr = (struct mwifiex_ie_types_data *)curr; tlv_len = tlv_hdr->header.len; if ((unsigned long )resp_len < (unsigned long )tlv_len + 4UL) { goto ldv_54813; } else { } { if ((int )tlv_hdr->header.type == 272) { goto case_272; } else { } if ((int )tlv_hdr->header.type == 221) { goto case_221; } else { } goto switch_default; case_272: /* CIL Label */ { tlv_wmm_qstatus = (struct mwifiex_ie_types_wmm_queue_status *)tlv_hdr; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_wmm_get_status"; descriptor___0.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___0.format = "info: CMD_RESP: WMM_GET_STATUS: QSTATUS TLV: %d, %d, %d\n"; descriptor___0.lineno = 739U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: CMD_RESP: WMM_GET_STATUS: QSTATUS TLV: %d, %d, %d\n", (int )tlv_wmm_qstatus->queue_index, (int )tlv_wmm_qstatus->flow_required, (int )tlv_wmm_qstatus->disabled); } } else { } ac_status = (struct mwifiex_wmm_ac_status *)(& priv->wmm.ac_status) + (unsigned long )tlv_wmm_qstatus->queue_index; ac_status->disabled = tlv_wmm_qstatus->disabled; ac_status->flow_required = tlv_wmm_qstatus->flow_required; ac_status->flow_created = tlv_wmm_qstatus->flow_created; goto ldv_54816; case_221: /* CIL Label */ { wmm_param_ie = (struct ieee_types_wmm_parameter *)curr + 2U; wmm_param_ie->vend_hdr.len = (unsigned char )tlv_len; wmm_param_ie->vend_hdr.element_id = 221U; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_wmm_get_status"; descriptor___1.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___1.format = "info: CMD_RESP: WMM_GET_STATUS: WMM Parameter Set Count: %d\n"; descriptor___1.lineno = 766U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: CMD_RESP: WMM_GET_STATUS: WMM Parameter Set Count: %d\n", (int )wmm_param_ie->qos_info_bitmap & 15); } } else { } { memcpy((void *)(& priv->curr_bss_params.bss_descriptor.wmm_ie), (void const *)wmm_param_ie, (size_t )((int )wmm_param_ie->vend_hdr.len + 2)); } goto ldv_54816; switch_default: /* CIL Label */ valid = 0; goto ldv_54816; switch_break: /* CIL Label */ ; } ldv_54816: curr = curr + ((unsigned long )tlv_len + 4UL); resp_len = (unsigned int )((int )resp_len - (int )tlv_len) - 4U; ldv_54821: ; if ((unsigned int )resp_len > 3U && (int )valid) { goto ldv_54820; } else { } ldv_54813: { mwifiex_wmm_setup_queue_priorities(priv, wmm_param_ie); mwifiex_wmm_setup_ac_downgrade(priv); } return (0); } } u32 mwifiex_wmm_process_association_req(struct mwifiex_private *priv , u8 **assoc_buf , struct ieee_types_wmm_parameter *wmm_ie , struct ieee80211_ht_cap *ht_cap ) { struct mwifiex_ie_types_wmm_param_set *wmm_tlv ; u32 ret_len ; struct _ddebug descriptor ; long tmp ; { ret_len = 0U; if ((unsigned long )assoc_buf == (unsigned long )((u8 **)0U)) { return (0U); } else { } if ((unsigned long )*assoc_buf == (unsigned long )((u8 *)0U)) { return (0U); } else { } if ((unsigned long )wmm_ie == (unsigned long )((struct ieee_types_wmm_parameter *)0)) { return (0U); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_process_association_req"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "info: WMM: process assoc req: bss->wmm_ie=%#x\n"; descriptor.lineno = 816U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: WMM: process assoc req: bss->wmm_ie=%#x\n", (int )wmm_ie->vend_hdr.element_id); } } else { } if (((unsigned int )priv->wmm_required != 0U || ((unsigned long )ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0) && ((unsigned int )(priv->adapter)->config_bands & 24U) != 0U)) && (unsigned int )wmm_ie->vend_hdr.element_id == 221U) { { wmm_tlv = (struct mwifiex_ie_types_wmm_param_set *)*assoc_buf; wmm_tlv->header.type = (unsigned short )wmm_info_ie[0]; wmm_tlv->header.len = (unsigned short )wmm_info_ie[1]; memcpy((void *)(& wmm_tlv->wmm_ie), (void const *)(& wmm_info_ie) + 2U, (size_t )wmm_tlv->header.len); } if ((int )((signed char )wmm_ie->qos_info_bitmap) < 0) { { memcpy((void *)(& wmm_tlv->wmm_ie) + ((unsigned long )wmm_tlv->header.len + 0xffffffffffffffffUL), (void const *)(& priv->wmm_qosinfo), 1UL); } } else { } ret_len = (u32 )wmm_tlv->header.len + 4U; *assoc_buf = *assoc_buf + (unsigned long )ret_len; } else { } return (ret_len); } } u8 mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv , struct sk_buff const *skb ) { u8 ret_val ; struct timeval out_tstamp ; struct timeval in_tstamp ; u32 queue_delay ; u32 _min1 ; u32 _min2 ; struct _ddebug descriptor ; long tmp ; { { do_gettimeofday(& out_tstamp); in_tstamp = ns_to_timeval(skb->tstamp.tv64); queue_delay = (u32 )(out_tstamp.tv_sec - in_tstamp.tv_sec) * 1000U; queue_delay = queue_delay + (u32 )((out_tstamp.tv_usec - in_tstamp.tv_usec) / 1000L); _min1 = queue_delay; _min2 = priv->wmm.drv_pkt_delay_max; ret_val = (unsigned char )((_min1 < _min2 ? _min1 : _min2) >> 1); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_wmm_compute_drv_pkt_delay"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "data: WMM: Pkt Delay: %d ms, %d ms sent to FW\n"; descriptor.lineno = 874U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "data: WMM: Pkt Delay: %d ms, %d ms sent to FW\n", queue_delay, (int )ret_val); } } else { } return (ret_val); } } static struct mwifiex_ra_list_tbl *mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter , struct mwifiex_private **priv , int *tid ) { struct mwifiex_private *priv_tmp ; struct mwifiex_ra_list_tbl *ptr ; struct mwifiex_tid_tbl *tid_ptr ; atomic_t *hqp ; unsigned long flags_bss ; unsigned long flags_ra ; int i ; int j ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; int tmp___0 ; raw_spinlock_t *tmp___1 ; struct list_head const *__mptr___0 ; int tmp___2 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; int tmp___3 ; { j = (int )adapter->priv_num + -1; goto ldv_54884; ldv_54883: { tmp = spinlock_check(& adapter->bss_prio_tbl[j].bss_prio_lock); flags_bss = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)adapter->bss_prio_tbl[j].bss_prio_head.next; adapter->bss_prio_tbl[j].bss_prio_cur = (struct mwifiex_bss_prio_node *)__mptr; } goto ldv_54881; ldv_54880: { priv_tmp = (adapter->bss_prio_tbl[j].bss_prio_cur)->priv; tmp___0 = atomic_read((atomic_t const *)(& priv_tmp->wmm.tx_pkts_queued)); } if (tmp___0 == 0) { goto ldv_54865; } else { } { hqp = & priv_tmp->wmm.highest_queued_prio; i = atomic_read((atomic_t const *)hqp); } goto ldv_54878; ldv_54877: { tmp___1 = spinlock_check(& priv_tmp->wmm.ra_list_spinlock); flags_ra = _raw_spin_lock_irqsave(tmp___1); tid_ptr = (struct mwifiex_tid_tbl *)(& priv_tmp->wmm.tid_tbl_ptr) + (unsigned long )tos_to_tid[i]; __mptr___0 = (struct list_head const *)tid_ptr->ra_list.next; ptr = (struct mwifiex_ra_list_tbl *)__mptr___0; } goto ldv_54875; ldv_54874: { tmp___2 = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp___2 == 0) { goto found; } else { } __mptr___1 = (struct list_head const *)ptr->list.next; ptr = (struct mwifiex_ra_list_tbl *)__mptr___1; ldv_54875: ; if ((unsigned long )ptr != (unsigned long )tid_ptr) { goto ldv_54874; } else { } { spin_unlock_irqrestore(& priv_tmp->wmm.ra_list_spinlock, flags_ra); i = i - 1; } ldv_54878: ; if (i >= 0) { goto ldv_54877; } else { } ldv_54865: __mptr___2 = (struct list_head const *)(adapter->bss_prio_tbl[j].bss_prio_cur)->list.next; adapter->bss_prio_tbl[j].bss_prio_cur = (struct mwifiex_bss_prio_node *)__mptr___2; ldv_54881: ; if ((unsigned long )(& (adapter->bss_prio_tbl[j].bss_prio_cur)->list) != (unsigned long )(& adapter->bss_prio_tbl[j].bss_prio_head)) { goto ldv_54880; } else { } { spin_unlock_irqrestore(& adapter->bss_prio_tbl[j].bss_prio_lock, flags_bss); j = j - 1; } ldv_54884: ; if (j >= 0) { goto ldv_54883; } else { } return ((struct mwifiex_ra_list_tbl *)0); found: { tmp___3 = atomic_read((atomic_t const *)hqp); } if (tmp___3 > i) { { atomic_set(hqp, i); } } else { } { spin_unlock_irqrestore(& priv_tmp->wmm.ra_list_spinlock, flags_ra); spin_unlock_irqrestore(& adapter->bss_prio_tbl[j].bss_prio_lock, flags_bss); *priv = priv_tmp; *tid = (int )tos_to_tid[i]; } return (ptr); } } void mwifiex_rotate_priolists(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ra , int tid ) { struct mwifiex_adapter *adapter ; struct mwifiex_bss_prio_tbl *tbl ; struct mwifiex_tid_tbl *tid_ptr ; unsigned long flags ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; { { adapter = priv->adapter; tbl = (struct mwifiex_bss_prio_tbl *)(& adapter->bss_prio_tbl); tid_ptr = (struct mwifiex_tid_tbl *)(& priv->wmm.tid_tbl_ptr) + (unsigned long )tid; tmp = spinlock_check(& (tbl + (unsigned long )priv->bss_priority)->bss_prio_lock); flags = _raw_spin_lock_irqsave(tmp); list_move(& (tbl + (unsigned long )priv->bss_priority)->bss_prio_head, & ((tbl + (unsigned long )priv->bss_priority)->bss_prio_cur)->list); spin_unlock_irqrestore(& (tbl + (unsigned long )priv->bss_priority)->bss_prio_lock, flags); tmp___0 = spinlock_check(& priv->wmm.ra_list_spinlock); flags = _raw_spin_lock_irqsave(tmp___0); tmp___1 = mwifiex_is_ralist_valid(priv, ra, tid); } if (tmp___1 != 0) { { priv->wmm.packets_out[tid] = priv->wmm.packets_out[tid] + 1U; list_move(& tid_ptr->ra_list, & ra->list); } } else { } { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); } return; } } static int mwifiex_is_11n_aggragation_possible(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ptr , int max_buf_size ) { int count ; int total_size ; struct sk_buff *skb ; struct sk_buff *tmp ; int max_amsdu_size ; int __min1 ; int __min2 ; { count = 0; total_size = 0; if (((unsigned int )priv->bss_role == 1U && (unsigned int )priv->ap_11n_enabled != 0U) && ptr->is_11n_enabled != 0U) { __min1 = (int )ptr->max_amsdu; __min2 = max_buf_size; max_amsdu_size = __min1 < __min2 ? __min1 : __min2; } else { max_amsdu_size = max_buf_size; } skb = ptr->skb_head.next; tmp = skb->next; goto ldv_54916; ldv_54915: total_size = (int )((unsigned int )total_size + skb->len); if (total_size >= max_amsdu_size) { goto ldv_54914; } else { } count = count + 1; if (count > 1) { return (1); } else { } skb = tmp; tmp = skb->next; ldv_54916: ; if ((unsigned long )skb != (unsigned long )((struct sk_buff *)(& ptr->skb_head))) { goto ldv_54915; } else { } ldv_54914: ; return (0); } } static void mwifiex_send_single_packet(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ptr , int ptr_index , unsigned long ra_list_flags ) { struct sk_buff *skb ; struct sk_buff *skb_next ; struct mwifiex_tx_param tx_param ; struct mwifiex_adapter *adapter ; struct mwifiex_txinfo *tx_info ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; int tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; int tmp___5 ; { { adapter = priv->adapter; tmp___0 = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp___0 != 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_send_single_packet"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "data: nothing to send\n"; descriptor.lineno = 1035U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: nothing to send\n"); } } else { } return; } else { } { skb = skb_dequeue(& ptr->skb_head); tx_info = MWIFIEX_SKB_TXCB(skb); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_send_single_packet"; descriptor___0.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor___0.format = "data: dequeuing the packet %p %p\n"; descriptor___0.lineno = 1042U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "data: dequeuing the packet %p %p\n", ptr, skb); } } else { } { ptr->total_pkt_count = (u16 )((int )ptr->total_pkt_count - 1); tmp___2 = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp___2 == 0) { { skb_next = skb_peek((struct sk_buff_head const *)(& ptr->skb_head)); } } else { skb_next = (struct sk_buff *)0; } { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); tx_param.next_pkt_len = (unsigned long )skb_next != (unsigned long )((struct sk_buff *)0) ? skb_next->len + 16U : 0U; tmp___5 = mwifiex_process_tx(priv, skb, & tx_param); } if (tmp___5 == -16) { { tmp___3 = spinlock_check(& priv->wmm.ra_list_spinlock); ra_list_flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = mwifiex_is_ralist_valid(priv, ptr, ptr_index); } if (tmp___4 == 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); mwifiex_write_data_complete(adapter, skb, 0, -1); } return; } else { } { skb_queue_tail(& ptr->skb_head, skb); ptr->total_pkt_count = (u16 )((int )ptr->total_pkt_count + 1); ptr->ba_pkt_count = (u16 )((int )ptr->ba_pkt_count + 1); tx_info->flags = (u8 )((unsigned int )tx_info->flags | 1U); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } } else { { mwifiex_rotate_priolists(priv, ptr, ptr_index); atomic_dec(& priv->wmm.tx_pkts_queued); } } return; } } static int mwifiex_is_ptr_processed(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ptr ) { struct sk_buff *skb ; struct mwifiex_txinfo *tx_info ; int tmp ; { { tmp = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp != 0) { return (0); } else { } { skb = skb_peek((struct sk_buff_head const *)(& ptr->skb_head)); tx_info = MWIFIEX_SKB_TXCB(skb); } if ((int )tx_info->flags & 1) { return (1); } else { } return (0); } } static void mwifiex_send_processed_packet(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *ptr , int ptr_index , unsigned long ra_list_flags ) { struct mwifiex_tx_param tx_param ; struct mwifiex_adapter *adapter ; int ret ; struct sk_buff *skb ; struct sk_buff *skb_next ; struct mwifiex_txinfo *tx_info ; int tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; raw_spinlock_t *tmp___2 ; int tmp___3 ; { { adapter = priv->adapter; ret = -1; tmp = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp != 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } return; } else { } { skb = skb_dequeue(& ptr->skb_head); tmp___0 = skb_queue_empty((struct sk_buff_head const *)(& ptr->skb_head)); } if (tmp___0 == 0) { { skb_next = skb_peek((struct sk_buff_head const *)(& ptr->skb_head)); } } else { skb_next = (struct sk_buff *)0; } { tx_info = MWIFIEX_SKB_TXCB(skb); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } if ((unsigned int )adapter->iface_type == 2U) { { adapter->data_sent = 1U; ret = (*(adapter->if_ops.host_to_card))(adapter, 2, skb, (struct mwifiex_tx_param *)0); } } else { { tx_param.next_pkt_len = (unsigned long )skb_next != (unsigned long )((struct sk_buff *)0) ? skb_next->len + 16U : 0U; ret = (*(adapter->if_ops.host_to_card))(adapter, 0, skb, & tx_param); } } { if (ret == -16) { goto case_neg_16; } else { } if (ret == -1) { goto case_neg_1; } else { } if (ret == -115) { goto case_neg_115; } else { } goto switch_default; case_neg_16: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_send_processed_packet"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "data: -EBUSY is returned\n"; descriptor.lineno = 1150U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: -EBUSY is returned\n"); } } else { } { tmp___2 = spinlock_check(& priv->wmm.ra_list_spinlock); ra_list_flags = _raw_spin_lock_irqsave(tmp___2); tmp___3 = mwifiex_is_ralist_valid(priv, ptr, ptr_index); } if (tmp___3 == 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); mwifiex_write_data_complete(adapter, skb, 0, -1); } return; } else { } { skb_queue_tail(& ptr->skb_head, skb); tx_info->flags = (u8 )((unsigned int )tx_info->flags | 1U); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } goto ldv_54958; case_neg_1: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } { dev_err((struct device const *)adapter->dev, "host_to_card failed: %#x\n", ret); adapter->dbg.num_tx_host_to_card_failure = adapter->dbg.num_tx_host_to_card_failure + 1U; mwifiex_write_data_complete(adapter, skb, 0, ret); } goto ldv_54958; case_neg_115: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } switch_default: /* CIL Label */ ; goto ldv_54958; switch_break: /* CIL Label */ ; } ldv_54958: ; if (ret != -16) { { mwifiex_rotate_priolists(priv, ptr, ptr_index); atomic_dec(& priv->wmm.tx_pkts_queued); } } else { } return; } } static int mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter ) { struct mwifiex_ra_list_tbl *ptr ; struct mwifiex_private *priv ; int ptr_index ; u8 ra[6U] ; int tid_del ; int tid ; unsigned long flags ; struct _ddebug descriptor ; long tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; int tmp___2 ; u8 tmp___3 ; u8 tmp___4 ; u8 tmp___5 ; u8 tmp___6 ; int tmp___7 ; int tmp___8 ; { { priv = (struct mwifiex_private *)0; ptr_index = 0; tid_del = 0; tid = 0; ptr = mwifiex_wmm_get_highest_priolist_ptr(adapter, & priv, & ptr_index); } if ((unsigned long )ptr == (unsigned long )((struct mwifiex_ra_list_tbl *)0)) { return (-1); } else { } { tid = mwifiex_get_tid(ptr); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_dequeue_tx_packet"; descriptor.filename = "drivers/net/wireless/mwifiex/wmm.c"; descriptor.format = "data: tid=%d\n"; descriptor.lineno = 1205U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: tid=%d\n", tid); } } else { } { tmp___0 = spinlock_check(& priv->wmm.ra_list_spinlock); flags = _raw_spin_lock_irqsave(tmp___0); tmp___1 = mwifiex_is_ralist_valid(priv, ptr, ptr_index); } if (tmp___1 == 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); } return (-1); } else { } { tmp___2 = mwifiex_is_ptr_processed(priv, ptr); } if (tmp___2 != 0) { { mwifiex_send_processed_packet(priv, ptr, ptr_index, flags); } return (0); } else { } if (ptr->is_11n_enabled == 0U) { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } else { { tmp___8 = mwifiex_is_ba_stream_setup(priv, ptr, tid); } if (tmp___8 != 0) { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } else if ((unsigned int )priv->wps.session_enable != 0U) { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } else if ((unsigned int )*((unsigned short *)priv + 358UL) != 0U && (unsigned int )priv->wpa_is_gtk_set == 0U) { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } else { { tmp___5 = mwifiex_is_ampdu_allowed(priv, tid); } if ((unsigned int )tmp___5 != 0U && (int )ptr->ba_pkt_count > (int )((unsigned short )ptr->ba_packet_thr)) { { tmp___4 = mwifiex_space_avail_for_new_ba_stream(adapter); } if ((unsigned int )tmp___4 != 0U) { { mwifiex_create_ba_tbl(priv, (u8 *)(& ptr->ra), tid, 1); mwifiex_send_addba(priv, tid, (u8 *)(& ptr->ra)); } } else { { tmp___3 = mwifiex_find_stream_to_delete(priv, tid, & tid_del, (u8 *)(& ra)); } if ((unsigned int )tmp___3 != 0U) { { mwifiex_create_ba_tbl(priv, (u8 *)(& ptr->ra), tid, 1); mwifiex_send_delba(priv, tid_del, (u8 *)(& ra), 1); } } else { } } } else { } if ((int )enable_tx_amsdu) { { tmp___6 = mwifiex_is_amsdu_allowed(priv, tid); } if ((unsigned int )tmp___6 != 0U) { { tmp___7 = mwifiex_is_11n_aggragation_possible(priv, ptr, (int )adapter->tx_buf_size); } if (tmp___7 != 0) { { mwifiex_11n_aggregate_pkt(priv, ptr, ptr_index, flags); } } else { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } } else { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } } else { { mwifiex_send_single_packet(priv, ptr, ptr_index, flags); } } } } return (0); } } void mwifiex_wmm_process_tx(struct mwifiex_adapter *adapter ) { int tmp ; int tmp___0 ; { ldv_54981: ; if ((unsigned int )adapter->data_sent != 0U || (unsigned int )adapter->tx_lock_flag != 0U) { goto ldv_54980; } else { } { tmp = mwifiex_dequeue_tx_packet(adapter); } if (tmp != 0) { goto ldv_54980; } else { } { tmp___0 = mwifiex_wmm_lists_empty(adapter); } if (tmp___0 == 0) { goto ldv_54981; } else { } ldv_54980: ; return; } } __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static bool ether_addr_equal(u8 const *addr1 , u8 const *addr2 ) { u32 fold ; { fold = ((unsigned int )*((u32 const *)addr1) ^ (unsigned int )*((u32 const *)addr2)) | (unsigned int )((int )((unsigned short )*((u16 const *)addr1 + 4U)) ^ (int )((unsigned short )*((u16 const *)addr2 + 4U))); return (fold == 0U); } } __inline static bool ether_addr_equal_unaligned(u8 const *addr1 , u8 const *addr2 ) { bool tmp ; { { tmp = ether_addr_equal(addr1, addr2); } return (tmp); } } void mwifiex_del_ba_tbl(struct mwifiex_private *priv , int tid , u8 *peer_mac , u8 type , int initiator ) ; int mwifiex_ret_11n_delba(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_ds_11n_tx_cfg *txcfg ) ; int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u8 **buffer ) ; void mwifiex_fill_cap_info(struct mwifiex_private *priv , u8 radio_type , struct mwifiex_ie_types_htcap *ht_cap ) ; void mwifiex_11n_delete_tx_ba_stream_tbl_entry(struct mwifiex_private *priv , struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ) ; void mwifiex_11n_delete_ba_stream(struct mwifiex_private *priv , u8 *del_ba ) ; int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , int cmd_action , u16 *buf_size ) ; int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd , int cmd_action , struct mwifiex_ds_11n_amsdu_aggr_ctrl *aa_ctrl ) ; void mwifiex_del_tx_ba_stream_tbl_by_ra(struct mwifiex_private *priv , u8 *ra ) ; void mwifiex_fill_cap_info(struct mwifiex_private *priv , u8 radio_type , struct mwifiex_ie_types_htcap *ht_cap ) { uint16_t ht_ext_cap ; struct ieee80211_supported_band *sband ; { { ht_ext_cap = ht_cap->ht_cap.extended_ht_cap_info; sband = ((priv->wdev)->wiphy)->bands[(int )radio_type]; ht_cap->ht_cap.ampdu_params_info = (u8 )(((int )((signed char )sband->ht_cap.ampdu_factor) & 3) | ((int )((signed char )((int )sband->ht_cap.ampdu_density << 2)) & 28)); memcpy((void *)(& ht_cap->ht_cap.mcs), (void const *)(& sband->ht_cap.mcs), 16UL); } if (priv->bss_mode == 2U || (((int )sband->ht_cap.cap & 2) != 0 && (unsigned int )(priv->adapter)->sec_chan_offset != 0U)) { ht_cap->ht_cap.mcs.rx_mask[4] = (u8 )((unsigned int )ht_cap->ht_cap.mcs.rx_mask[4] | 1U); } else { } ht_ext_cap = (unsigned int )ht_ext_cap & 63487U; ht_cap->ht_cap.cap_info = sband->ht_cap.cap; ht_cap->ht_cap.extended_ht_cap_info = ht_ext_cap; return; } } static struct mwifiex_tx_ba_stream_tbl *mwifiex_get_ba_status(struct mwifiex_private *priv , enum mwifiex_ba_status ba_status ) { struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { { tmp = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; } goto ldv_54558; ldv_54557: ; if ((unsigned int )tx_ba_tsr_tbl->ba_status == (unsigned int )ba_status) { { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return (tx_ba_tsr_tbl); } else { } __mptr___0 = (struct list_head const *)tx_ba_tsr_tbl->list.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; ldv_54558: ; if ((unsigned long )(& tx_ba_tsr_tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54557; } else { } { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return ((struct mwifiex_tx_ba_stream_tbl *)0); } } int mwifiex_ret_11n_delba(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { int tid ; struct mwifiex_tx_ba_stream_tbl *tx_ba_tbl ; struct host_cmd_ds_11n_delba *del_ba ; uint16_t del_ba_param_set ; { del_ba = & resp->params.del_ba; del_ba_param_set = del_ba->del_ba_param_set; tid = (int )del_ba_param_set >> 12; if ((unsigned int )del_ba->del_result == 0U) { { mwifiex_del_ba_tbl(priv, tid, (u8 *)(& del_ba->peer_mac_addr), 1, (int )(((unsigned long )del_ba_param_set & 2048UL) >> 11)); tx_ba_tbl = mwifiex_get_ba_status(priv, 1); } if ((unsigned long )tx_ba_tbl != (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { mwifiex_send_addba(priv, tx_ba_tbl->tid, (u8 *)(& tx_ba_tbl->ra)); } } else { } } else { if (((unsigned long )del_ba_param_set & 2048UL) >> 11 == 0UL) { return (0); } else { } { mwifiex_create_ba_tbl(priv, (u8 *)(& del_ba->peer_mac_addr), tid, 1); tx_ba_tbl = mwifiex_get_ba_status(priv, 1); } if ((unsigned long )tx_ba_tbl != (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { mwifiex_del_ba_tbl(priv, tx_ba_tbl->tid, (u8 *)(& tx_ba_tbl->ra), 1, 1); } } else { } } return (0); } } int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { int tid ; struct host_cmd_ds_11n_addba_rsp *add_ba_rsp ; struct mwifiex_tx_ba_stream_tbl *tx_ba_tbl ; struct _ddebug descriptor ; long tmp ; { add_ba_rsp = & resp->params.add_ba_rsp; add_ba_rsp->ssn = (unsigned int )add_ba_rsp->ssn & 65520U; tid = ((int )add_ba_rsp->block_ack_param_set & 60) >> 2; if ((unsigned int )add_ba_rsp->status_code == 0U) { { tx_ba_tbl = mwifiex_get_ba_tbl(priv, tid, (u8 *)(& add_ba_rsp->peer_mac_addr)); } if ((unsigned long )tx_ba_tbl != (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_11n_addba_req"; descriptor.filename = "drivers/net/wireless/mwifiex/11n.c"; descriptor.format = "info: BA stream complete\n"; descriptor.lineno = 164U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: BA stream complete\n"); } } else { } tx_ba_tbl->ba_status = 2; } else { { dev_err((struct device const *)(priv->adapter)->dev, "BA stream not created\n"); } } } else { { mwifiex_del_ba_tbl(priv, tid, (u8 *)(& add_ba_rsp->peer_mac_addr), 1, 1); } if ((unsigned int )add_ba_rsp->add_rsp_result != 2U) { priv->aggr_prio_tbl[tid].ampdu_ap = 255U; } else { } } return (0); } } int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , int cmd_action , u16 *buf_size ) { struct host_cmd_ds_txbuf_cfg *tx_buf ; u16 action ; struct _ddebug descriptor ; long tmp ; { tx_buf = & cmd->params.tx_buf; action = (unsigned short )cmd_action; cmd->command = 217U; cmd->size = 16U; tx_buf->action = action; { if ((int )action == 1) { goto case_1; } else { } if ((int )action == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_recfg_tx_buf"; descriptor.filename = "drivers/net/wireless/mwifiex/11n.c"; descriptor.format = "cmd: set tx_buf=%d\n"; descriptor.lineno = 201U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: set tx_buf=%d\n", (int )*buf_size); } } else { } tx_buf->buff_size = *buf_size; goto ldv_54588; case_0: /* CIL Label */ ; switch_default: /* CIL Label */ tx_buf->buff_size = 0U; goto ldv_54588; switch_break: /* CIL Label */ ; } ldv_54588: ; return (0); } } int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd , int cmd_action , struct mwifiex_ds_11n_amsdu_aggr_ctrl *aa_ctrl ) { struct host_cmd_ds_amsdu_aggr_ctrl *amsdu_ctrl ; u16 action ; { amsdu_ctrl = & cmd->params.amsdu_aggr_ctrl; action = (unsigned short )cmd_action; cmd->command = 223U; cmd->size = 14U; amsdu_ctrl->action = action; { if ((int )action == 1) { goto case_1; } else { } if ((int )action == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ amsdu_ctrl->enable = aa_ctrl->enable; amsdu_ctrl->curr_buf_size = 0U; goto ldv_54599; case_0: /* CIL Label */ ; switch_default: /* CIL Label */ amsdu_ctrl->curr_buf_size = 0U; goto ldv_54599; switch_break: /* CIL Label */ ; } ldv_54599: ; return (0); } } int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_ds_11n_tx_cfg *txcfg ) { struct host_cmd_ds_11n_cfg *htcfg ; { htcfg = & cmd->params.htcfg; cmd->command = 205U; cmd->size = 16U; htcfg->action = cmd_action; htcfg->ht_tx_cap = txcfg->tx_htcap; htcfg->ht_tx_info = txcfg->tx_htinfo; if ((priv->adapter)->is_hw_11ac_capable != 0U) { htcfg->misc_config = txcfg->misc_config; } else { } return (0); } } int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u8 **buffer ) { struct mwifiex_ie_types_htcap *ht_cap ; struct mwifiex_ie_types_htinfo *ht_info ; struct mwifiex_ie_types_chan_list_param_set *chan_list ; struct mwifiex_ie_types_2040bssco *bss_co_2040 ; struct mwifiex_ie_types_extcap *ext_cap ; int ret_len ; struct ieee80211_supported_band *sband ; struct ieee_types_header *hdr ; u8 radio_type ; { ret_len = 0; if ((unsigned long )buffer == (unsigned long )((u8 **)0U) || (unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (ret_len); } else { } { radio_type = mwifiex_band_to_radio_type((int )((unsigned char )bss_desc->bss_band)); sband = ((priv->wdev)->wiphy)->bands[(int )radio_type]; } if ((unsigned long )bss_desc->bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)) { { ht_cap = (struct mwifiex_ie_types_htcap *)*buffer; memset((void *)ht_cap, 0, 30UL); ht_cap->header.type = 45U; ht_cap->header.len = 26U; memcpy((void *)ht_cap + 4U, (void const *)bss_desc->bcn_ht_cap, (size_t )ht_cap->header.len); mwifiex_fill_cap_info(priv, (int )radio_type, ht_cap); *buffer = *buffer + 30UL; ret_len = (int )((unsigned int )ret_len + 30U); } } else { } if ((unsigned long )bss_desc->bcn_ht_oper != (unsigned long )((struct ieee80211_ht_operation *)0)) { if (priv->bss_mode == 1U) { { ht_info = (struct mwifiex_ie_types_htinfo *)*buffer; memset((void *)ht_info, 0, 26UL); ht_info->header.type = 61U; ht_info->header.len = 22U; memcpy((void *)ht_info + 4U, (void const *)bss_desc->bcn_ht_oper + 2U, (size_t )ht_info->header.len); } if (((int )sband->ht_cap.cap & 2) == 0) { ht_info->ht_oper.ht_param = (unsigned int )ht_info->ht_oper.ht_param & 248U; } else { } *buffer = *buffer + 26UL; ret_len = (int )((unsigned int )ret_len + 26U); } else { } { chan_list = (struct mwifiex_ie_types_chan_list_param_set *)*buffer; memset((void *)chan_list, 0, 11UL); chan_list->header.type = 257U; chan_list->header.len = 7U; chan_list->chan_scan_param[0].chan_number = (bss_desc->bcn_ht_oper)->primary_chan; chan_list->chan_scan_param[0].radio_type = mwifiex_band_to_radio_type((int )((unsigned char )bss_desc->bss_band)); } if (((int )sband->ht_cap.cap & 2) != 0 && ((int )(bss_desc->bcn_ht_oper)->ht_param & 4) != 0) { chan_list->chan_scan_param[0].radio_type = (u8 )((int )((signed char )chan_list->chan_scan_param[0].radio_type) | (int )((signed char )(((int )(bss_desc->bcn_ht_oper)->ht_param & 3) << 4))); } else { } *buffer = *buffer + 11UL; ret_len = (int )((unsigned int )ret_len + 11U); } else { } if ((unsigned long )bss_desc->bcn_bss_co_2040 != (unsigned long )((u8 *)0U)) { { bss_co_2040 = (struct mwifiex_ie_types_2040bssco *)*buffer; memset((void *)bss_co_2040, 0, 5UL); bss_co_2040->header.type = 72U; bss_co_2040->header.len = 1U; memcpy((void *)bss_co_2040 + 4U, (void const *)bss_desc->bcn_bss_co_2040 + 2U, (size_t )bss_co_2040->header.len); *buffer = *buffer + 5UL; ret_len = (int )((unsigned int )ret_len + 5U); } } else { } if ((unsigned long )bss_desc->bcn_ext_cap != (unsigned long )((u8 *)0U)) { { hdr = (struct ieee_types_header *)bss_desc->bcn_ext_cap; ext_cap = (struct mwifiex_ie_types_extcap *)*buffer; memset((void *)ext_cap, 0, 4UL); ext_cap->header.type = 127U; ext_cap->header.len = (unsigned short )hdr->len; memcpy((void *)(& ext_cap->ext_capab), (void const *)bss_desc->bcn_ext_cap + 2U, (size_t )ext_cap->header.len); } if ((unsigned int )hdr->len > 3U && (int )((signed char )ext_cap->ext_capab[3]) < 0) { priv->hs2_enabled = 1; } else { priv->hs2_enabled = 0; } *buffer = *buffer + ((unsigned long )hdr->len + 4UL); ret_len = (int )(((unsigned int )ret_len + (unsigned int )hdr->len) + 4U); } else { } return (ret_len); } } static int mwifiex_is_tx_ba_stream_ptr_valid(struct mwifiex_private *priv , struct mwifiex_tx_ba_stream_tbl *tx_tbl_ptr ) { struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; goto ldv_54633; ldv_54632: ; if ((unsigned long )tx_ba_tsr_tbl == (unsigned long )tx_tbl_ptr) { return (1); } else { } __mptr___0 = (struct list_head const *)tx_ba_tsr_tbl->list.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; ldv_54633: ; if ((unsigned long )(& tx_ba_tsr_tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54632; } else { } return (0); } } void mwifiex_11n_delete_tx_ba_stream_tbl_entry(struct mwifiex_private *priv , struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ) { int tmp ; struct _ddebug descriptor ; long tmp___0 ; { if ((unsigned long )tx_ba_tsr_tbl == (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { tmp = mwifiex_is_tx_ba_stream_ptr_valid(priv, tx_ba_tsr_tbl); } if (tmp != 0) { return; } else { } } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_11n_delete_tx_ba_stream_tbl_entry"; descriptor.filename = "drivers/net/wireless/mwifiex/11n.c"; descriptor.format = "info: tx_ba_tsr_tbl %p\n"; descriptor.lineno = 444U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: tx_ba_tsr_tbl %p\n", tx_ba_tsr_tbl); } } else { } { list_del(& tx_ba_tsr_tbl->list); kfree((void const *)tx_ba_tsr_tbl); } return; } } void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv ) { int i ; struct mwifiex_tx_ba_stream_tbl *del_tbl_ptr ; struct mwifiex_tx_ba_stream_tbl *tmp_node ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { { tmp = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; del_tbl_ptr = (struct mwifiex_tx_ba_stream_tbl *)__mptr; __mptr___0 = (struct list_head const *)del_tbl_ptr->list.next; tmp_node = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; } goto ldv_54658; ldv_54657: { mwifiex_11n_delete_tx_ba_stream_tbl_entry(priv, del_tbl_ptr); del_tbl_ptr = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct mwifiex_tx_ba_stream_tbl *)__mptr___1; } ldv_54658: ; if ((unsigned long )(& del_tbl_ptr->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54657; } else { } { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); INIT_LIST_HEAD(& priv->tx_ba_stream_tbl_ptr); i = 0; } goto ldv_54661; ldv_54660: priv->aggr_prio_tbl[i].ampdu_ap = priv->aggr_prio_tbl[i].ampdu_user; i = i + 1; ldv_54661: ; if (i <= 7) { goto ldv_54660; } else { } return; } } struct mwifiex_tx_ba_stream_tbl *mwifiex_get_ba_tbl(struct mwifiex_private *priv , int tid , u8 *ra ) { struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; bool tmp___0 ; struct list_head const *__mptr___0 ; { { tmp = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; } goto ldv_54678; ldv_54677: { tmp___0 = ether_addr_equal_unaligned((u8 const *)(& tx_ba_tsr_tbl->ra), (u8 const *)ra); } if ((int )tmp___0 && tx_ba_tsr_tbl->tid == tid) { { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return (tx_ba_tsr_tbl); } else { } __mptr___0 = (struct list_head const *)tx_ba_tsr_tbl->list.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; ldv_54678: ; if ((unsigned long )(& tx_ba_tsr_tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54677; } else { } { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return ((struct mwifiex_tx_ba_stream_tbl *)0); } } void mwifiex_create_ba_tbl(struct mwifiex_private *priv , u8 *ra , int tid , enum mwifiex_ba_status ba_status ) { struct mwifiex_tx_ba_stream_tbl *new_node ; unsigned long flags ; void *tmp ; raw_spinlock_t *tmp___0 ; struct mwifiex_tx_ba_stream_tbl *tmp___1 ; { { tmp___1 = mwifiex_get_ba_tbl(priv, tid, ra); } if ((unsigned long )tmp___1 == (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { tmp = kzalloc(32UL, 32U); new_node = (struct mwifiex_tx_ba_stream_tbl *)tmp; } if ((unsigned long )new_node == (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { return; } else { } { INIT_LIST_HEAD(& new_node->list); new_node->tid = tid; new_node->ba_status = ba_status; memcpy((void *)(& new_node->ra), (void const *)ra, 6UL); tmp___0 = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___0); list_add_tail(& new_node->list, & priv->tx_ba_stream_tbl_ptr); spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } } else { } return; } } int mwifiex_send_addba(struct mwifiex_private *priv , int tid , u8 *peer_mac ) { struct host_cmd_ds_11n_addba_req add_ba_req ; u8 dialog_tok ; int ret ; struct _ddebug descriptor ; long tmp ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_send_addba"; descriptor.filename = "drivers/net/wireless/mwifiex/11n.c"; descriptor.format = "cmd: %s: tid %d\n"; descriptor.lineno = 533U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: %s: tid %d\n", "mwifiex_send_addba", tid); } } else { } add_ba_req.block_ack_param_set = (unsigned int )(((int )((unsigned short )tid) << 2U) | ((int )((unsigned short )priv->add_ba_param.tx_win_size) << 6U)) | 2U; add_ba_req.block_ack_tmo = (unsigned short )priv->add_ba_param.timeout; dialog_tok = (u8 )((int )dialog_tok + 1); if ((unsigned int )dialog_tok == 0U) { dialog_tok = 1U; } else { } { add_ba_req.dialog_token = dialog_tok; memcpy((void *)(& add_ba_req.peer_mac_addr), (void const *)peer_mac, 6UL); ret = mwifiex_send_cmd_async(priv, 206, 0, 0U, (void *)(& add_ba_req)); } return (ret); } } int mwifiex_send_delba(struct mwifiex_private *priv , int tid , u8 *peer_mac , int initiator ) { struct host_cmd_ds_11n_delba delba ; int ret ; uint16_t del_ba_param_set ; { { memset((void *)(& delba), 0, 12UL); delba.del_ba_param_set = (int )((unsigned short )tid) << 12U; del_ba_param_set = delba.del_ba_param_set; } if (initiator != 0) { del_ba_param_set = (uint16_t )((unsigned int )del_ba_param_set | 2048U); } else { del_ba_param_set = (unsigned int )del_ba_param_set & 63487U; } { memcpy((void *)(& delba.peer_mac_addr), (void const *)peer_mac, 6UL); ret = mwifiex_send_cmd_async(priv, 208, 1, 0U, (void *)(& delba)); } return (ret); } } void mwifiex_11n_delete_ba_stream(struct mwifiex_private *priv , u8 *del_ba ) { struct host_cmd_ds_11n_delba *cmd_del_ba ; uint16_t del_ba_param_set ; int tid ; { { cmd_del_ba = (struct host_cmd_ds_11n_delba *)del_ba; del_ba_param_set = cmd_del_ba->del_ba_param_set; tid = (int )del_ba_param_set >> 12; mwifiex_del_ba_tbl(priv, tid, (u8 *)(& cmd_del_ba->peer_mac_addr), 2, (int )(((unsigned long )del_ba_param_set & 2048UL) >> 11)); } return; } } int mwifiex_get_rx_reorder_tbl(struct mwifiex_private *priv , struct mwifiex_ds_rx_reorder_tbl *buf ) { int i ; struct mwifiex_ds_rx_reorder_tbl *rx_reo_tbl ; struct mwifiex_rx_reorder_tbl *rx_reorder_tbl_ptr ; int count ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { { rx_reo_tbl = buf; count = 0; tmp = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->rx_reorder_tbl_ptr.next; rx_reorder_tbl_ptr = (struct mwifiex_rx_reorder_tbl *)__mptr; } goto ldv_54738; ldv_54737: { rx_reo_tbl->tid = (unsigned short )rx_reorder_tbl_ptr->tid; memcpy((void *)(& rx_reo_tbl->ta), (void const *)(& rx_reorder_tbl_ptr->ta), 6UL); rx_reo_tbl->start_win = (u32 )rx_reorder_tbl_ptr->start_win; rx_reo_tbl->win_size = (u32 )rx_reorder_tbl_ptr->win_size; i = 0; } goto ldv_54734; ldv_54733: ; if ((unsigned long )*(rx_reorder_tbl_ptr->rx_reorder_ptr + (unsigned long )i) != (unsigned long )((void *)0)) { rx_reo_tbl->buffer[i] = 1U; } else { rx_reo_tbl->buffer[i] = 0U; } i = i + 1; ldv_54734: ; if (i < rx_reorder_tbl_ptr->win_size) { goto ldv_54733; } else { } rx_reo_tbl = rx_reo_tbl + 1; count = count + 1; if (count > 15) { goto ldv_54736; } else { } __mptr___0 = (struct list_head const *)rx_reorder_tbl_ptr->list.next; rx_reorder_tbl_ptr = (struct mwifiex_rx_reorder_tbl *)__mptr___0; ldv_54738: ; if ((unsigned long )(& rx_reorder_tbl_ptr->list) != (unsigned long )(& priv->rx_reorder_tbl_ptr)) { goto ldv_54737; } else { } ldv_54736: { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); } return (count); } } int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv , struct mwifiex_ds_tx_ba_stream_tbl *buf ) { struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl ; struct mwifiex_ds_tx_ba_stream_tbl *rx_reo_tbl ; int count ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct _ddebug descriptor ; long tmp___0 ; struct list_head const *__mptr___0 ; { { rx_reo_tbl = buf; count = 0; tmp = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; } goto ldv_54758; ldv_54757: { rx_reo_tbl->tid = (unsigned short )tx_ba_tsr_tbl->tid; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_get_tx_ba_stream_tbl"; descriptor.filename = "drivers/net/wireless/mwifiex/11n.c"; descriptor.format = "data: %s tid=%d\n"; descriptor.lineno = 652U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "data: %s tid=%d\n", "mwifiex_get_tx_ba_stream_tbl", (int )rx_reo_tbl->tid); } } else { } { memcpy((void *)(& rx_reo_tbl->ra), (void const *)(& tx_ba_tsr_tbl->ra), 6UL); rx_reo_tbl = rx_reo_tbl + 1; count = count + 1; } if (count > 1) { goto ldv_54756; } else { } __mptr___0 = (struct list_head const *)tx_ba_tsr_tbl->list.next; tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; ldv_54758: ; if ((unsigned long )(& tx_ba_tsr_tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54757; } else { } ldv_54756: { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return (count); } } void mwifiex_del_tx_ba_stream_tbl_by_ra(struct mwifiex_private *priv , u8 *ra ) { struct mwifiex_tx_ba_stream_tbl *tbl ; struct mwifiex_tx_ba_stream_tbl *tmp ; unsigned long flags ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___1 ; int tmp___2 ; struct list_head const *__mptr___1 ; { if ((unsigned long )ra == (unsigned long )((u8 *)0U)) { return; } else { } { tmp___0 = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)priv->tx_ba_stream_tbl_ptr.next; tbl = (struct mwifiex_tx_ba_stream_tbl *)__mptr; __mptr___0 = (struct list_head const *)tbl->list.next; tmp = (struct mwifiex_tx_ba_stream_tbl *)__mptr___0; } goto ldv_54779; ldv_54778: { tmp___2 = memcmp((void const *)(& tbl->ra), (void const *)ra, 6UL); } if (tmp___2 == 0) { { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); mwifiex_11n_delete_tx_ba_stream_tbl_entry(priv, tbl); tmp___1 = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___1); } } else { } tbl = tmp; __mptr___1 = (struct list_head const *)tmp->list.next; tmp = (struct mwifiex_tx_ba_stream_tbl *)__mptr___1; ldv_54779: ; if ((unsigned long )(& tbl->list) != (unsigned long )(& priv->tx_ba_stream_tbl_ptr)) { goto ldv_54778; } else { } { spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } return; } } void mwifiex_set_ba_params(struct mwifiex_private *priv ) { { priv->add_ba_param.timeout = 65535U; if ((int )priv->bss_role & 1) { priv->add_ba_param.tx_win_size = 32U; priv->add_ba_param.rx_win_size = 16U; } else { priv->add_ba_param.tx_win_size = 16U; priv->add_ba_param.rx_win_size = 32U; } return; } } void mwifiex_set_11ac_ba_params(struct mwifiex_private *priv ) ; int mwifiex_cmd_append_11ac_tlv(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u8 **buffer ) ; int mwifiex_cmd_11ac_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_11ac_vht_cfg *cfg ) ; static u16 mwifiex_convert_mcsmap_to_maxrate(struct mwifiex_private *priv , u8 bands , u16 mcs_map ) { u8 i ; u8 nss ; u8 max_mcs ; u16 max_rate ; u32 usr_vht_cap_info ; struct mwifiex_adapter *adapter ; u16 max_rate_lgi_80MHZ[8U][3U] ; u16 max_rate_lgi_160MHZ[8U][3U] ; { max_rate = 0U; usr_vht_cap_info = 0U; adapter = priv->adapter; max_rate_lgi_80MHZ[0][0] = 292U; max_rate_lgi_80MHZ[0][1] = 351U; max_rate_lgi_80MHZ[0][2] = 390U; max_rate_lgi_80MHZ[1][0] = 585U; max_rate_lgi_80MHZ[1][1] = 702U; max_rate_lgi_80MHZ[1][2] = 780U; max_rate_lgi_80MHZ[2][0] = 877U; max_rate_lgi_80MHZ[2][1] = 1053U; max_rate_lgi_80MHZ[2][2] = 1170U; max_rate_lgi_80MHZ[3][0] = 1170U; max_rate_lgi_80MHZ[3][1] = 1404U; max_rate_lgi_80MHZ[3][2] = 1560U; max_rate_lgi_80MHZ[4][0] = 1462U; max_rate_lgi_80MHZ[4][1] = 1755U; max_rate_lgi_80MHZ[4][2] = 1950U; max_rate_lgi_80MHZ[5][0] = 1755U; max_rate_lgi_80MHZ[5][1] = 2106U; max_rate_lgi_80MHZ[5][2] = 0U; max_rate_lgi_80MHZ[6][0] = 2047U; max_rate_lgi_80MHZ[6][1] = 2457U; max_rate_lgi_80MHZ[6][2] = 2730U; max_rate_lgi_80MHZ[7][0] = 2340U; max_rate_lgi_80MHZ[7][1] = 2808U; max_rate_lgi_80MHZ[7][2] = 3120U; max_rate_lgi_160MHZ[0][0] = 585U; max_rate_lgi_160MHZ[0][1] = 702U; max_rate_lgi_160MHZ[0][2] = 780U; max_rate_lgi_160MHZ[1][0] = 1170U; max_rate_lgi_160MHZ[1][1] = 1404U; max_rate_lgi_160MHZ[1][2] = 1560U; max_rate_lgi_160MHZ[2][0] = 1755U; max_rate_lgi_160MHZ[2][1] = 2106U; max_rate_lgi_160MHZ[2][2] = 0U; max_rate_lgi_160MHZ[3][0] = 2340U; max_rate_lgi_160MHZ[3][1] = 2808U; max_rate_lgi_160MHZ[3][2] = 3120U; max_rate_lgi_160MHZ[4][0] = 2925U; max_rate_lgi_160MHZ[4][1] = 3510U; max_rate_lgi_160MHZ[4][2] = 3900U; max_rate_lgi_160MHZ[5][0] = 3510U; max_rate_lgi_160MHZ[5][1] = 4212U; max_rate_lgi_160MHZ[5][2] = 4680U; max_rate_lgi_160MHZ[6][0] = 4095U; max_rate_lgi_160MHZ[6][1] = 4914U; max_rate_lgi_160MHZ[6][2] = 5460U; max_rate_lgi_160MHZ[7][0] = 4680U; max_rate_lgi_160MHZ[7][1] = 5616U; max_rate_lgi_160MHZ[7][2] = 6240U; if (((int )bands & 64) != 0) { usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; } else { usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_bg; } nss = 0U; i = 0U; goto ldv_54324; ldv_54323: max_mcs = (unsigned int )((u8 )((int )mcs_map >> (int )i * 2)) & 3U; if ((unsigned int )max_mcs <= 2U) { nss = i; } else { } i = (u8 )((int )i + 1); ldv_54324: ; if ((unsigned int )i <= 7U) { goto ldv_54323; } else { } max_mcs = (unsigned int )((u8 )((int )mcs_map >> (int )nss * 2)) & 3U; if ((unsigned int )max_mcs > 2U) { max_mcs = 2U; } else { } if (((usr_vht_cap_info >> 2) & 3U) != 0U) { max_rate = max_rate_lgi_160MHZ[(int )nss][(int )max_mcs]; if ((unsigned int )max_rate == 0U) { max_rate = max_rate_lgi_160MHZ[(int )nss][(int )max_mcs + -1]; } else { } } else { max_rate = max_rate_lgi_80MHZ[(int )nss][(int )max_mcs]; if ((unsigned int )max_rate == 0U) { max_rate = max_rate_lgi_80MHZ[(int )nss][(int )max_mcs + -1]; } else { } } return (max_rate); } } static void mwifiex_fill_vht_cap_info(struct mwifiex_private *priv , struct mwifiex_ie_types_vhtcap *vht_cap , u8 bands ) { struct mwifiex_adapter *adapter ; { adapter = priv->adapter; if (((int )bands & 4) != 0) { vht_cap->vht_cap.vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; } else { vht_cap->vht_cap.vht_cap_info = adapter->usr_dot_11ac_dev_cap_bg; } return; } } static void mwifiex_fill_vht_cap_tlv(struct mwifiex_private *priv , struct mwifiex_ie_types_vhtcap *vht_cap , u8 bands ) { struct mwifiex_adapter *adapter ; u16 mcs_map_user ; u16 mcs_map_resp ; u16 mcs_map_result ; u16 mcs_user ; u16 mcs_resp ; u16 nss ; u16 tmp ; u16 _min1 ; u16 _min2 ; u16 _min1___0 ; u16 _min2___0 ; { { adapter = priv->adapter; mwifiex_fill_vht_cap_info(priv, vht_cap, (int )bands); mcs_map_user = (u16 )adapter->usr_dot_11ac_mcs_support; mcs_map_resp = vht_cap->vht_cap.supp_mcs.rx_mcs_map; mcs_map_result = 0U; nss = 1U; } goto ldv_54349; ldv_54348: mcs_user = (unsigned int )((u16 )((int )mcs_map_user >> ((int )nss + -1) * 2)) & 3U; mcs_resp = (unsigned int )((u16 )((int )mcs_map_resp >> ((int )nss + -1) * 2)) & 3U; if ((unsigned int )mcs_user == 3U || (unsigned int )mcs_resp == 3U) { mcs_map_result = (u16 )((int )((short )mcs_map_result) | (int )((short )(3 << ((int )nss + -1) * 2))); } else { _min1 = mcs_user; _min2 = mcs_resp; mcs_map_result = (u16 )((int )((short )mcs_map_result) | (int )((short )((((int )_min1 < (int )_min2 ? _min1 : _min2) & 3) << ((int )nss + -1) * 2))); } nss = (u16 )((int )nss + 1); ldv_54349: ; if ((unsigned int )nss <= 8U) { goto ldv_54348; } else { } { vht_cap->vht_cap.supp_mcs.rx_mcs_map = mcs_map_result; tmp = mwifiex_convert_mcsmap_to_maxrate(priv, (int )bands, (int )mcs_map_result); vht_cap->vht_cap.supp_mcs.rx_highest = tmp; mcs_map_user = (u16 )(adapter->usr_dot_11ac_mcs_support >> 16); mcs_map_resp = vht_cap->vht_cap.supp_mcs.tx_mcs_map; mcs_map_result = 0U; nss = 1U; } goto ldv_54355; ldv_54354: mcs_user = (unsigned int )((u16 )((int )mcs_map_user >> ((int )nss + -1) * 2)) & 3U; mcs_resp = (unsigned int )((u16 )((int )mcs_map_resp >> ((int )nss + -1) * 2)) & 3U; if ((unsigned int )mcs_user == 3U || (unsigned int )mcs_resp == 3U) { mcs_map_result = (u16 )((int )((short )mcs_map_result) | (int )((short )(3 << ((int )nss + -1) * 2))); } else { _min1___0 = mcs_user; _min2___0 = mcs_resp; mcs_map_result = (u16 )((int )((short )mcs_map_result) | (int )((short )((((int )_min1___0 < (int )_min2___0 ? _min1___0 : _min2___0) & 3) << ((int )nss + -1) * 2))); } nss = (u16 )((int )nss + 1); ldv_54355: ; if ((unsigned int )nss <= 8U) { goto ldv_54354; } else { } { vht_cap->vht_cap.supp_mcs.tx_mcs_map = mcs_map_result; tmp = mwifiex_convert_mcsmap_to_maxrate(priv, (int )bands, (int )mcs_map_result); vht_cap->vht_cap.supp_mcs.tx_highest = tmp; } return; } } int mwifiex_cmd_append_11ac_tlv(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u8 **buffer ) { struct mwifiex_ie_types_vhtcap *vht_cap ; struct mwifiex_ie_types_oper_mode_ntf *oper_ntf ; struct ieee_types_oper_mode_ntf *ieee_oper_ntf ; struct mwifiex_ie_types_vht_oper *vht_op ; struct mwifiex_adapter *adapter ; u8 supp_chwd_set ; u32 usr_vht_cap_info ; int ret_len ; u8 __min1 ; u8 __min2 ; u8 __min1___0 ; u8 __min2___0 ; u8 __min1___1 ; u8 __min2___1 ; { adapter = priv->adapter; ret_len = 0; if (((int )bss_desc->bss_band & 4) != 0) { usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; } else { usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_bg; } if ((unsigned long )bss_desc->bcn_vht_cap != (unsigned long )((struct ieee80211_vht_cap *)0)) { { vht_cap = (struct mwifiex_ie_types_vhtcap *)*buffer; memset((void *)vht_cap, 0, 16UL); vht_cap->header.type = 191U; vht_cap->header.len = 12U; memcpy((void *)vht_cap + 4U, (void const *)bss_desc->bcn_vht_cap, (size_t )vht_cap->header.len); mwifiex_fill_vht_cap_tlv(priv, vht_cap, (int )((u8 )bss_desc->bss_band)); *buffer = *buffer + 16UL; ret_len = (int )((unsigned int )ret_len + 16U); } } else { } if ((unsigned long )bss_desc->bcn_vht_oper != (unsigned long )((struct ieee80211_vht_operation *)0)) { if (priv->bss_mode == 2U) { { vht_op = (struct mwifiex_ie_types_vht_oper *)*buffer; memset((void *)vht_op, 0, 9UL); vht_op->header.type = 192U; vht_op->header.len = 5U; memcpy((void *)vht_op + 4U, (void const *)bss_desc->bcn_vht_oper + 2U, (size_t )vht_op->header.len); supp_chwd_set = (unsigned int )((u8 )(usr_vht_cap_info >> 2)) & 3U; } { if ((int )supp_chwd_set == 0) { goto case_0; } else { } if ((int )supp_chwd_set == 1) { goto case_1; } else { } if ((int )supp_chwd_set == 2) { goto case_2; } else { } goto switch_default; case_0: /* CIL Label */ __min1 = 1U; __min2 = (bss_desc->bcn_vht_oper)->chan_width; vht_op->chan_width = (u8 )((int )__min1 < (int )__min2 ? __min1 : __min2); goto ldv_54374; case_1: /* CIL Label */ __min1___0 = 2U; __min2___0 = (bss_desc->bcn_vht_oper)->chan_width; vht_op->chan_width = (u8 )((int )__min1___0 < (int )__min2___0 ? __min1___0 : __min2___0); goto ldv_54374; case_2: /* CIL Label */ __min1___1 = 3U; __min2___1 = (bss_desc->bcn_vht_oper)->chan_width; vht_op->chan_width = (u8 )((int )__min1___1 < (int )__min2___1 ? __min1___1 : __min2___1); goto ldv_54374; switch_default: /* CIL Label */ vht_op->chan_width = 0U; goto ldv_54374; switch_break: /* CIL Label */ ; } ldv_54374: *buffer = *buffer + 9UL; ret_len = (int )((unsigned int )ret_len + 9U); } else { } } else { } if ((unsigned long )bss_desc->oper_mode != (unsigned long )((struct ieee_types_oper_mode_ntf *)0)) { { ieee_oper_ntf = bss_desc->oper_mode; oper_ntf = (struct mwifiex_ie_types_oper_mode_ntf *)*buffer; memset((void *)oper_ntf, 0, 5UL); oper_ntf->header.type = 199U; oper_ntf->header.len = 1U; oper_ntf->oper_mode = ieee_oper_ntf->oper_mode; *buffer = *buffer + 5UL; ret_len = (int )((unsigned int )ret_len + 5U); } } else { } return (ret_len); } } int mwifiex_cmd_11ac_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_11ac_vht_cfg *cfg ) { struct host_cmd_11ac_vht_cfg *vhtcfg ; { vhtcfg = & cmd->params.vht_cfg; cmd->command = 274U; cmd->size = 24U; vhtcfg->action = cmd_action; vhtcfg->band_config = cfg->band_config; vhtcfg->misc_config = cfg->misc_config; vhtcfg->cap_info = cfg->cap_info; vhtcfg->mcs_tx_set = cfg->mcs_tx_set; vhtcfg->mcs_rx_set = cfg->mcs_rx_set; return (0); } } void mwifiex_set_11ac_ba_params(struct mwifiex_private *priv ) { { priv->add_ba_param.timeout = 65535U; if ((int )priv->bss_role & 1) { priv->add_ba_param.tx_win_size = 48U; priv->add_ba_param.rx_win_size = 32U; } else { priv->add_ba_param.tx_win_size = 32U; priv->add_ba_param.rx_win_size = 48U; } return; } } void ldv_dispatch_instance_deregister_9_1(struct timer_list *arg0 ) ; int ldv_del_timer(int arg0 , struct timer_list *arg1 ) { struct timer_list *ldv_9_timer_list_timer_list ; { { ldv_9_timer_list_timer_list = arg1; ldv_dispatch_instance_deregister_9_1(ldv_9_timer_list_timer_list); } return (arg0); return (arg0); } } void ldv_dispatch_instance_deregister_9_1(struct timer_list *arg0 ) { { return; } } __inline static __u16 __fswab16(__u16 val ) { { return ((__u16 )((int )((short )((int )val << 8)) | (int )((short )((int )val >> 8)))); } } __inline static void atomic_inc(atomic_t *v ) ; __inline static void atomic_dec(atomic_t *v ) ; __inline static bool skb_is_nonlinear(struct sk_buff const *skb ) { { return ((unsigned int )skb->data_len != 0U); } } __inline static int skb_tailroom(struct sk_buff const *skb ) { bool tmp ; { { tmp = skb_is_nonlinear(skb); } return ((int )tmp ? 0 : (int )((unsigned int )skb->end - (unsigned int )skb->tail)); } } u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv ) ; static int mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr , struct sk_buff *skb_src , int *pad ) { int dt_offset ; struct rfc_1042_hdr snap ; struct tx_packet_hdr *tx_header ; unsigned char *tmp ; __u16 tmp___0 ; unsigned char *tmp___1 ; { { snap.llc_dsap = 170U; snap.llc_ssap = 170U; snap.llc_ctrl = 3U; snap.snap_oui[0] = 0U; snap.snap_oui[1] = 0U; snap.snap_oui[2] = 0U; snap.snap_type = 0U; tmp = skb_put(skb_aggr, 22U); tx_header = (struct tx_packet_hdr *)tmp; dt_offset = 12; memcpy((void *)(& tx_header->eth803_hdr), (void const *)skb_src->data, (size_t )dt_offset); snap.snap_type = ((struct ethhdr *)skb_src->data)->h_proto; dt_offset = (int )((unsigned int )dt_offset + 2U); memcpy((void *)(& tx_header->rfc1042_hdr), (void const *)(& snap), 8UL); skb_pull(skb_src, (unsigned int )dt_offset); tmp___0 = __fswab16((int )((unsigned int )((__u16 )skb_src->len) + 8U)); tx_header->eth803_hdr.h_proto = tmp___0; tmp___1 = skb_put(skb_aggr, skb_src->len); memcpy((void *)tmp___1, (void const *)skb_src->data, (size_t )skb_src->len); *pad = (int )(- skb_aggr->tail) & 3; } return ((int )(skb_aggr->len + (unsigned int )*pad)); } } static void mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv , struct sk_buff *skb ) { struct txpd *local_tx_pd ; u8 tmp ; { { skb_push(skb, 16U); local_tx_pd = (struct txpd *)skb->data; memset((void *)local_tx_pd, 0, 16UL); local_tx_pd->priority = (unsigned char )skb->priority; local_tx_pd->pkt_delay_2ms = mwifiex_wmm_compute_drv_pkt_delay(priv, (struct sk_buff const *)skb); local_tx_pd->bss_num = priv->bss_num; local_tx_pd->bss_type = priv->bss_type; local_tx_pd->tx_pkt_offset = 16U; local_tx_pd->tx_pkt_type = 230U; local_tx_pd->tx_pkt_length = (unsigned int )((unsigned short )skb->len) - 16U; } if (local_tx_pd->tx_control == 0U) { local_tx_pd->tx_control = priv->pkt_tx_ctrl; } else { } if (((unsigned long )priv->bss_role & 1UL) == 0UL && (unsigned int )(priv->adapter)->pps_uapsd_mode != 0U) { { tmp = mwifiex_check_last_packet_indication(priv); } if ((unsigned int )tmp == 1U) { (priv->adapter)->tx_lock_flag = 1U; local_tx_pd->flags = 8U; } else { } } else { } return; } } int mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv , struct mwifiex_ra_list_tbl *pra_list , int ptrindex , unsigned long ra_list_flags ) { struct mwifiex_adapter *adapter ; struct sk_buff *skb_aggr ; struct sk_buff *skb_src ; struct mwifiex_txinfo *tx_info_aggr ; struct mwifiex_txinfo *tx_info_src ; int pad ; int ret ; struct mwifiex_tx_param tx_param ; struct txpd *ptx_pd ; int headroom ; int tmp ; raw_spinlock_t *tmp___0 ; int tmp___1 ; int tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; struct _ddebug descriptor ; long tmp___5 ; { { adapter = priv->adapter; pad = 0; ptx_pd = (struct txpd *)0; headroom = (unsigned int )adapter->iface_type == 2U ? 0 : 4; skb_src = skb_peek((struct sk_buff_head const *)(& pra_list->skb_head)); } if ((unsigned long )skb_src == (unsigned long )((struct sk_buff *)0)) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } return (0); } else { } { tx_info_src = MWIFIEX_SKB_TXCB(skb_src); skb_aggr = dev_alloc_skb((unsigned int )adapter->tx_buf_size); } if ((unsigned long )skb_aggr == (unsigned long )((struct sk_buff *)0)) { { dev_err((struct device const *)adapter->dev, "%s: alloc skb_aggr\n", "mwifiex_11n_aggregate_pkt"); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } return (-1); } else { } { skb_reserve(skb_aggr, (int )((unsigned int )headroom + 16U)); tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); tx_info_aggr->bss_type = tx_info_src->bss_type; tx_info_aggr->bss_num = tx_info_src->bss_num; skb_aggr->priority = skb_src->priority; } ldv_54571: { tmp = skb_tailroom((struct sk_buff const *)skb_aggr); } if ((unsigned int )tmp < skb_src->len + 8U) { goto ldv_54567; } else { } { skb_src = skb_dequeue(& pra_list->skb_head); pra_list->total_pkt_count = (u16 )((int )pra_list->total_pkt_count - 1); atomic_dec(& priv->wmm.tx_pkts_queued); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, & pad); mwifiex_write_data_complete(adapter, skb_src, 0, 0); tmp___0 = spinlock_check(& priv->wmm.ra_list_spinlock); ra_list_flags = _raw_spin_lock_irqsave(tmp___0); tmp___1 = mwifiex_is_ralist_valid(priv, pra_list, ptrindex); } if (tmp___1 == 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); } return (-1); } else { } { tmp___2 = skb_tailroom((struct sk_buff const *)skb_aggr); } if (tmp___2 < pad) { pad = 0; goto ldv_54567; } else { } { skb_put(skb_aggr, (unsigned int )pad); skb_src = skb_peek((struct sk_buff_head const *)(& pra_list->skb_head)); } if ((unsigned long )skb_src != (unsigned long )((struct sk_buff *)0)) { goto ldv_54571; } else { } ldv_54567: { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); skb_trim(skb_aggr, skb_aggr->len - (unsigned int )pad); mwifiex_11n_form_amsdu_txpd(priv, skb_aggr); } if (((unsigned long )priv->bss_role & 1UL) == 0UL) { ptx_pd = (struct txpd *)skb_aggr->data; } else { } { skb_push(skb_aggr, (unsigned int )headroom); } if ((unsigned int )adapter->iface_type == 2U) { { adapter->data_sent = 1U; ret = (*(adapter->if_ops.host_to_card))(adapter, 2, skb_aggr, (struct mwifiex_tx_param *)0); } } else { { tx_param.next_pkt_len = 0U; ret = (*(adapter->if_ops.host_to_card))(adapter, 0, skb_aggr, & tx_param); } } { if (ret == -16) { goto case_neg_16; } else { } if (ret == -1) { goto case_neg_1; } else { } if (ret == -115) { goto case_neg_115; } else { } if (ret == 0) { goto case_0; } else { } goto switch_default; case_neg_16: /* CIL Label */ { tmp___3 = spinlock_check(& priv->wmm.ra_list_spinlock); ra_list_flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = mwifiex_is_ralist_valid(priv, pra_list, ptrindex); } if (tmp___4 == 0) { { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); mwifiex_write_data_complete(adapter, skb_aggr, 1, -1); } return (-1); } else { } if ((((unsigned long )priv->bss_role & 1UL) == 0UL && (unsigned int )adapter->pps_uapsd_mode != 0U) && (unsigned int )adapter->tx_lock_flag != 0U) { (priv->adapter)->tx_lock_flag = 0U; if ((unsigned long )ptx_pd != (unsigned long )((struct txpd *)0)) { ptx_pd->flags = 0U; } else { } } else { } { skb_queue_tail(& pra_list->skb_head, skb_aggr); pra_list->total_pkt_count = (u16 )((int )pra_list->total_pkt_count + 1); atomic_inc(& priv->wmm.tx_pkts_queued); tx_info_aggr->flags = (u8 )((unsigned int )tx_info_aggr->flags | 1U); spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, ra_list_flags); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_11n_aggregate_pkt"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_aggr.c"; descriptor.format = "data: -EBUSY is returned\n"; descriptor.lineno = 280U; descriptor.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: -EBUSY is returned\n"); } } else { } goto ldv_54577; case_neg_1: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } { dev_err((struct device const *)adapter->dev, "%s: host_to_card failed: %#x\n", "mwifiex_11n_aggregate_pkt", ret); adapter->dbg.num_tx_host_to_card_failure = adapter->dbg.num_tx_host_to_card_failure + 1U; mwifiex_write_data_complete(adapter, skb_aggr, 1, ret); } return (0); case_neg_115: /* CIL Label */ ; if ((unsigned int )adapter->iface_type != 1U) { adapter->data_sent = 0U; } else { } goto ldv_54577; case_0: /* CIL Label */ { mwifiex_write_data_complete(adapter, skb_aggr, 1, ret); } goto ldv_54577; switch_default: /* CIL Label */ ; goto ldv_54577; switch_break: /* CIL Label */ ; } ldv_54577: ; if (ret != -16) { { mwifiex_rotate_priolists(priv, pra_list, ptrindex); } } else { } return (0); } } static int ldv_del_timer_19___0(struct timer_list *ldv_func_arg1 ) ; static int ldv_del_timer_20___1(struct timer_list *ldv_func_arg1 ) ; static int ldv_mod_timer_21(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; int mwifiex_process_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv , struct sk_buff *skb ) ; int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv , u16 seq_num , u16 tid , u8 *ta , u8 pkt_type , void *payload ) ; void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv , struct host_cmd_ds_11n_batimeout *event ) ; int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd , void *data_buf ) ; int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct host_cmd_ds_11n_addba_req *cmd_addba_req ) ; int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd , void *data_buf ) ; struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv , int tid , u8 *ta ) ; void mwifiex_11n_del_rx_reorder_tbl_by_ta(struct mwifiex_private *priv , u8 *ta ) ; static void mwifiex_11n_dispatch_pkt(struct mwifiex_private *priv , struct mwifiex_rx_reorder_tbl *tbl , int start_win ) { int pkt_to_send ; int i ; void *rx_tmp_ptr ; unsigned long flags ; int _min1 ; int _min2 ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; { if (start_win > tbl->start_win) { _min1 = start_win - tbl->start_win; _min2 = tbl->win_size; pkt_to_send = _min1 < _min2 ? _min1 : _min2; } else { pkt_to_send = tbl->win_size; } i = 0; goto ldv_54567; ldv_54566: { tmp = spinlock_check(& priv->rx_pkt_lock); flags = _raw_spin_lock_irqsave(tmp); rx_tmp_ptr = (void *)0; } if ((unsigned long )*(tbl->rx_reorder_ptr + (unsigned long )i) != (unsigned long )((void *)0)) { rx_tmp_ptr = *(tbl->rx_reorder_ptr + (unsigned long )i); *(tbl->rx_reorder_ptr + (unsigned long )i) = (void *)0; } else { } { spin_unlock_irqrestore(& priv->rx_pkt_lock, flags); } if ((unsigned long )rx_tmp_ptr != (unsigned long )((void *)0)) { if ((unsigned int )priv->bss_role == 1U) { { mwifiex_handle_uap_rx_forward(priv, (struct sk_buff *)rx_tmp_ptr); } } else { { mwifiex_process_rx_packet(priv, (struct sk_buff *)rx_tmp_ptr); } } } else { } i = i + 1; ldv_54567: ; if (i < pkt_to_send) { goto ldv_54566; } else { } { tmp___0 = spinlock_check(& priv->rx_pkt_lock); flags = _raw_spin_lock_irqsave(tmp___0); i = 0; } goto ldv_54573; ldv_54572: *(tbl->rx_reorder_ptr + (unsigned long )i) = *(tbl->rx_reorder_ptr + (unsigned long )(pkt_to_send + i)); *(tbl->rx_reorder_ptr + (unsigned long )(pkt_to_send + i)) = (void *)0; i = i + 1; ldv_54573: ; if (i < tbl->win_size - pkt_to_send) { goto ldv_54572; } else { } { tbl->start_win = start_win; spin_unlock_irqrestore(& priv->rx_pkt_lock, flags); } return; } } static void mwifiex_11n_scan_and_dispatch(struct mwifiex_private *priv , struct mwifiex_rx_reorder_tbl *tbl ) { int i ; int j ; int xchg ; void *rx_tmp_ptr ; unsigned long flags ; raw_spinlock_t *tmp ; raw_spinlock_t *tmp___0 ; { i = 0; goto ldv_54589; ldv_54588: { tmp = spinlock_check(& priv->rx_pkt_lock); flags = _raw_spin_lock_irqsave(tmp); } if ((unsigned long )*(tbl->rx_reorder_ptr + (unsigned long )i) == (unsigned long )((void *)0)) { { spin_unlock_irqrestore(& priv->rx_pkt_lock, flags); } goto ldv_54587; } else { } { rx_tmp_ptr = *(tbl->rx_reorder_ptr + (unsigned long )i); *(tbl->rx_reorder_ptr + (unsigned long )i) = (void *)0; spin_unlock_irqrestore(& priv->rx_pkt_lock, flags); } if ((unsigned int )priv->bss_role == 1U) { { mwifiex_handle_uap_rx_forward(priv, (struct sk_buff *)rx_tmp_ptr); } } else { { mwifiex_process_rx_packet(priv, (struct sk_buff *)rx_tmp_ptr); } } i = i + 1; ldv_54589: ; if (i < tbl->win_size) { goto ldv_54588; } else { } ldv_54587: { tmp___0 = spinlock_check(& priv->rx_pkt_lock); flags = _raw_spin_lock_irqsave(tmp___0); } if (i > 0) { xchg = tbl->win_size - i; j = 0; goto ldv_54594; ldv_54593: *(tbl->rx_reorder_ptr + (unsigned long )j) = *(tbl->rx_reorder_ptr + (unsigned long )(i + j)); *(tbl->rx_reorder_ptr + (unsigned long )(i + j)) = (void *)0; j = j + 1; ldv_54594: ; if (j < xchg) { goto ldv_54593; } else { } } else { } { tbl->start_win = (tbl->start_win + i) & 4095; spin_unlock_irqrestore(& priv->rx_pkt_lock, flags); } return; } } static void mwifiex_del_rx_reorder_entry(struct mwifiex_private *priv , struct mwifiex_rx_reorder_tbl *tbl ) { unsigned long flags ; raw_spinlock_t *tmp ; { if ((unsigned long )tbl == (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { return; } else { } { mwifiex_11n_dispatch_pkt(priv, tbl, (tbl->start_win + tbl->win_size) & 4095); ldv_del_timer_19___0(& tbl->timer_context.timer); tmp = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); list_del(& tbl->list); spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); kfree((void const *)tbl->rx_reorder_ptr); kfree((void const *)tbl); } return; } } struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv , int tid , u8 *ta ) { struct mwifiex_rx_reorder_tbl *tbl ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; int tmp___0 ; struct list_head const *__mptr___0 ; { { tmp = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->rx_reorder_tbl_ptr.next; tbl = (struct mwifiex_rx_reorder_tbl *)__mptr; } goto ldv_54619; ldv_54618: { tmp___0 = memcmp((void const *)(& tbl->ta), (void const *)ta, 6UL); } if (tmp___0 == 0 && tbl->tid == tid) { { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); } return (tbl); } else { } __mptr___0 = (struct list_head const *)tbl->list.next; tbl = (struct mwifiex_rx_reorder_tbl *)__mptr___0; ldv_54619: ; if ((unsigned long )(& tbl->list) != (unsigned long )(& priv->rx_reorder_tbl_ptr)) { goto ldv_54618; } else { } { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); } return ((struct mwifiex_rx_reorder_tbl *)0); } } void mwifiex_11n_del_rx_reorder_tbl_by_ta(struct mwifiex_private *priv , u8 *ta ) { struct mwifiex_rx_reorder_tbl *tbl ; struct mwifiex_rx_reorder_tbl *tmp ; unsigned long flags ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___1 ; int tmp___2 ; struct list_head const *__mptr___1 ; { if ((unsigned long )ta == (unsigned long )((u8 *)0U)) { return; } else { } { tmp___0 = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)priv->rx_reorder_tbl_ptr.next; tbl = (struct mwifiex_rx_reorder_tbl *)__mptr; __mptr___0 = (struct list_head const *)tbl->list.next; tmp = (struct mwifiex_rx_reorder_tbl *)__mptr___0; } goto ldv_54641; ldv_54640: { tmp___2 = memcmp((void const *)(& tbl->ta), (void const *)ta, 6UL); } if (tmp___2 == 0) { { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); mwifiex_del_rx_reorder_entry(priv, tbl); tmp___1 = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___1); } } else { } tbl = tmp; __mptr___1 = (struct list_head const *)tmp->list.next; tmp = (struct mwifiex_rx_reorder_tbl *)__mptr___1; ldv_54641: ; if ((unsigned long )(& tbl->list) != (unsigned long )(& priv->rx_reorder_tbl_ptr)) { goto ldv_54640; } else { } { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); } return; } } static int mwifiex_11n_find_last_seq_num(struct mwifiex_rx_reorder_tbl *rx_reorder_tbl_ptr ) { int i ; { i = rx_reorder_tbl_ptr->win_size + -1; goto ldv_54648; ldv_54647: ; if ((unsigned long )*(rx_reorder_tbl_ptr->rx_reorder_ptr + (unsigned long )i) != (unsigned long )((void *)0)) { return (i); } else { } i = i - 1; ldv_54648: ; if (i >= 0) { goto ldv_54647; } else { } return (-1); } } static void mwifiex_flush_data(unsigned long context ) { struct reorder_tmr_cnxt *ctx ; int start_win ; struct _ddebug descriptor ; long tmp ; { { ctx = (struct reorder_tmr_cnxt *)context; start_win = mwifiex_11n_find_last_seq_num(ctx->ptr); } if (start_win < 0) { return; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_flush_data"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor.format = "info: flush data %d\n"; descriptor.lineno = 238U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)((ctx->priv)->adapter)->dev, "info: flush data %d\n", start_win); } } else { } { mwifiex_11n_dispatch_pkt(ctx->priv, ctx->ptr, (((ctx->ptr)->start_win + start_win) + 1) & 4095); } return; } } static void mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv , u8 *ta , int tid , int win_size , int seq_num ) { int i ; struct mwifiex_rx_reorder_tbl *tbl ; struct mwifiex_rx_reorder_tbl *new_node ; u16 last_seq ; unsigned long flags ; struct mwifiex_sta_node *node ; void *tmp ; struct _ddebug descriptor ; long tmp___0 ; u8 tmp___1 ; void *tmp___2 ; struct lock_class_key __key ; raw_spinlock_t *tmp___3 ; { { last_seq = 0U; tbl = mwifiex_11n_get_rx_reorder_tbl(priv, tid, ta); } if ((unsigned long )tbl != (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { { mwifiex_11n_dispatch_pkt(priv, tbl, seq_num); } return; } else { } { tmp = kzalloc(200UL, 208U); new_node = (struct mwifiex_rx_reorder_tbl *)tmp; } if ((unsigned long )new_node == (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { return; } else { } { INIT_LIST_HEAD(& new_node->list); new_node->tid = tid; memcpy((void *)(& new_node->ta), (void const *)ta, 6UL); new_node->start_win = seq_num; tmp___1 = mwifiex_queuing_ra_based(priv); } if ((unsigned int )tmp___1 != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_11n_create_rx_reorder_tbl"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor.format = "info: AP/ADHOC:last_seq=%d start_win=%d\n"; descriptor.lineno = 286U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: AP/ADHOC:last_seq=%d start_win=%d\n", (int )last_seq, new_node->start_win); } } else { } if ((unsigned int )priv->bss_role == 1U) { { node = mwifiex_get_sta_entry(priv, ta); } if ((unsigned long )node != (unsigned long )((struct mwifiex_sta_node *)0)) { last_seq = node->rx_seq[tid]; } else { } } else { } } else { last_seq = priv->rx_seq[tid]; } if ((unsigned int )last_seq != 65535U && (int )last_seq >= new_node->start_win) { new_node->start_win = (int )last_seq + 1; } else { } { new_node->win_size = win_size; new_node->flags = 0U; tmp___2 = kzalloc((unsigned long )win_size * 8UL, 208U); new_node->rx_reorder_ptr = (void **)tmp___2; } if ((unsigned long )new_node->rx_reorder_ptr == (unsigned long )((void **)0)) { { kfree((void const *)new_node); dev_err((struct device const *)(priv->adapter)->dev, "%s: failed to alloc reorder_ptr\n", "mwifiex_11n_create_rx_reorder_tbl"); } return; } else { } { new_node->timer_context.ptr = new_node; new_node->timer_context.priv = priv; init_timer_key(& new_node->timer_context.timer, 0U, "(&new_node->timer_context.timer)", & __key); new_node->timer_context.timer.function = & mwifiex_flush_data; new_node->timer_context.timer.data = (unsigned long )(& new_node->timer_context); i = 0; } goto ldv_54674; ldv_54673: *(new_node->rx_reorder_ptr + (unsigned long )i) = (void *)0; i = i + 1; ldv_54674: ; if (i < win_size) { goto ldv_54673; } else { } { tmp___3 = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___3); list_add_tail(& new_node->list, & priv->rx_reorder_tbl_ptr); spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); } return; } } int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd , void *data_buf ) { struct host_cmd_ds_11n_addba_req *add_ba_req ; { { add_ba_req = & cmd->params.add_ba_req; cmd->command = 206U; cmd->size = 22U; memcpy((void *)add_ba_req, (void const *)data_buf, 14UL); } return (0); } } int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct host_cmd_ds_11n_addba_req *cmd_addba_req ) { struct host_cmd_ds_11n_addba_rsp *add_ba_rsp ; u8 tid ; int win_size ; uint16_t block_ack_param_set ; { { add_ba_rsp = & cmd->params.add_ba_rsp; cmd->command = 207U; cmd->size = 24U; memcpy((void *)(& add_ba_rsp->peer_mac_addr), (void const *)(& cmd_addba_req->peer_mac_addr), 6UL); add_ba_rsp->dialog_token = cmd_addba_req->dialog_token; add_ba_rsp->block_ack_tmo = cmd_addba_req->block_ack_tmo; add_ba_rsp->ssn = cmd_addba_req->ssn; block_ack_param_set = cmd_addba_req->block_ack_param_set; tid = (u8 )(((int )block_ack_param_set & 60) >> 2); add_ba_rsp->status_code = 0U; block_ack_param_set = (unsigned int )block_ack_param_set & 63U; block_ack_param_set = (unsigned int )block_ack_param_set & 65534U; block_ack_param_set = (int )block_ack_param_set | ((int )((uint16_t )priv->add_ba_param.rx_win_size) << 6U); add_ba_rsp->block_ack_param_set = block_ack_param_set; win_size = (int )add_ba_rsp->block_ack_param_set >> 6; cmd_addba_req->block_ack_param_set = block_ack_param_set; mwifiex_11n_create_rx_reorder_tbl(priv, (u8 *)(& cmd_addba_req->peer_mac_addr), (int )tid, win_size, (int )cmd_addba_req->ssn); } return (0); } } int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd , void *data_buf ) { struct host_cmd_ds_11n_delba *del_ba ; { { del_ba = & cmd->params.del_ba; cmd->command = 208U; cmd->size = 20U; memcpy((void *)del_ba, (void const *)data_buf, 12UL); } return (0); } } int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv , u16 seq_num , u16 tid , u8 *ta , u8 pkt_type , void *payload ) { struct mwifiex_rx_reorder_tbl *tbl ; int start_win ; int end_win ; int win_size ; u16 pkt_index ; unsigned long tmp ; struct _ddebug descriptor ; long tmp___0 ; { { tbl = mwifiex_11n_get_rx_reorder_tbl(priv, (int )tid, ta); } if ((unsigned long )tbl == (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { if ((unsigned int )pkt_type != 231U) { if ((unsigned int )priv->bss_role == 1U) { { mwifiex_handle_uap_rx_forward(priv, (struct sk_buff *)payload); } } else { { mwifiex_process_rx_packet(priv, (struct sk_buff *)payload); } } } else { } return (0); } else { } { start_win = tbl->start_win; win_size = tbl->win_size; end_win = ((start_win + win_size) + -1) & 4095; ldv_del_timer_20___1(& tbl->timer_context.timer); tmp = msecs_to_jiffies((unsigned int const )(win_size * 50)); ldv_mod_timer_21(& tbl->timer_context.timer, (unsigned long )jiffies + tmp); } if ((int )tbl->flags & 1) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_11n_rx_reorder_pkt"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor.format = "RXREOR_FORCE_NO_DROP when HS is activated\n"; descriptor.lineno = 458U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "RXREOR_FORCE_NO_DROP when HS is activated\n"); } } else { } tbl->flags = (unsigned int )tbl->flags & 254U; } else if (start_win + 2048 > 4095) { if ((int )seq_num >= ((start_win + 2048) & 4095) && (int )seq_num < start_win) { return (-1); } else { } } else if ((int )seq_num < start_win || (int )seq_num > start_win + 2048) { return (-1); } else { } if ((unsigned int )pkt_type == 231U) { seq_num = (unsigned int )((u16 )((unsigned int )((int )seq_num + (int )((unsigned short )win_size)) + 65535U)) & 4095U; } else { } if (((end_win < start_win && (int )seq_num < start_win) && (int )seq_num > end_win) || (end_win > start_win && ((int )seq_num > end_win || (int )seq_num < start_win))) { end_win = (int )seq_num; if (((int )seq_num - win_size) + 1 >= 0) { start_win = (end_win - win_size) + 1; } else { start_win = ((int )seq_num - win_size) + 4097; } { mwifiex_11n_dispatch_pkt(priv, tbl, start_win); } } else { } if ((unsigned int )pkt_type != 231U) { if ((int )seq_num >= start_win) { pkt_index = (int )seq_num - (int )((u16 )start_win); } else { pkt_index = (unsigned int )((int )seq_num - (int )((u16 )start_win)) + 4096U; } if ((unsigned long )*(tbl->rx_reorder_ptr + (unsigned long )pkt_index) != (unsigned long )((void *)0)) { return (-1); } else { } *(tbl->rx_reorder_ptr + (unsigned long )pkt_index) = payload; } else { } { mwifiex_11n_scan_and_dispatch(priv, tbl); } return (0); } } void mwifiex_del_ba_tbl(struct mwifiex_private *priv , int tid , u8 *peer_mac , u8 type , int initiator ) { struct mwifiex_rx_reorder_tbl *tbl ; struct mwifiex_tx_ba_stream_tbl *ptx_tbl ; u8 cleanup_rx_reorder_tbl ; unsigned long flags ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; raw_spinlock_t *tmp___2 ; { if ((unsigned int )type == 2U) { cleanup_rx_reorder_tbl = initiator != 0; } else { cleanup_rx_reorder_tbl = initiator == 0; } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_del_ba_tbl"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor.format = "event: DELBA: %pM tid=%d initiator=%d\n"; descriptor.lineno = 532U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "event: DELBA: %pM tid=%d initiator=%d\n", peer_mac, tid, initiator); } } else { } if ((unsigned int )cleanup_rx_reorder_tbl != 0U) { { tbl = mwifiex_11n_get_rx_reorder_tbl(priv, tid, peer_mac); } if ((unsigned long )tbl == (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_del_ba_tbl"; descriptor___0.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor___0.format = "event: TID, TA not found in table\n"; descriptor___0.lineno = 539U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "event: TID, TA not found in table\n"); } } else { } return; } else { } { mwifiex_del_rx_reorder_entry(priv, tbl); } } else { { ptx_tbl = mwifiex_get_ba_tbl(priv, tid, peer_mac); } if ((unsigned long )ptx_tbl == (unsigned long )((struct mwifiex_tx_ba_stream_tbl *)0)) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_del_ba_tbl"; descriptor___1.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor___1.format = "event: TID, RA not found in table\n"; descriptor___1.lineno = 547U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "event: TID, RA not found in table\n"); } } else { } return; } else { } { tmp___2 = spinlock_check(& priv->tx_ba_stream_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___2); mwifiex_11n_delete_tx_ba_stream_tbl_entry(priv, ptx_tbl); spin_unlock_irqrestore(& priv->tx_ba_stream_tbl_lock, flags); } } return; } } int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_11n_addba_rsp *add_ba_rsp ; int tid ; int win_size ; struct mwifiex_rx_reorder_tbl *tbl ; uint16_t block_ack_param_set ; struct _ddebug descriptor ; long tmp ; { add_ba_rsp = & resp->params.add_ba_rsp; block_ack_param_set = add_ba_rsp->block_ack_param_set; tid = ((int )block_ack_param_set & 60) >> 2; if ((unsigned int )add_ba_rsp->status_code == 0U) { { win_size = (int )block_ack_param_set >> 6; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_11n_addba_resp"; descriptor.filename = "drivers/net/wireless/mwifiex/11n_rxreorder.c"; descriptor.format = "cmd: ADDBA RSP: %pM tid=%d ssn=%d win_size=%d\n"; descriptor.lineno = 587U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: ADDBA RSP: %pM tid=%d ssn=%d win_size=%d\n", (u8 *)(& add_ba_rsp->peer_mac_addr), tid, (int )add_ba_rsp->ssn, win_size); } } else { } } else { { dev_err((struct device const *)(priv->adapter)->dev, "ADDBA RSP: failed %pM tid=%d)\n", (u8 *)(& add_ba_rsp->peer_mac_addr), tid); tbl = mwifiex_11n_get_rx_reorder_tbl(priv, tid, (u8 *)(& add_ba_rsp->peer_mac_addr)); } if ((unsigned long )tbl != (unsigned long )((struct mwifiex_rx_reorder_tbl *)0)) { { mwifiex_del_rx_reorder_entry(priv, tbl); } } else { } } return (0); } } void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv , struct host_cmd_ds_11n_batimeout *event ) { struct host_cmd_ds_11n_delba delba ; { { memset((void *)(& delba), 0, 12UL); memcpy((void *)(& delba.peer_mac_addr), (void const *)(& event->peer_mac_addr), 6UL); delba.del_ba_param_set = (__le16 )((int )delba.del_ba_param_set | ((int )((unsigned short )event->tid) << 12U)); delba.del_ba_param_set = (__le16 )((int )delba.del_ba_param_set | ((int )((unsigned short )event->origninator) << 11U)); delba.reason_code = 39U; mwifiex_send_cmd_async(priv, 208, 0, 0U, (void *)(& delba)); } return; } } void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv ) { struct mwifiex_rx_reorder_tbl *del_tbl_ptr ; struct mwifiex_rx_reorder_tbl *tmp_node ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr___1 ; { { tmp = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)priv->rx_reorder_tbl_ptr.next; del_tbl_ptr = (struct mwifiex_rx_reorder_tbl *)__mptr; __mptr___0 = (struct list_head const *)del_tbl_ptr->list.next; tmp_node = (struct mwifiex_rx_reorder_tbl *)__mptr___0; } goto ldv_54766; ldv_54765: { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); mwifiex_del_rx_reorder_entry(priv, del_tbl_ptr); tmp___0 = spinlock_check(& priv->rx_reorder_tbl_lock); flags = _raw_spin_lock_irqsave(tmp___0); del_tbl_ptr = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct mwifiex_rx_reorder_tbl *)__mptr___1; } ldv_54766: ; if ((unsigned long )(& del_tbl_ptr->list) != (unsigned long )(& priv->rx_reorder_tbl_ptr)) { goto ldv_54765; } else { } { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, flags); INIT_LIST_HEAD(& priv->rx_reorder_tbl_ptr); mwifiex_reset_11n_rx_seq_num(priv); } return; } } void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter , u8 flags ) { struct mwifiex_private *priv ; struct mwifiex_rx_reorder_tbl *tbl ; unsigned long lock_flags ; int i ; int tmp ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { i = 0; goto ldv_54788; ldv_54787: priv = adapter->priv[i]; if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { goto ldv_54776; } else { } { tmp = list_empty((struct list_head const *)(& priv->rx_reorder_tbl_ptr)); } if (tmp != 0) { goto ldv_54776; } else { } { tmp___0 = spinlock_check(& priv->rx_reorder_tbl_lock); lock_flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)priv->rx_reorder_tbl_ptr.next; tbl = (struct mwifiex_rx_reorder_tbl *)__mptr; } goto ldv_54785; ldv_54784: tbl->flags = flags; __mptr___0 = (struct list_head const *)tbl->list.next; tbl = (struct mwifiex_rx_reorder_tbl *)__mptr___0; ldv_54785: ; if ((unsigned long )(& tbl->list) != (unsigned long )(& priv->rx_reorder_tbl_ptr)) { goto ldv_54784; } else { } { spin_unlock_irqrestore(& priv->rx_reorder_tbl_lock, lock_flags); } ldv_54776: i = i + 1; ldv_54788: ; if (i < (int )adapter->priv_num) { goto ldv_54787; } else { } return; } } void ldv_dispatch_instance_register_12_2(struct timer_list *arg0 ) ; void ldv_dispatch_instance_register_12_2(struct timer_list *arg0 ) { struct ldv_struct_timer_instance_7 *cf_arg_7 ; void *tmp ; { { tmp = ldv_xmalloc(16UL); cf_arg_7 = (struct ldv_struct_timer_instance_7 *)tmp; cf_arg_7->arg0 = arg0; ldv_timer_timer_instance_7((void *)cf_arg_7); } return; } } int ldv_mod_timer(int arg0 , struct timer_list *arg1 , unsigned long arg2 ) { struct timer_list *ldv_12_timer_list_timer_list ; int tmp ; { { tmp = ldv_undef_int(); } if (tmp != 0) { { ldv_assume(arg0 == 0); ldv_12_timer_list_timer_list = arg1; ldv_dispatch_instance_register_12_2(ldv_12_timer_list_timer_list); } return (arg0); } else { { ldv_assume(arg0 != 0); } return (arg0); } return (arg0); } } static int ldv_del_timer_19___0(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } static int ldv_del_timer_20___1(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___1 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = del_timer(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_del_timer(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } static int ldv_mod_timer_21(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___2 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; tmp___0 = ldv_mod_timer(ldv_func_res, ldv_func_arg1, ldv_func_arg2); } return (tmp___0); return (ldv_func_res); } } __inline static void le16_add_cpu(__le16 *var , u16 val ) { { *var = (int )*var + (int )val; return; } } static int ldv_mod_timer_19___1(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; static int ldv_mod_timer_20(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; __inline static void *kmalloc(size_t size , gfp_t flags ) { void *tmp___2 ; { { tmp___2 = __kmalloc(size, flags); } return (tmp___2); } } __inline static void *kzalloc(size_t size , gfp_t flags ) ; extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy * , int ) ; __inline static struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy , int freq ) { struct ieee80211_channel *tmp ; { { tmp = __ieee80211_get_channel(wiphy, freq); } return (tmp); } } extern struct cfg80211_bss *cfg80211_inform_bss_width(struct wiphy * , struct ieee80211_channel * , enum nl80211_bss_scan_width , u8 const * , u64 , u16 , u16 , u8 const * , size_t , s32 , gfp_t ) ; __inline static struct cfg80211_bss *cfg80211_inform_bss(struct wiphy *wiphy , struct ieee80211_channel *channel , u8 const *bssid , u64 tsf , u16 capability , u16 beacon_interval , u8 const *ie , size_t ielen , s32 signal , gfp_t gfp ) { struct cfg80211_bss *tmp ; { { tmp = cfg80211_inform_bss_width(wiphy, channel, 0, bssid, tsf, (int )capability, (int )beacon_interval, ie, ielen, signal, gfp); } return (tmp); } } extern void cfg80211_put_bss(struct wiphy * , struct cfg80211_bss * ) ; __inline static bool is_zero_ether_addr(u8 const *addr ) { { return (((unsigned int )*((u32 const *)addr) | (unsigned int )*((u16 const *)addr + 4U)) == 0U); } } int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd , struct mwifiex_scan_cmd_config *scan_cfg ) ; int mwifiex_ret_802_11_scan(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; s32 mwifiex_ssid_cmp(struct cfg80211_ssid *ssid1 , struct cfg80211_ssid *ssid2 ) ; int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd ) ; int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv , u16 vsie_mask , u8 **buffer ) ; void mwifiex_save_curr_bcn(struct mwifiex_private *priv ) ; __inline static u8 mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv ) { { if ((unsigned int )priv->csa_chan == 0U) { return (0U); } else { } if ((unsigned long )jiffies > priv->csa_expire_time) { priv->csa_chan = 0U; priv->csa_expire_time = 0UL; } else { } return (priv->csa_chan); } } int mwifiex_request_scan(struct mwifiex_private *priv , struct cfg80211_ssid *req_ssid ) ; int mwifiex_scan_networks(struct mwifiex_private *priv , struct mwifiex_user_scan_cfg const *user_scan_in ) ; int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv , struct cfg80211_bss *bss , struct mwifiex_bssdescriptor *bss_desc ) ; int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter , struct mwifiex_bssdescriptor *bss_entry ) ; int mwifiex_check_network_compatibility(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) ; static u8 mwifiex_wpa_oui[2U][4U] = { { 0U, 80U, 242U, 2U}, { 0U, 80U, 242U, 4U}}; static u8 mwifiex_rsn_oui[2U][4U] = { { 0U, 15U, 172U, 2U}, { 0U, 15U, 172U, 4U}}; static u8 mwifiex_search_oui_in_ie(struct ie_body *iebody , u8 *oui ) { u8 count ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; { count = iebody->ptk_cnt[0]; goto ldv_54566; ldv_54565: { tmp = memcmp((void const *)(& iebody->ptk_body), (void const *)oui, 4UL); } if (tmp == 0) { return (1U); } else { } count = (u8 )((int )count - 1); if ((unsigned int )count != 0U) { iebody = iebody + 4U; } else { } ldv_54566: ; if ((unsigned int )count != 0U) { goto ldv_54565; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_search_oui_in_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: %s: OUI is not found in PTK\n"; descriptor.lineno = 109U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: %s: OUI is not found in PTK\n", "mwifiex_search_oui_in_ie"); } } else { } return (0U); } } static u8 mwifiex_is_rsn_oui_present(struct mwifiex_bssdescriptor *bss_desc , u32 cipher ) { u8 *oui ; struct ie_body *iebody ; u8 ret ; { ret = 0U; if ((unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) && (unsigned int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id == 48U) { { iebody = (struct ie_body *)(& (bss_desc->bcn_rsn_ie)->data) + 2U; oui = (u8 *)(& mwifiex_rsn_oui) + (unsigned long )cipher; ret = mwifiex_search_oui_in_ie(iebody, oui); } if ((unsigned int )ret != 0U) { return (ret); } else { } } else { } return (ret); } } static u8 mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc , u32 cipher ) { u8 *oui ; struct ie_body *iebody ; u8 ret ; { ret = 0U; if ((unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) && (unsigned int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id == 221U) { { iebody = (struct ie_body *)(& (bss_desc->bcn_wpa_ie)->data); oui = (u8 *)(& mwifiex_wpa_oui) + (unsigned long )cipher; ret = mwifiex_search_oui_in_ie(iebody, oui); } if ((unsigned int )ret != 0U) { return (ret); } else { } } else { } return (ret); } } s32 mwifiex_ssid_cmp(struct cfg80211_ssid *ssid1 , struct cfg80211_ssid *ssid2 ) { int tmp ; { if (((unsigned long )ssid1 == (unsigned long )((struct cfg80211_ssid *)0) || (unsigned long )ssid2 == (unsigned long )((struct cfg80211_ssid *)0)) || (int )ssid1->ssid_len != (int )ssid2->ssid_len) { return (-1); } else { } { tmp = memcmp((void const *)(& ssid1->ssid), (void const *)(& ssid2->ssid), (size_t )ssid1->ssid_len); } return (tmp); } } static bool mwifiex_is_bss_wapi(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { { if ((unsigned int )priv->sec_info.wapi_enabled != 0U && ((unsigned long )bss_desc->bcn_wapi_ie != (unsigned long )((struct ieee_types_generic *)0) && (unsigned int )(bss_desc->bcn_wapi_ie)->ieee_hdr.element_id == 68U)) { return (1); } else { } return (0); } } static bool mwifiex_is_bss_no_sec(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { { if ((((((unsigned int )priv->sec_info.wep_enabled == 0U && (unsigned int )*((unsigned short *)priv + 358UL) == 0U) && ((unsigned long )bss_desc->bcn_wpa_ie == (unsigned long )((struct ieee_types_vendor_specific *)0) || (unsigned int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id != 221U)) && ((unsigned long )bss_desc->bcn_rsn_ie == (unsigned long )((struct ieee_types_generic *)0) || (unsigned int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id != 48U)) && priv->sec_info.encryption_mode == 0U) && bss_desc->privacy == 0U) { return (1); } else { } return (0); } } static bool mwifiex_is_bss_static_wep(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { { if (((unsigned int )priv->sec_info.wep_enabled != 0U && (unsigned int )*((unsigned short *)priv + 358UL) == 0U) && bss_desc->privacy != 0U) { return (1); } else { } return (0); } } static bool mwifiex_is_bss_wpa(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { struct _ddebug descriptor ; long tmp ; { if ((((unsigned int )priv->sec_info.wep_enabled == 0U && (unsigned int )priv->sec_info.wpa_enabled != 0U) && (unsigned int )priv->sec_info.wpa2_enabled == 0U) && ((unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) && (unsigned int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id == 221U)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_is_bss_wpa"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: %s: WPA: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n"; descriptor.lineno = 260U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: %s: WPA: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n", "mwifiex_is_bss_wpa", (unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) ? (int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id : 0, (unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) ? (int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id : 0, (unsigned int )priv->sec_info.wep_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa2_enabled != 0U ? (char *)"e" : (char *)"d", priv->sec_info.encryption_mode, bss_desc->privacy); } } else { } return (1); } else { } return (0); } } static bool mwifiex_is_bss_wpa2(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { struct _ddebug descriptor ; long tmp ; { if ((((unsigned int )priv->sec_info.wep_enabled == 0U && (unsigned int )priv->sec_info.wpa_enabled == 0U) && (unsigned int )priv->sec_info.wpa2_enabled != 0U) && ((unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) && (unsigned int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id == 48U)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_is_bss_wpa2"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: %s: WPA2: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n"; descriptor.lineno = 296U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: %s: WPA2: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n", "mwifiex_is_bss_wpa2", (unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) ? (int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id : 0, (unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) ? (int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id : 0, (unsigned int )priv->sec_info.wep_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa2_enabled != 0U ? (char *)"e" : (char *)"d", priv->sec_info.encryption_mode, bss_desc->privacy); } } else { } return (1); } else { } return (0); } } static bool mwifiex_is_bss_adhoc_aes(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { { if ((((((unsigned int )priv->sec_info.wep_enabled == 0U && (unsigned int )*((unsigned short *)priv + 358UL) == 0U) && ((unsigned long )bss_desc->bcn_wpa_ie == (unsigned long )((struct ieee_types_vendor_specific *)0) || (unsigned int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id != 221U)) && ((unsigned long )bss_desc->bcn_rsn_ie == (unsigned long )((struct ieee_types_generic *)0) || (unsigned int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id != 48U)) && priv->sec_info.encryption_mode == 0U) && bss_desc->privacy != 0U) { return (1); } else { } return (0); } } static bool mwifiex_is_bss_dynamic_wep(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { struct _ddebug descriptor ; long tmp ; { if ((((((unsigned int )priv->sec_info.wep_enabled == 0U && (unsigned int )*((unsigned short *)priv + 358UL) == 0U) && ((unsigned long )bss_desc->bcn_wpa_ie == (unsigned long )((struct ieee_types_vendor_specific *)0) || (unsigned int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id != 221U)) && ((unsigned long )bss_desc->bcn_rsn_ie == (unsigned long )((struct ieee_types_generic *)0) || (unsigned int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id != 48U)) && priv->sec_info.encryption_mode != 0U) && bss_desc->privacy != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_is_bss_dynamic_wep"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: %s: dynamic WEP: wpa_ie=%#x wpa2_ie=%#x EncMode=%#x privacy=%#x\n"; descriptor.lineno = 350U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: %s: dynamic WEP: wpa_ie=%#x wpa2_ie=%#x EncMode=%#x privacy=%#x\n", "mwifiex_is_bss_dynamic_wep", (unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) ? (int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id : 0, (unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) ? (int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id : 0, priv->sec_info.encryption_mode, bss_desc->privacy); } } else { } return (1); } else { } return (0); } } static s32 mwifiex_is_network_compatible(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u32 mode ) { struct mwifiex_adapter *adapter ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; bool tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; struct _ddebug descriptor___2 ; long tmp___3 ; u8 tmp___4 ; u8 tmp___5 ; struct _ddebug descriptor___3 ; long tmp___6 ; u8 tmp___7 ; u8 tmp___8 ; bool tmp___9 ; bool tmp___10 ; bool tmp___11 ; bool tmp___12 ; bool tmp___13 ; bool tmp___14 ; struct _ddebug descriptor___4 ; long tmp___15 ; { adapter = priv->adapter; bss_desc->disable_11n = 0U; if (((unsigned int )priv->media_connected != 0U && priv->bss_mode == 2U) && bss_desc->bss_mode == 2U) { return (0); } else { } if ((unsigned int )priv->wps.session_enable != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_is_network_compatible"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: return success directly in WPS period\n"; descriptor.lineno = 390U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: return success directly in WPS period\n"); } } else { } return (0); } else { } if ((unsigned int )bss_desc->chan_sw_ie_present != 0U) { { dev_err((struct device const *)adapter->dev, "Don\'t connect to AP with WLAN_EID_CHANNEL_SWITCH\n"); } return (-1); } else { } { tmp___1 = mwifiex_is_bss_wapi(priv, bss_desc); } if ((int )tmp___1) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_is_network_compatible"; descriptor___0.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___0.format = "info: return success for WAPI AP\n"; descriptor___0.lineno = 401U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: return success for WAPI AP\n"); } } else { } return (0); } else { } if (bss_desc->bss_mode == mode) { { tmp___14 = mwifiex_is_bss_no_sec(priv, bss_desc); } if ((int )tmp___14) { return (0); } else { { tmp___13 = mwifiex_is_bss_static_wep(priv, bss_desc); } if ((int )tmp___13) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_is_network_compatible"; descriptor___1.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___1.format = "info: Disable 11n in WEP mode.\n"; descriptor___1.lineno = 411U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: Disable 11n in WEP mode.\n"); } } else { } bss_desc->disable_11n = 1U; return (0); } else { { tmp___12 = mwifiex_is_bss_wpa(priv, bss_desc); } if ((int )tmp___12) { if (((unsigned int )(priv->adapter)->config_bands & 24U) != 0U && (unsigned long )bss_desc->bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)) { { tmp___5 = mwifiex_is_wpa_oui_present(bss_desc, 1U); } if ((unsigned int )tmp___5 == 0U) { { tmp___4 = mwifiex_is_wpa_oui_present(bss_desc, 0U); } if ((unsigned int )tmp___4 != 0U) { { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_is_network_compatible"; descriptor___2.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___2.format = "info: Disable 11n if AES is not supported by AP\n"; descriptor___2.lineno = 426U; descriptor___2.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: Disable 11n if AES is not supported by AP\n"); } } else { } bss_desc->disable_11n = 1U; } else { return (-1); } } else { } } else { } return (0); } else { { tmp___11 = mwifiex_is_bss_wpa2(priv, bss_desc); } if ((int )tmp___11) { if (((unsigned int )(priv->adapter)->config_bands & 24U) != 0U && (unsigned long )bss_desc->bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)) { { tmp___8 = mwifiex_is_rsn_oui_present(bss_desc, 1U); } if ((unsigned int )tmp___8 == 0U) { { tmp___7 = mwifiex_is_rsn_oui_present(bss_desc, 0U); } if ((unsigned int )tmp___7 != 0U) { { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_is_network_compatible"; descriptor___3.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___3.format = "info: Disable 11n if AES is not supported by AP\n"; descriptor___3.lineno = 445U; descriptor___3.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: Disable 11n if AES is not supported by AP\n"); } } else { } bss_desc->disable_11n = 1U; } else { return (-1); } } else { } } else { } return (0); } else { { tmp___10 = mwifiex_is_bss_adhoc_aes(priv, bss_desc); } if ((int )tmp___10) { return (0); } else { { tmp___9 = mwifiex_is_bss_dynamic_wep(priv, bss_desc); } if ((int )tmp___9) { return (0); } else { } } } } } } { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_is_network_compatible"; descriptor___4.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___4.format = "info: %s: failed: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n"; descriptor___4.lineno = 471U; descriptor___4.flags = 0U; tmp___15 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___15 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "info: %s: failed: wpa_ie=%#x wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n", "mwifiex_is_network_compatible", (unsigned long )bss_desc->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0) ? (int )(bss_desc->bcn_wpa_ie)->vend_hdr.element_id : 0, (unsigned long )bss_desc->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0) ? (int )(bss_desc->bcn_rsn_ie)->ieee_hdr.element_id : 0, (unsigned int )priv->sec_info.wep_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa_enabled != 0U ? (char *)"e" : (char *)"d", (unsigned int )priv->sec_info.wpa2_enabled != 0U ? (char *)"e" : (char *)"d", priv->sec_info.encryption_mode, bss_desc->privacy); } } else { } return (-1); } else { } return (-1); } } static int mwifiex_scan_create_channel_list(struct mwifiex_private *priv , struct mwifiex_user_scan_cfg const *user_scan_in , struct mwifiex_chan_scan_param_set *scan_chan_list , u8 filtered_scan ) { enum ieee80211_band band ; struct ieee80211_supported_band *sband ; struct ieee80211_channel *ch ; struct mwifiex_adapter *adapter ; int chan_idx ; int i ; { adapter = priv->adapter; chan_idx = 0; band = 0; goto ldv_54653; ldv_54652: ; if ((unsigned long )((priv->wdev)->wiphy)->bands[(unsigned int )band] == (unsigned long )((struct ieee80211_supported_band *)0)) { goto ldv_54647; } else { } sband = ((priv->wdev)->wiphy)->bands[(unsigned int )band]; i = 0; goto ldv_54650; ldv_54649: ch = sband->channels + (unsigned long )i; if ((int )ch->flags & 1) { goto ldv_54648; } else { } (scan_chan_list + (unsigned long )chan_idx)->radio_type = (u8 )band; if ((unsigned long )user_scan_in != (unsigned long )((struct mwifiex_user_scan_cfg const *)0) && (unsigned int )user_scan_in->chan_list[0].scan_time != 0U) { (scan_chan_list + (unsigned long )chan_idx)->max_scan_time = (unsigned short )user_scan_in->chan_list[0].scan_time; } else if ((ch->flags & 2U) != 0U) { (scan_chan_list + (unsigned long )chan_idx)->max_scan_time = adapter->passive_scan_time; } else { (scan_chan_list + (unsigned long )chan_idx)->max_scan_time = adapter->active_scan_time; } if ((ch->flags & 2U) != 0U) { (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (u8 )((unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap | 1U); } else { (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap & 254U; } (scan_chan_list + (unsigned long )chan_idx)->chan_number = (u8 )ch->hw_value; if ((unsigned int )filtered_scan != 0U) { (scan_chan_list + (unsigned long )chan_idx)->max_scan_time = adapter->specific_scan_time; (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (u8 )((unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap | 2U); } else { } chan_idx = chan_idx + 1; ldv_54648: i = i + 1; ldv_54650: ; if (i < sband->n_channels) { goto ldv_54649; } else { } ldv_54647: band = (enum ieee80211_band )((unsigned int )band + 1U); ldv_54653: ; if ((unsigned int )band <= 2U) { goto ldv_54652; } else { } return (chan_idx); } } static int mwifiex_append_rate_tlv(struct mwifiex_private *priv , struct mwifiex_scan_cmd_config *scan_cfg_out , u8 radio ) { struct mwifiex_ie_types_rates_param_set *rates_tlv ; u8 rates[14U] ; u8 *tlv_pos ; u32 rates_size ; struct _ddebug descriptor ; long tmp ; { { memset((void *)(& rates), 0, 14UL); tlv_pos = (u8 *)(& scan_cfg_out->tlv_buf) + (unsigned long )scan_cfg_out->tlv_buf_len; } if ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0)) { { rates_size = mwifiex_get_rates_from_cfg80211(priv, (u8 *)(& rates), (int )radio); } } else { { rates_size = mwifiex_get_supported_rates(priv, (u8 *)(& rates)); } } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_append_rate_tlv"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: SCAN_CMD: Rates size = %d\n"; descriptor.lineno = 567U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: SCAN_CMD: Rates size = %d\n", rates_size); } } else { } { rates_tlv = (struct mwifiex_ie_types_rates_param_set *)tlv_pos; rates_tlv->header.type = 1U; rates_tlv->header.len = (unsigned short )rates_size; memcpy((void *)(& rates_tlv->rates), (void const *)(& rates), (size_t )rates_size); scan_cfg_out->tlv_buf_len = (scan_cfg_out->tlv_buf_len + rates_size) + 4U; } return ((int )rates_size); } } static int mwifiex_scan_channel_list(struct mwifiex_private *priv , u32 max_chan_per_scan , u8 filtered_scan , struct mwifiex_scan_cmd_config *scan_cfg_out , struct mwifiex_ie_types_chan_list_param_set *chan_tlv_out , struct mwifiex_chan_scan_param_set *scan_chan_list ) { int ret ; struct mwifiex_chan_scan_param_set *tmp_chan_list ; struct mwifiex_chan_scan_param_set *start_chan ; u32 tlv_idx ; u32 rates_size ; u32 total_scan_time ; u32 done_early ; u8 radio_type ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; { ret = 0; if (((unsigned long )scan_cfg_out == (unsigned long )((struct mwifiex_scan_cmd_config *)0) || (unsigned long )chan_tlv_out == (unsigned long )((struct mwifiex_ie_types_chan_list_param_set *)0)) || (unsigned long )scan_chan_list == (unsigned long )((struct mwifiex_chan_scan_param_set *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_scan_channel_list"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: Scan: Null detect: %p, %p, %p\n"; descriptor.lineno = 606U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: Scan: Null detect: %p, %p, %p\n", scan_cfg_out, chan_tlv_out, scan_chan_list); } } else { } return (-1); } else { } { mwifiex_11h_get_csa_closed_channel(priv); chan_tlv_out->header.type = 257U; tmp_chan_list = scan_chan_list; } goto ldv_54690; ldv_54689: tlv_idx = 0U; total_scan_time = 0U; radio_type = 0U; chan_tlv_out->header.len = 0U; start_chan = tmp_chan_list; done_early = 0U; goto ldv_54684; ldv_54686: ; if ((int )tmp_chan_list->chan_number == (int )priv->csa_chan) { tmp_chan_list = tmp_chan_list + 1; goto ldv_54684; } else { } { radio_type = tmp_chan_list->radio_type; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_scan_channel_list"; descriptor___0.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___0.format = "info: Scan: Chan(%3d), Radio(%d), Mode(%d, %d), Dur(%d)\n"; descriptor___0.lineno = 658U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: Scan: Chan(%3d), Radio(%d), Mode(%d, %d), Dur(%d)\n", (int )tmp_chan_list->chan_number, (int )tmp_chan_list->radio_type, (int )tmp_chan_list->chan_scan_mode_bitmap & 1, ((int )tmp_chan_list->chan_scan_mode_bitmap & 2) >> 1, (int )tmp_chan_list->max_scan_time); } } else { } { memcpy((void *)(& chan_tlv_out->chan_scan_param) + (unsigned long )tlv_idx, (void const *)tmp_chan_list, 7UL); le16_add_cpu(& chan_tlv_out->header.len, 7); scan_cfg_out->tlv_buf_len = (unsigned int )((long )chan_tlv_out) - (unsigned int )((long )(& scan_cfg_out->tlv_buf)); scan_cfg_out->tlv_buf_len = (scan_cfg_out->tlv_buf_len + (u32 )chan_tlv_out->header.len) + 4U; tlv_idx = tlv_idx + 1U; total_scan_time = total_scan_time + (u32 )tmp_chan_list->max_scan_time; done_early = 0U; } if ((unsigned int )filtered_scan == 0U && (((unsigned int )tmp_chan_list->chan_number == 1U || (unsigned int )tmp_chan_list->chan_number == 6U) || (unsigned int )tmp_chan_list->chan_number == 11U)) { done_early = 1U; } else { } tmp_chan_list = tmp_chan_list + 1; if ((unsigned int )filtered_scan == 0U && (((unsigned int )tmp_chan_list->chan_number == 1U || (unsigned int )tmp_chan_list->chan_number == 6U) || (unsigned int )tmp_chan_list->chan_number == 11U)) { done_early = 1U; } else { } ldv_54684: ; if (tlv_idx < max_chan_per_scan && ((unsigned int )tmp_chan_list->chan_number != 0U && done_early == 0U)) { goto ldv_54686; } else { } if (total_scan_time > 9000U) { { dev_err((struct device const *)(priv->adapter)->dev, "total scan time %dms is over limit (%dms), scan skipped\n", total_scan_time, 9000); ret = -1; } goto ldv_54688; } else { } { tmp___1 = mwifiex_append_rate_tlv(priv, scan_cfg_out, (int )radio_type); rates_size = (u32 )tmp___1; (priv->adapter)->scan_channels = start_chan; ret = mwifiex_send_cmd_async(priv, 6, 1, 0U, (void *)scan_cfg_out); scan_cfg_out->tlv_buf_len = (scan_cfg_out->tlv_buf_len - rates_size) - 4U; } if (ret != 0) { goto ldv_54688; } else { } ldv_54690: ; if ((unsigned int )tmp_chan_list->chan_number != 0U) { goto ldv_54689; } else { } ldv_54688: ; if (ret != 0) { return (-1); } else { } return (0); } } static void mwifiex_config_scan(struct mwifiex_private *priv , struct mwifiex_user_scan_cfg const *user_scan_in , struct mwifiex_scan_cmd_config *scan_cfg_out , struct mwifiex_ie_types_chan_list_param_set **chan_list_out , struct mwifiex_chan_scan_param_set *scan_chan_list , u8 *max_chan_per_scan , u8 *filtered_scan , u8 *scan_current_only ) { struct mwifiex_adapter *adapter ; struct mwifiex_ie_types_num_probes *num_probes_tlv ; struct mwifiex_ie_types_wildcard_ssid_params *wildcard_ssid_tlv ; u8 *tlv_pos ; u32 num_probes ; u32 ssid_len ; u32 chan_idx ; u32 chan_num ; u32 scan_type ; u16 scan_dur ; u8 channel ; u8 radio_type ; int i ; u8 ssid_filter ; struct mwifiex_ie_types_htcap *ht_cap ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct _ddebug descriptor___1 ; long tmp___3 ; struct _ddebug descriptor___2 ; long tmp___4 ; struct _ddebug descriptor___3 ; long tmp___5 ; int tmp___6 ; { adapter = priv->adapter; scan_cfg_out->tlv_buf_len = 0U; tlv_pos = (u8 *)(& scan_cfg_out->tlv_buf); *filtered_scan = 0U; *scan_current_only = 0U; if ((unsigned long )user_scan_in != (unsigned long )((struct mwifiex_user_scan_cfg const *)0)) { { ssid_filter = 1U; scan_cfg_out->bss_mode = (unsigned int )((unsigned char )user_scan_in->bss_mode) != 0U ? (u8 )user_scan_in->bss_mode : (u8 )adapter->scan_mode; num_probes = (unsigned int )((unsigned char )user_scan_in->num_probes) != 0U ? (u32 )user_scan_in->num_probes : (u32 )adapter->scan_probes; memcpy((void *)(& scan_cfg_out->specific_bssid), (void const *)(& user_scan_in->specific_bssid), 6UL); i = 0; } goto ldv_54719; ldv_54718: ssid_len = (u32 )(user_scan_in->ssid_list + (unsigned long )i)->ssid_len; wildcard_ssid_tlv = (struct mwifiex_ie_types_wildcard_ssid_params *)tlv_pos; wildcard_ssid_tlv->header.type = 274U; wildcard_ssid_tlv->header.len = (unsigned int )((unsigned short )ssid_len) + 1U; if (ssid_len != 0U) { wildcard_ssid_tlv->max_ssid_length = 0U; } else { wildcard_ssid_tlv->max_ssid_length = 32U; } { memcpy((void *)(& wildcard_ssid_tlv->ssid), (void const *)(& (user_scan_in->ssid_list + (unsigned long )i)->ssid), (size_t )ssid_len); tlv_pos = tlv_pos + ((unsigned long )wildcard_ssid_tlv->header.len + 4UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_config_scan"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: scan: ssid[%d]: %s, %d\n"; descriptor.lineno = 883U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: scan: ssid[%d]: %s, %d\n", i, (u8 *)(& wildcard_ssid_tlv->ssid), (int )wildcard_ssid_tlv->max_ssid_length); } } else { } if (ssid_len == 0U && (unsigned int )wildcard_ssid_tlv->max_ssid_length != 0U) { ssid_filter = 0U; } else { } i = i + 1; ldv_54719: ; if (i < (int )user_scan_in->num_ssids) { goto ldv_54718; } else { } if (i != 0 && (unsigned int )ssid_filter != 0U) { *filtered_scan = 1U; } else { { tmp___0 = is_zero_ether_addr((u8 const *)(& scan_cfg_out->specific_bssid)); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { *filtered_scan = 1U; } else { } } } else { scan_cfg_out->bss_mode = (unsigned char )adapter->scan_mode; num_probes = (u32 )adapter->scan_probes; } if ((unsigned int )*filtered_scan != 0U) { *max_chan_per_scan = 14U; } else { *max_chan_per_scan = 4U; } if (num_probes != 0U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_config_scan"; descriptor___0.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___0.format = "info: scan: num_probes = %d\n"; descriptor___0.lineno = 921U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: scan: num_probes = %d\n", num_probes); } } else { } num_probes_tlv = (struct mwifiex_ie_types_num_probes *)tlv_pos; num_probes_tlv->header.type = 258U; num_probes_tlv->header.len = 2U; num_probes_tlv->num_probes = (unsigned short )num_probes; tlv_pos = tlv_pos + ((unsigned long )num_probes_tlv->header.len + 4UL); } else { } if (((unsigned long )(priv->adapter)->fw_cap_info & 2048UL) != 0UL && ((unsigned int )(priv->adapter)->config_bands & 24U) != 0U) { { ht_cap = (struct mwifiex_ie_types_htcap *)tlv_pos; memset((void *)ht_cap, 0, 30UL); ht_cap->header.type = 45U; ht_cap->header.len = 26U; radio_type = mwifiex_band_to_radio_type((int )(priv->adapter)->config_bands); mwifiex_fill_cap_info(priv, (int )radio_type, ht_cap); tlv_pos = tlv_pos + 30UL; } } else { } { mwifiex_cmd_append_vsie_tlv(priv, 1, & tlv_pos); *chan_list_out = (struct mwifiex_ie_types_chan_list_param_set *)tlv_pos; } if ((unsigned long )user_scan_in != (unsigned long )((struct mwifiex_user_scan_cfg const *)0) && (unsigned int )((unsigned char )user_scan_in->chan_list[0].chan_number) != 0U) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_config_scan"; descriptor___1.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___1.format = "info: Scan: Using supplied channel list\n"; descriptor___1.lineno = 962U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: Scan: Using supplied channel list\n"); } } else { } chan_idx = 0U; goto ldv_54724; ldv_54723: channel = user_scan_in->chan_list[chan_idx].chan_number; (scan_chan_list + (unsigned long )chan_idx)->chan_number = channel; radio_type = user_scan_in->chan_list[chan_idx].radio_type; (scan_chan_list + (unsigned long )chan_idx)->radio_type = radio_type; scan_type = (u32 )user_scan_in->chan_list[chan_idx].scan_type; if (scan_type == 2U) { (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (u8 )((unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap | 1U); } else { (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap & 254U; } if ((unsigned int )*filtered_scan != 0U) { (scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap = (u8 )((unsigned int )(scan_chan_list + (unsigned long )chan_idx)->chan_scan_mode_bitmap | 2U); } else { } if ((unsigned int )user_scan_in->chan_list[chan_idx].scan_time != 0U) { scan_dur = (unsigned short )user_scan_in->chan_list[chan_idx].scan_time; } else if (scan_type == 2U) { scan_dur = adapter->passive_scan_time; } else if ((unsigned int )*filtered_scan != 0U) { scan_dur = adapter->specific_scan_time; } else { scan_dur = adapter->active_scan_time; } (scan_chan_list + (unsigned long )chan_idx)->min_scan_time = scan_dur; (scan_chan_list + (unsigned long )chan_idx)->max_scan_time = scan_dur; chan_idx = chan_idx + 1U; ldv_54724: ; if (chan_idx <= 49U && (unsigned int )((unsigned char )user_scan_in->chan_list[chan_idx].chan_number) != 0U) { goto ldv_54723; } else { } if (chan_idx == 1U && (u32 )user_scan_in->chan_list[0].chan_number == priv->curr_bss_params.bss_descriptor.channel) { { *scan_current_only = 1U; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_config_scan"; descriptor___2.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___2.format = "info: Scan: Scanning current channel only\n"; descriptor___2.lineno = 1016U; descriptor___2.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: Scan: Scanning current channel only\n"); } } else { } } else { } chan_num = chan_idx; } else { { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_config_scan"; descriptor___3.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___3.format = "info: Scan: Creating full region channel list\n"; descriptor___3.lineno = 1021U; descriptor___3.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: Scan: Creating full region channel list\n"); } } else { } { tmp___6 = mwifiex_scan_create_channel_list(priv, user_scan_in, scan_chan_list, (int )*filtered_scan); chan_num = (u32 )tmp___6; } } if ((unsigned int )priv->media_connected != 0U) { if (chan_num <= 14U) { *max_chan_per_scan = 1U; } else if (chan_num <= 26U) { *max_chan_per_scan = 2U; } else if (chan_num <= 34U) { *max_chan_per_scan = 3U; } else { *max_chan_per_scan = 4U; } } else { } return; } } static void mwifiex_ret_802_11_scan_get_tlv_ptrs(struct mwifiex_adapter *adapter , struct mwifiex_ie_types_data *tlv , u32 tlv_buf_size , u32 req_tlv_type , struct mwifiex_ie_types_data **tlv_data ) { struct mwifiex_ie_types_data *current_tlv ; u32 tlv_buf_left ; u32 tlv_type ; u32 tlv_len ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { { current_tlv = tlv; tlv_buf_left = tlv_buf_size; *tlv_data = (struct mwifiex_ie_types_data *)0; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_scan_get_tlv_ptrs"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: SCAN_RESP: tlv_buf_size = %d\n"; descriptor.lineno = 1070U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: SCAN_RESP: tlv_buf_size = %d\n", tlv_buf_size); } } else { } goto ldv_54749; ldv_54748: tlv_type = (u32 )current_tlv->header.type; tlv_len = (u32 )current_tlv->header.len; if ((unsigned long )tlv_len + 4UL > (unsigned long )tlv_buf_left) { { dev_err((struct device const *)adapter->dev, "SCAN_RESP: TLV buffer corrupt\n"); } goto ldv_54741; } else { } if (req_tlv_type == tlv_type) { { if (tlv_type == 275U) { goto case_275; } else { } if (tlv_type == 298U) { goto case_298; } else { } goto switch_default; case_275: /* CIL Label */ { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_802_11_scan_get_tlv_ptrs"; descriptor___0.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___0.format = "info: SCAN_RESP: TSF timestamp TLV, len = %d\n"; descriptor___0.lineno = 1086U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: SCAN_RESP: TSF timestamp TLV, len = %d\n", tlv_len); } } else { } *tlv_data = current_tlv; goto ldv_54744; case_298: /* CIL Label */ { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_802_11_scan_get_tlv_ptrs"; descriptor___1.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___1.format = "info: SCAN_RESP: channel band list TLV, len = %d\n"; descriptor___1.lineno = 1091U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: SCAN_RESP: channel band list TLV, len = %d\n", tlv_len); } } else { } *tlv_data = current_tlv; goto ldv_54744; switch_default: /* CIL Label */ { dev_err((struct device const *)adapter->dev, "SCAN_RESP: unhandled TLV = %d\n", tlv_type); } return; switch_break: /* CIL Label */ ; } ldv_54744: ; } else { } if ((unsigned long )*tlv_data != (unsigned long )((struct mwifiex_ie_types_data *)0)) { goto ldv_54741; } else { } tlv_buf_left = (tlv_buf_left - tlv_len) - 4U; current_tlv = (struct mwifiex_ie_types_data *)(& current_tlv->data) + (unsigned long )tlv_len; ldv_54749: ; if (tlv_buf_left > 3U) { goto ldv_54748; } else { } ldv_54741: ; return; } } int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter , struct mwifiex_bssdescriptor *bss_entry ) { int ret ; u8 element_id ; struct ieee_types_fh_param_set *fh_param_set ; struct ieee_types_ds_param_set *ds_param_set ; struct ieee_types_cf_param_set *cf_param_set ; struct ieee_types_ibss_param_set *ibss_param_set ; u8 *current_ptr ; u8 *rate ; u8 element_len ; u16 total_ie_len ; u8 bytes_to_copy ; u8 rate_size ; u8 found_data_rate_ie ; u32 bytes_left ; struct ieee_types_vendor_specific *vendor_ie ; u8 wpa_oui[4U] ; u8 wmm_oui[4U] ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; int tmp___1 ; { ret = 0; wpa_oui[0] = 0U; wpa_oui[1] = 80U; wpa_oui[2] = 242U; wpa_oui[3] = 1U; wmm_oui[0] = 0U; wmm_oui[1] = 80U; wmm_oui[2] = 242U; wmm_oui[3] = 2U; found_data_rate_ie = 0U; rate_size = 0U; current_ptr = bss_entry->beacon_buf; bytes_left = bss_entry->beacon_buf_size; goto ldv_54799; ldv_54798: element_id = *current_ptr; element_len = *(current_ptr + 1UL); total_ie_len = (unsigned int )((u16 )element_len) + 2U; if (bytes_left < (u32 )total_ie_len) { { dev_err((struct device const *)adapter->dev, "err: InterpretIE: in processing IE, bytes left < IE length\n"); } return (-1); } else { } { if ((int )element_id == 0) { goto case_0; } else { } if ((int )element_id == 1) { goto case_1; } else { } if ((int )element_id == 2) { goto case_2; } else { } if ((int )element_id == 3) { goto case_3; } else { } if ((int )element_id == 4) { goto case_4; } else { } if ((int )element_id == 6) { goto case_6; } else { } if ((int )element_id == 42) { goto case_42; } else { } if ((int )element_id == 32) { goto case_32; } else { } if ((int )element_id == 37) { goto case_37; } else { } if ((int )element_id == 33) { goto case_33; } else { } if ((int )element_id == 35) { goto case_35; } else { } if ((int )element_id == 40) { goto case_40; } else { } if ((int )element_id == 50) { goto case_50; } else { } if ((int )element_id == 221) { goto case_221; } else { } if ((int )element_id == 48) { goto case_48; } else { } if ((int )element_id == 68) { goto case_68; } else { } if ((int )element_id == 45) { goto case_45; } else { } if ((int )element_id == 61) { goto case_61; } else { } if ((int )element_id == 191) { goto case_191; } else { } if ((int )element_id == 192) { goto case_192; } else { } if ((int )element_id == 72) { goto case_72; } else { } if ((int )element_id == 127) { goto case_127; } else { } if ((int )element_id == 199) { goto case_199; } else { } goto switch_default; case_0: /* CIL Label */ { bss_entry->ssid.ssid_len = element_len; memcpy((void *)(& bss_entry->ssid.ssid), (void const *)current_ptr + 2U, (size_t )element_len); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_update_bss_desc_with_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: InterpretIE: ssid: %-32s\n"; descriptor.lineno = 1163U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: InterpretIE: ssid: %-32s\n", (u8 *)(& bss_entry->ssid.ssid)); } } else { } goto ldv_54774; case_1: /* CIL Label */ { memcpy((void *)(& bss_entry->data_rates), (void const *)current_ptr + 2U, (size_t )element_len); memcpy((void *)(& bss_entry->supported_rates), (void const *)current_ptr + 2U, (size_t )element_len); rate_size = element_len; found_data_rate_ie = 1U; } goto ldv_54774; case_2: /* CIL Label */ { fh_param_set = (struct ieee_types_fh_param_set *)current_ptr; memcpy((void *)(& bss_entry->phy_param_set.fh_param_set), (void const *)fh_param_set, 7UL); } goto ldv_54774; case_3: /* CIL Label */ { ds_param_set = (struct ieee_types_ds_param_set *)current_ptr; bss_entry->channel = (u32 )ds_param_set->current_chan; memcpy((void *)(& bss_entry->phy_param_set.ds_param_set), (void const *)ds_param_set, 3UL); } goto ldv_54774; case_4: /* CIL Label */ { cf_param_set = (struct ieee_types_cf_param_set *)current_ptr; memcpy((void *)(& bss_entry->ss_param_set.cf_param_set), (void const *)cf_param_set, 8UL); } goto ldv_54774; case_6: /* CIL Label */ { ibss_param_set = (struct ieee_types_ibss_param_set *)current_ptr; memcpy((void *)(& bss_entry->ss_param_set.ibss_param_set), (void const *)ibss_param_set, 4UL); } goto ldv_54774; case_42: /* CIL Label */ bss_entry->erp_flags = *(current_ptr + 2UL); goto ldv_54774; case_32: /* CIL Label */ bss_entry->local_constraint = *(current_ptr + 2UL); bss_entry->sensed_11h = 1U; goto ldv_54774; case_37: /* CIL Label */ bss_entry->chan_sw_ie_present = 1U; case_33: /* CIL Label */ ; case_35: /* CIL Label */ ; case_40: /* CIL Label */ bss_entry->sensed_11h = 1U; goto ldv_54774; case_50: /* CIL Label */ ; if ((unsigned int )found_data_rate_ie != 0U) { if ((int )element_len + (int )rate_size > 14) { bytes_to_copy = 14U - (unsigned int )rate_size; } else { bytes_to_copy = element_len; } { rate = (u8 *)(& bss_entry->data_rates); rate = rate + (unsigned long )rate_size; memcpy((void *)rate, (void const *)current_ptr + 2U, (size_t )bytes_to_copy); rate = (u8 *)(& bss_entry->supported_rates); rate = rate + (unsigned long )rate_size; memcpy((void *)rate, (void const *)current_ptr + 2U, (size_t )bytes_to_copy); } } else { } goto ldv_54774; case_221: /* CIL Label */ { vendor_ie = (struct ieee_types_vendor_specific *)current_ptr; tmp___1 = memcmp((void const *)(& vendor_ie->vend_hdr.oui), (void const *)(& wpa_oui), 4UL); } if (tmp___1 == 0) { bss_entry->bcn_wpa_ie = (struct ieee_types_vendor_specific *)current_ptr; bss_entry->wpa_offset = (int )((unsigned short )((long )current_ptr)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); } else { { tmp___0 = memcmp((void const *)(& vendor_ie->vend_hdr.oui), (void const *)(& wmm_oui), 4UL); } if (tmp___0 == 0) { if ((unsigned int )total_ie_len == 26U || (unsigned int )total_ie_len == 9U) { { memcpy((void *)(& bss_entry->wmm_ie), (void const *)current_ptr, (size_t )total_ie_len); } } else { } } else { } } goto ldv_54774; case_48: /* CIL Label */ bss_entry->bcn_rsn_ie = (struct ieee_types_generic *)current_ptr; bss_entry->rsn_offset = (int )((unsigned short )((long )current_ptr)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_68: /* CIL Label */ bss_entry->bcn_wapi_ie = (struct ieee_types_generic *)current_ptr; bss_entry->wapi_offset = (int )((unsigned short )((long )current_ptr)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_45: /* CIL Label */ bss_entry->bcn_ht_cap = (struct ieee80211_ht_cap *)current_ptr + 2U; bss_entry->ht_cap_offset = (int )((unsigned short )((long )(current_ptr + 2UL))) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_61: /* CIL Label */ bss_entry->bcn_ht_oper = (struct ieee80211_ht_operation *)current_ptr + 2U; bss_entry->ht_info_offset = (int )((unsigned short )((long )(current_ptr + 2UL))) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_191: /* CIL Label */ bss_entry->disable_11ac = 0U; bss_entry->bcn_vht_cap = (struct ieee80211_vht_cap *)current_ptr + 2U; bss_entry->vht_cap_offset = (int )((unsigned short )((long )bss_entry->bcn_vht_cap)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_192: /* CIL Label */ bss_entry->bcn_vht_oper = (struct ieee80211_vht_operation *)current_ptr + 2U; bss_entry->vht_info_offset = (int )((unsigned short )((long )bss_entry->bcn_vht_oper)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_72: /* CIL Label */ bss_entry->bcn_bss_co_2040 = current_ptr + 2UL; bss_entry->bss_co_2040_offset = (int )((unsigned short )((long )(current_ptr + 2UL))) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_127: /* CIL Label */ bss_entry->bcn_ext_cap = current_ptr + 2UL; bss_entry->ext_cap_offset = (int )((unsigned short )((long )(current_ptr + 2UL))) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; case_199: /* CIL Label */ bss_entry->oper_mode = (struct ieee_types_oper_mode_ntf *)current_ptr + 2U; bss_entry->oper_mode_offset = (int )((unsigned short )((long )bss_entry->oper_mode)) - (int )((unsigned short )((long )bss_entry->beacon_buf)); goto ldv_54774; switch_default: /* CIL Label */ ; goto ldv_54774; switch_break: /* CIL Label */ ; } ldv_54774: current_ptr = current_ptr + ((unsigned long )element_len + 2UL); bytes_left = (bytes_left - (u32 )element_len) + 4294967294U; ldv_54799: ; if (bytes_left > 1U) { goto ldv_54798; } else { } return (ret); } } static u8 mwifiex_radio_type_to_band(u8 radio_type ) { { { if ((int )radio_type == 1) { goto case_1; } else { } if ((int )radio_type == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ ; return (4U); case_0: /* CIL Label */ ; switch_default: /* CIL Label */ ; return (2U); switch_break: /* CIL Label */ ; } } } int mwifiex_scan_networks(struct mwifiex_private *priv , struct mwifiex_user_scan_cfg const *user_scan_in ) { int ret ; struct mwifiex_adapter *adapter ; struct cmd_ctrl_node *cmd_node ; union mwifiex_scan_cmd_config_tlv *scan_cfg_out ; struct mwifiex_ie_types_chan_list_param_set *chan_list_out ; struct mwifiex_chan_scan_param_set *scan_chan_list ; u8 filtered_scan ; u8 scan_current_chan_only ; u8 max_chan_per_scan ; unsigned long flags ; raw_spinlock_t *tmp ; void *tmp___0 ; void *tmp___1 ; raw_spinlock_t *tmp___2 ; struct list_head const *__mptr ; struct _ddebug descriptor ; long tmp___3 ; int tmp___4 ; raw_spinlock_t *tmp___5 ; { adapter = priv->adapter; if (adapter->scan_processing != 0U) { { dev_err((struct device const *)adapter->dev, "cmd: Scan already in process...\n"); } return (-16); } else { } if ((unsigned int )priv->scan_block != 0U) { { dev_err((struct device const *)adapter->dev, "cmd: Scan is blocked during association...\n"); } return (-16); } else { } { tmp = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp); adapter->scan_processing = 1U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); tmp___0 = kzalloc(549UL, 208U); scan_cfg_out = (union mwifiex_scan_cmd_config_tlv *)tmp___0; } if ((unsigned long )scan_cfg_out == (unsigned long )((union mwifiex_scan_cmd_config_tlv *)0)) { ret = -12; goto done; } else { } { tmp___1 = kcalloc(50UL, 7UL, 208U); scan_chan_list = (struct mwifiex_chan_scan_param_set *)tmp___1; } if ((unsigned long )scan_chan_list == (unsigned long )((struct mwifiex_chan_scan_param_set *)0)) { { kfree((void const *)scan_cfg_out); ret = -12; } goto done; } else { } { mwifiex_config_scan(priv, user_scan_in, & scan_cfg_out->config, & chan_list_out, scan_chan_list, & max_chan_per_scan, & filtered_scan, & scan_current_chan_only); ret = mwifiex_scan_channel_list(priv, (u32 )max_chan_per_scan, (int )filtered_scan, & scan_cfg_out->config, chan_list_out, scan_chan_list); } if (ret == 0) { { tmp___2 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___2); tmp___4 = list_empty((struct list_head const *)(& adapter->scan_pending_q)); } if (tmp___4 == 0) { { __mptr = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, 1U); queue_work(adapter->workqueue, & adapter->main_work); } if ((unsigned long )priv->scan_request == (unsigned long )((struct cfg80211_scan_request *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_scan_networks"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "wait internal scan\n"; descriptor.lineno = 1453U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "wait internal scan\n"); } } else { } { mwifiex_wait_queue_complete(adapter, cmd_node); } } else { } } else { { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); } } } else { } { kfree((void const *)scan_cfg_out); kfree((void const *)scan_chan_list); } done: ; if (ret != 0) { { tmp___5 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___5); adapter->scan_processing = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } } else { } return (ret); } } int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd , struct mwifiex_scan_cmd_config *scan_cfg ) { struct host_cmd_ds_802_11_scan *scan_cmd ; { { scan_cmd = & cmd->params.scan; scan_cmd->bss_mode = scan_cfg->bss_mode; memcpy((void *)(& scan_cmd->bssid), (void const *)(& scan_cfg->specific_bssid), 6UL); memcpy((void *)(& scan_cmd->tlv_buffer), (void const *)(& scan_cfg->tlv_buf), (size_t )scan_cfg->tlv_buf_len); cmd->command = 6U; cmd->size = (unsigned int )((unsigned short )scan_cfg->tlv_buf_len) + 15U; } return (0); } } int mwifiex_check_network_compatibility(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { int ret ; struct mwifiex_chan_freq_power *tmp ; { ret = -1; if ((unsigned long )bss_desc == (unsigned long )((struct mwifiex_bssdescriptor *)0)) { return (-1); } else { } { tmp = mwifiex_get_cfp(priv, (int )((unsigned char )bss_desc->bss_band), (int )((unsigned short )bss_desc->channel), 0U); } if ((unsigned long )tmp != (unsigned long )((struct mwifiex_chan_freq_power *)0)) { { if (priv->bss_mode == 2U) { goto case_2; } else { } if (priv->bss_mode == 1U) { goto case_1; } else { } goto switch_default; case_2: /* CIL Label */ ; case_1: /* CIL Label */ { ret = mwifiex_is_network_compatible(priv, bss_desc, priv->bss_mode); } if (ret != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "Incompatible network settings\n"); } } else { } goto ldv_54847; switch_default: /* CIL Label */ ret = 0; switch_break: /* CIL Label */ ; } ldv_54847: ; } else { } return (ret); } } static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv , struct cfg80211_bss *bss ) { struct mwifiex_bssdescriptor *bss_desc ; int ret ; unsigned long flags ; void *tmp ; raw_spinlock_t *tmp___0 ; { { tmp = kzalloc(336UL, 208U); bss_desc = (struct mwifiex_bssdescriptor *)tmp; } if ((unsigned long )bss_desc == (unsigned long )((struct mwifiex_bssdescriptor *)0)) { return (-12); } else { } { ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc); } if (ret != 0) { goto done; } else { } { ret = mwifiex_check_network_compatibility(priv, bss_desc); } if (ret != 0) { goto done; } else { } { tmp___0 = spinlock_check(& priv->curr_bcn_buf_lock); flags = _raw_spin_lock_irqsave(tmp___0); memcpy((void *)(& priv->curr_bss_params.bss_descriptor), (void const *)bss_desc, 336UL); mwifiex_save_curr_bcn(priv); spin_unlock_irqrestore(& priv->curr_bcn_buf_lock, flags); } done: { kfree((void const *)bss_desc->beacon_buf); kfree((void const *)bss_desc); } return (0); } } int mwifiex_ret_802_11_scan(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { int ret ; struct mwifiex_adapter *adapter ; struct cmd_ctrl_node *cmd_node ; struct host_cmd_ds_802_11_scan_rsp *scan_rsp ; struct mwifiex_ie_types_data *tlv_data ; struct mwifiex_ie_types_tsf_timestamp *tsf_tlv ; u8 *bss_info ; u32 scan_resp_size ; u32 bytes_left ; u32 idx ; u32 tlv_buf_size ; struct mwifiex_chan_freq_power *cfp ; struct mwifiex_ie_types_chan_band_list_param_set *chan_band_tlv ; struct chan_band_param_set *chan_band ; u8 is_bgscan_resp ; unsigned long flags ; struct cfg80211_bss *bss ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; u8 bssid[6U] ; s32 rssi ; u8 const *ie_buf ; size_t ie_len ; u16 channel ; __le64 fw_tsf ; u16 beacon_size ; u32 curr_bcn_bytes ; u32 freq ; u16 beacon_period ; u16 cap_info_bitmap ; u8 *current_ptr ; u64 timestamp ; struct mwifiex_bcn_param *bcn_param ; struct mwifiex_bss_priv *bss_priv ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; u8 element_id ; u8 element_len ; struct ieee80211_channel *chan ; u8 band ; struct _ddebug descriptor___4 ; long tmp___4 ; int tmp___5 ; struct _ddebug descriptor___5 ; long tmp___6 ; raw_spinlock_t *tmp___7 ; raw_spinlock_t *tmp___8 ; struct _ddebug descriptor___6 ; long tmp___9 ; struct _ddebug descriptor___7 ; long tmp___10 ; struct _ddebug descriptor___8 ; long tmp___11 ; struct _ddebug descriptor___9 ; long tmp___12 ; unsigned long tmp___13 ; struct _ddebug descriptor___10 ; long tmp___14 ; struct list_head const *__mptr ; int tmp___15 ; int tmp___16 ; { ret = 0; adapter = priv->adapter; is_bgscan_resp = (unsigned int )resp->command == 108U; if ((unsigned int )is_bgscan_resp != 0U) { scan_rsp = & resp->params.bg_scan_query_resp.scan_resp; } else { scan_rsp = & resp->params.scan_resp; } if ((unsigned int )scan_rsp->number_of_sets > 64U) { { dev_err((struct device const *)adapter->dev, "SCAN_RESP: too many AP returned (%d)\n", (int )scan_rsp->number_of_sets); ret = -1; } goto check_next_scan; } else { } { mwifiex_11h_get_csa_closed_channel(priv); bytes_left = (u32 )scan_rsp->bss_descript_size; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_scan"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: SCAN_RESP: bss_descript_size %d\n"; descriptor.lineno = 1639U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: SCAN_RESP: bss_descript_size %d\n", bytes_left); } } else { } { scan_resp_size = (u32 )resp->size; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_802_11_scan"; descriptor___0.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___0.format = "info: SCAN_RESP: returned %d APs before parsing\n"; descriptor___0.lineno = 1645U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: SCAN_RESP: returned %d APs before parsing\n", (int )scan_rsp->number_of_sets); } } else { } { bss_info = (u8 *)(& scan_rsp->bss_desc_and_tlv_buffer); tlv_buf_size = (scan_resp_size - bytes_left) - 11U; tlv_data = (struct mwifiex_ie_types_data *)(& scan_rsp->bss_desc_and_tlv_buffer) + (unsigned long )bytes_left; mwifiex_ret_802_11_scan_get_tlv_ptrs(adapter, tlv_data, tlv_buf_size, 275U, (struct mwifiex_ie_types_data **)(& tsf_tlv)); mwifiex_ret_802_11_scan_get_tlv_ptrs(adapter, tlv_data, tlv_buf_size, 298U, (struct mwifiex_ie_types_data **)(& chan_band_tlv)); idx = 0U; } goto ldv_54914; ldv_54913: channel = 0U; fw_tsf = 0ULL; beacon_size = 0U; if (bytes_left > 1U) { { memcpy((void *)(& beacon_size), (void const *)bss_info, 2UL); bytes_left = bytes_left - 2U; bss_info = bss_info + 2UL; } } else { } if ((unsigned int )beacon_size == 0U || (u32 )beacon_size > bytes_left) { bss_info = bss_info + (unsigned long )bytes_left; bytes_left = 0U; ret = -1; goto check_next_scan; } else { } current_ptr = bss_info; bss_info = bss_info + (unsigned long )beacon_size; bytes_left = bytes_left - (u32 )beacon_size; curr_bcn_bytes = (u32 )beacon_size; if (curr_bcn_bytes <= 18U) { { dev_err((struct device const *)adapter->dev, "InterpretIE: not enough bytes left\n"); } goto ldv_54900; } else { } { bcn_param = (struct mwifiex_bcn_param *)current_ptr; current_ptr = current_ptr + 19UL; curr_bcn_bytes = curr_bcn_bytes - 19U; memcpy((void *)(& bssid), (void const *)(& bcn_param->bssid), 6UL); rssi = (int )bcn_param->rssi; rssi = rssi * -100; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_802_11_scan"; descriptor___1.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___1.format = "info: InterpretIE: RSSI=%d\n"; descriptor___1.lineno = 1736U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: InterpretIE: RSSI=%d\n", rssi); } } else { } { timestamp = bcn_param->timestamp; beacon_period = bcn_param->beacon_period; cap_info_bitmap = bcn_param->cap_info_bitmap; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_802_11_scan"; descriptor___2.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___2.format = "info: InterpretIE: capabilities=0x%X\n"; descriptor___2.lineno = 1743U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: InterpretIE: capabilities=0x%X\n", (int )cap_info_bitmap); } } else { } { ie_buf = (u8 const *)current_ptr; ie_len = (size_t )curr_bcn_bytes; descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_ret_802_11_scan"; descriptor___3.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___3.format = "info: InterpretIE: IELength for this AP = %d\n"; descriptor___3.lineno = 1750U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: InterpretIE: IELength for this AP = %d\n", curr_bcn_bytes); } } else { } goto ldv_54908; ldv_54907: element_id = *current_ptr; element_len = *(current_ptr + 1UL); if ((unsigned long )curr_bcn_bytes < (unsigned long )element_len + 2UL) { { dev_err((struct device const *)(priv->adapter)->dev, "%s: bytes left < IE length\n", "mwifiex_ret_802_11_scan"); } goto check_next_scan; } else { } if ((unsigned int )element_id == 3U) { channel = (u16 )*(current_ptr + 2UL); goto ldv_54906; } else { } current_ptr = current_ptr + ((unsigned long )element_len + 2UL); curr_bcn_bytes = (curr_bcn_bytes - (u32 )element_len) - 2U; ldv_54908: ; if (curr_bcn_bytes > 1U) { goto ldv_54907; } else { } ldv_54906: ; if ((unsigned long )tsf_tlv != (unsigned long )((struct mwifiex_ie_types_tsf_timestamp *)0)) { { memcpy((void *)(& fw_tsf), (void const *)(& tsf_tlv->tsf_data) + (unsigned long )(idx * 8U), 8UL); } } else { } if ((unsigned int )channel != 0U) { if ((int )channel == (int )((unsigned short )priv->csa_chan)) { { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_ret_802_11_scan"; descriptor___4.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___4.format = "Dropping entry on csa closed channel\n"; descriptor___4.lineno = 1792U; descriptor___4.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "Dropping entry on csa closed channel\n"); } } else { } goto ldv_54900; } else { } band = 2U; if ((unsigned long )chan_band_tlv != (unsigned long )((struct mwifiex_ie_types_chan_band_list_param_set *)0)) { { chan_band = (struct chan_band_param_set *)(& chan_band_tlv->chan_band_param) + (unsigned long )idx; band = mwifiex_radio_type_to_band((int )chan_band->radio_type & 3); } } else { } { cfp = mwifiex_get_cfp(priv, (int )band, (int )channel, 0U); freq = (unsigned long )cfp != (unsigned long )((struct mwifiex_chan_freq_power *)0) ? cfp->freq : 0U; chan = ieee80211_get_channel((priv->wdev)->wiphy, (int )freq); } if ((unsigned long )chan != (unsigned long )((struct ieee80211_channel *)0) && (chan->flags & 1U) == 0U) { { bss = cfg80211_inform_bss((priv->wdev)->wiphy, chan, (u8 const *)(& bssid), timestamp, (int )cap_info_bitmap, (int )beacon_period, ie_buf, ie_len, rssi, 208U); bss_priv = (struct mwifiex_bss_priv *)(& bss->priv); bss_priv->band = band; bss_priv->fw_tsf = fw_tsf; } if ((unsigned int )priv->media_connected != 0U) { { tmp___5 = memcmp((void const *)(& bssid), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); } if (tmp___5 == 0) { { mwifiex_update_curr_bss_params(priv, bss); } } else { } } else { } { cfg80211_put_bss((priv->wdev)->wiphy, bss); } } else { } } else { { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_ret_802_11_scan"; descriptor___5.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___5.format = "missing BSS channel IE\n"; descriptor___5.lineno = 1828U; descriptor___5.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "missing BSS channel IE\n"); } } else { } } ldv_54900: idx = idx + 1U; ldv_54914: ; if (idx < (u32 )scan_rsp->number_of_sets && bytes_left != 0U) { goto ldv_54913; } else { } check_next_scan: { tmp___7 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___7); tmp___16 = list_empty((struct list_head const *)(& adapter->scan_pending_q)); } if (tmp___16 != 0) { { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); tmp___8 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___8); adapter->scan_processing = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } if ((adapter->curr_cmd)->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = 0; if ((unsigned long )priv->scan_request == (unsigned long )((struct cfg80211_scan_request *)0)) { { descriptor___6.modname = "mwifiex"; descriptor___6.function = "mwifiex_ret_802_11_scan"; descriptor___6.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___6.format = "complete internal scan\n"; descriptor___6.lineno = 1845U; descriptor___6.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); } if (tmp___9 != 0L) { { __dynamic_dev_dbg(& descriptor___6, (struct device const *)adapter->dev, "complete internal scan\n"); } } else { } { mwifiex_complete_cmd(adapter, adapter->curr_cmd); } } else { } } else { } if ((unsigned int )priv->report_scan_result != 0U) { priv->report_scan_result = 0U; } else { } if ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0)) { { descriptor___7.modname = "mwifiex"; descriptor___7.function = "mwifiex_ret_802_11_scan"; descriptor___7.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___7.format = "info: notifying scan done\n"; descriptor___7.lineno = 1854U; descriptor___7.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); } if (tmp___10 != 0L) { { __dynamic_dev_dbg(& descriptor___7, (struct device const *)adapter->dev, "info: notifying scan done\n"); } } else { } { cfg80211_scan_done(priv->scan_request, 0); priv->scan_request = (struct cfg80211_scan_request *)0; } } else { { priv->scan_aborting = 0; descriptor___8.modname = "mwifiex"; descriptor___8.function = "mwifiex_ret_802_11_scan"; descriptor___8.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___8.format = "info: scan already aborted\n"; descriptor___8.lineno = 1859U; descriptor___8.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); } if (tmp___11 != 0L) { { __dynamic_dev_dbg(& descriptor___8, (struct device const *)adapter->dev, "info: scan already aborted\n"); } } else { } } } else if (((int )priv->scan_aborting && (unsigned long )priv->scan_request == (unsigned long )((struct cfg80211_scan_request *)0)) || (unsigned int )priv->scan_block != 0U) { { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); adapter->scan_delay_cnt = 50U; ldv_mod_timer_19___1(& priv->scan_delay_timer, jiffies); descriptor___9.modname = "mwifiex"; descriptor___9.function = "mwifiex_ret_802_11_scan"; descriptor___9.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___9.format = "info: %s: triggerring scan abort\n"; descriptor___9.lineno = 1869U; descriptor___9.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___9.flags & 1L, 0L); } if (tmp___12 != 0L) { { __dynamic_dev_dbg(& descriptor___9, (struct device const *)(priv->adapter)->dev, "info: %s: triggerring scan abort\n", "mwifiex_ret_802_11_scan"); } } else { } } else { { tmp___15 = mwifiex_wmm_lists_empty(adapter); } if (tmp___15 == 0 && ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0) && (int )(priv->scan_request)->flags & 1)) { { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); adapter->scan_delay_cnt = 1U; tmp___13 = msecs_to_jiffies(20U); ldv_mod_timer_20(& priv->scan_delay_timer, (unsigned long )jiffies + tmp___13); descriptor___10.modname = "mwifiex"; descriptor___10.function = "mwifiex_ret_802_11_scan"; descriptor___10.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor___10.format = "info: %s: deferring scan\n"; descriptor___10.lineno = 1879U; descriptor___10.flags = 0U; tmp___14 = ldv__builtin_expect((long )descriptor___10.flags & 1L, 0L); } if (tmp___14 != 0L) { { __dynamic_dev_dbg(& descriptor___10, (struct device const *)(priv->adapter)->dev, "info: %s: deferring scan\n", "mwifiex_ret_802_11_scan"); } } else { } } else { { __mptr = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, 1U); } } } return (ret); } } int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd ) { struct host_cmd_ds_802_11_bg_scan_query *bg_query ; { bg_query = & cmd->params.bg_scan_query; cmd->command = 108U; cmd->size = 9U; bg_query->flush = 1U; return (0); } } void mwifiex_queue_scan_cmd(struct mwifiex_private *priv , struct cmd_ctrl_node *cmd_node ) { struct mwifiex_adapter *adapter ; unsigned long flags ; raw_spinlock_t *tmp ; { { adapter = priv->adapter; cmd_node->wait_q_enabled = 1U; cmd_node->condition = & adapter->scan_wait_q_woken; tmp = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp); list_add_tail(& cmd_node->list, & adapter->scan_pending_q); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); } return; } } static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv , struct cfg80211_ssid *req_ssid ) { struct mwifiex_adapter *adapter ; int ret ; struct mwifiex_user_scan_cfg *scan_cfg ; void *tmp ; { adapter = priv->adapter; if (adapter->scan_processing != 0U) { { dev_err((struct device const *)adapter->dev, "cmd: Scan already in process...\n"); } return (-16); } else { } if ((unsigned int )priv->scan_block != 0U) { { dev_err((struct device const *)adapter->dev, "cmd: Scan is blocked during association...\n"); } return (-16); } else { } { tmp = kzalloc(418UL, 208U); scan_cfg = (struct mwifiex_user_scan_cfg *)tmp; } if ((unsigned long )scan_cfg == (unsigned long )((struct mwifiex_user_scan_cfg *)0)) { return (-12); } else { } { scan_cfg->ssid_list = req_ssid; scan_cfg->num_ssids = 1U; ret = mwifiex_scan_networks(priv, (struct mwifiex_user_scan_cfg const *)scan_cfg); kfree((void const *)scan_cfg); } return (ret); } } int mwifiex_request_scan(struct mwifiex_private *priv , struct cfg80211_ssid *req_ssid ) { int ret ; int tmp ; { { tmp = down_interruptible(& priv->async_sem); } if (tmp != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "%s: acquire semaphore\n", "mwifiex_request_scan"); } return (-1); } else { } (priv->adapter)->scan_wait_q_woken = 0U; if ((unsigned long )req_ssid != (unsigned long )((struct cfg80211_ssid *)0) && (unsigned int )req_ssid->ssid_len != 0U) { { ret = mwifiex_scan_specific_ssid(priv, req_ssid); } } else { { ret = mwifiex_scan_networks(priv, (struct mwifiex_user_scan_cfg const *)0); } } { up(& priv->async_sem); } return (ret); } } int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv , u16 vsie_mask , u8 **buffer ) { int id ; int ret_len ; struct mwifiex_ie_types_vendor_param_set *vs_param_set ; { ret_len = 0; if ((unsigned long )buffer == (unsigned long )((u8 **)0U)) { return (0); } else { } if ((unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } id = 0; goto ldv_54964; ldv_54963: ; if ((unsigned int )((int )priv->vs_ie[id].mask & (int )vsie_mask) != 0U) { { vs_param_set = (struct mwifiex_ie_types_vendor_param_set *)*buffer; vs_param_set->header.type = 266U; vs_param_set->header.len = (unsigned int )((unsigned short )priv->vs_ie[id].ie[1]) + 2U; memcpy((void *)(& vs_param_set->ie), (void const *)(& priv->vs_ie[id].ie), (size_t )vs_param_set->header.len); *buffer = *buffer + ((unsigned long )vs_param_set->header.len + 4UL); ret_len = (int )(((unsigned int )ret_len + (unsigned int )vs_param_set->header.len) + 4U); } } else { } id = id + 1; ldv_54964: ; if (id <= 7) { goto ldv_54963; } else { } return (ret_len); } } void mwifiex_save_curr_bcn(struct mwifiex_private *priv ) { struct mwifiex_bssdescriptor *curr_bss ; void *tmp ; struct _ddebug descriptor ; long tmp___0 ; { curr_bss = & priv->curr_bss_params.bss_descriptor; if (curr_bss->beacon_buf_size == 0U) { return; } else { } if ((unsigned long )priv->curr_bcn_buf == (unsigned long )((u8 *)0U) || priv->curr_bcn_size != curr_bss->beacon_buf_size) { { priv->curr_bcn_size = curr_bss->beacon_buf_size; kfree((void const *)priv->curr_bcn_buf); tmp = kmalloc((size_t )curr_bss->beacon_buf_size, 32U); priv->curr_bcn_buf = (u8 *)tmp; } if ((unsigned long )priv->curr_bcn_buf == (unsigned long )((u8 *)0U)) { return; } else { } } else { } { memcpy((void *)priv->curr_bcn_buf, (void const *)curr_bss->beacon_buf, (size_t )curr_bss->beacon_buf_size); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_save_curr_bcn"; descriptor.filename = "drivers/net/wireless/mwifiex/scan.c"; descriptor.format = "info: current beacon saved %d\n"; descriptor.lineno = 2077U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: current beacon saved %d\n", priv->curr_bcn_size); } } else { } curr_bss->beacon_buf = priv->curr_bcn_buf; if ((unsigned long )curr_bss->bcn_wpa_ie != (unsigned long )((struct ieee_types_vendor_specific *)0)) { curr_bss->bcn_wpa_ie = (struct ieee_types_vendor_specific *)curr_bss->beacon_buf + (unsigned long )curr_bss->wpa_offset; } else { } if ((unsigned long )curr_bss->bcn_rsn_ie != (unsigned long )((struct ieee_types_generic *)0)) { curr_bss->bcn_rsn_ie = (struct ieee_types_generic *)curr_bss->beacon_buf + (unsigned long )curr_bss->rsn_offset; } else { } if ((unsigned long )curr_bss->bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)) { curr_bss->bcn_ht_cap = (struct ieee80211_ht_cap *)curr_bss->beacon_buf + (unsigned long )curr_bss->ht_cap_offset; } else { } if ((unsigned long )curr_bss->bcn_ht_oper != (unsigned long )((struct ieee80211_ht_operation *)0)) { curr_bss->bcn_ht_oper = (struct ieee80211_ht_operation *)curr_bss->beacon_buf + (unsigned long )curr_bss->ht_info_offset; } else { } if ((unsigned long )curr_bss->bcn_vht_cap != (unsigned long )((struct ieee80211_vht_cap *)0)) { curr_bss->bcn_vht_cap = (struct ieee80211_vht_cap *)curr_bss->beacon_buf + (unsigned long )curr_bss->vht_cap_offset; } else { } if ((unsigned long )curr_bss->bcn_vht_oper != (unsigned long )((struct ieee80211_vht_operation *)0)) { curr_bss->bcn_vht_oper = (struct ieee80211_vht_operation *)curr_bss->beacon_buf + (unsigned long )curr_bss->vht_info_offset; } else { } if ((unsigned long )curr_bss->bcn_bss_co_2040 != (unsigned long )((u8 *)0U)) { curr_bss->bcn_bss_co_2040 = curr_bss->beacon_buf + (unsigned long )curr_bss->bss_co_2040_offset; } else { } if ((unsigned long )curr_bss->bcn_ext_cap != (unsigned long )((u8 *)0U)) { curr_bss->bcn_ext_cap = curr_bss->beacon_buf + (unsigned long )curr_bss->ext_cap_offset; } else { } if ((unsigned long )curr_bss->oper_mode != (unsigned long )((struct ieee_types_oper_mode_ntf *)0)) { curr_bss->oper_mode = (struct ieee_types_oper_mode_ntf *)curr_bss->beacon_buf + (unsigned long )curr_bss->oper_mode_offset; } else { } return; } } void mwifiex_free_curr_bcn(struct mwifiex_private *priv ) { { { kfree((void const *)priv->curr_bcn_buf); priv->curr_bcn_buf = (u8 *)0U; } return; } } static int ldv_mod_timer_19___1(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; tmp___0 = ldv_mod_timer(ldv_func_res, ldv_func_arg1, ldv_func_arg2); } return (tmp___0); return (ldv_func_res); } } static int ldv_mod_timer_20(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___1 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; tmp___0 = ldv_mod_timer(ldv_func_res, ldv_func_arg1, ldv_func_arg2); } return (tmp___0); return (ldv_func_res); } } extern size_t strlen(char const * ) ; extern void *kmemdup(void const * , size_t , gfp_t ) ; extern void netif_carrier_on(struct net_device * ) ; extern void cfg80211_disconnected(struct net_device * , u16 , u8 * , size_t , gfp_t ) ; int mwifiex_associate(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) ; int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_bssdescriptor *bss_desc ) ; int mwifiex_ret_802_11_associate(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; void mwifiex_reset_connect_state(struct mwifiex_private *priv , u16 reason_code ) ; int mwifiex_deauthenticate(struct mwifiex_private *priv , u8 *mac ) ; int mwifiex_adhoc_start(struct mwifiex_private *priv , struct cfg80211_ssid *adhoc_ssid ) ; int mwifiex_adhoc_join(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) ; int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct cfg80211_ssid *req_ssid ) ; int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_bssdescriptor *bss_desc ) ; int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) ; void mwifiex_11h_process_join(struct mwifiex_private *priv , u8 **buffer , struct mwifiex_bssdescriptor *bss_desc ) ; static int mwifiex_cmd_append_generic_ie(struct mwifiex_private *priv , u8 **buffer ) { int ret_len ; struct mwifiex_ie_types_header ie_header ; struct _ddebug descriptor ; long tmp ; { ret_len = 0; if ((unsigned long )buffer == (unsigned long )((u8 **)0U)) { return (0); } else { } if ((unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } if ((unsigned int )priv->gen_ie_buf_len != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_append_generic_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: %s: append generic ie len %d to %p\n"; descriptor.lineno = 58U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: %s: append generic ie len %d to %p\n", "mwifiex_cmd_append_generic_ie", (int )priv->gen_ie_buf_len, *buffer); } } else { } { ie_header.type = 266U; ie_header.len = (unsigned short )priv->gen_ie_buf_len; memcpy((void *)*buffer, (void const *)(& ie_header), 4UL); *buffer = *buffer + 4UL; ret_len = (int )((unsigned int )ret_len + 4U); memcpy((void *)*buffer, (void const *)(& priv->gen_ie_buf), (size_t )priv->gen_ie_buf_len); *buffer = *buffer + (unsigned long )priv->gen_ie_buf_len; ret_len = ret_len + (int )priv->gen_ie_buf_len; priv->gen_ie_buf_len = 0U; } } else { } return (ret_len); } } static int mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv , u8 **buffer , struct mwifiex_bssdescriptor *bss_desc ) { struct mwifiex_ie_types_tsf_timestamp tsf_tlv ; __le64 tsf_val ; struct _ddebug descriptor ; long tmp ; { if ((unsigned long )buffer == (unsigned long )((u8 **)0U)) { return (0); } else { } if ((unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } { memset((void *)(& tsf_tlv), 0, 5UL); tsf_tlv.header.type = 275U; tsf_tlv.header.len = 16U; memcpy((void *)*buffer, (void const *)(& tsf_tlv), 4UL); *buffer = *buffer + 4UL; tsf_val = bss_desc->fw_tsf; memcpy((void *)*buffer, (void const *)(& tsf_val), 8UL); *buffer = *buffer + 8UL; tsf_val = bss_desc->timestamp; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_append_tsf_tlv"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: %s: TSF offset calc: %016llx - %016llx\n"; descriptor.lineno = 130U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: %s: TSF offset calc: %016llx - %016llx\n", "mwifiex_cmd_append_tsf_tlv", bss_desc->timestamp, bss_desc->fw_tsf); } } else { } { memcpy((void *)*buffer, (void const *)(& tsf_val), 8UL); *buffer = *buffer + 8UL; } return (20); } } static int mwifiex_get_common_rates(struct mwifiex_private *priv , u8 *rate1 , u32 rate1_size , u8 *rate2 , u32 rate2_size ) { int ret ; u8 *ptr ; u8 *tmp ; u32 i ; u32 j ; void *tmp___0 ; u8 *tmp___1 ; struct _ddebug descriptor ; long tmp___2 ; { { ptr = rate1; tmp___0 = kmemdup((void const *)rate1, (size_t )rate1_size, 208U); tmp = (u8 *)tmp___0; } if ((unsigned long )tmp == (unsigned long )((u8 *)0U)) { { dev_err((struct device const *)(priv->adapter)->dev, "failed to alloc tmp buf\n"); } return (-12); } else { } { memset((void *)rate1, 0, (size_t )rate1_size); i = 0U; } goto ldv_54583; ldv_54582: j = 0U; goto ldv_54581; ldv_54580: ; if ((((int )*(rate2 + (unsigned long )i) ^ (int )*(tmp + (unsigned long )j)) & 127) == 0) { tmp___1 = rate1; rate1 = rate1 + 1; *tmp___1 = *(tmp + (unsigned long )j); goto ldv_54579; } else { } j = j + 1U; ldv_54581: ; if (j < rate1_size && (unsigned int )*(tmp + (unsigned long )j) != 0U) { goto ldv_54580; } else { } ldv_54579: i = i + 1U; ldv_54583: ; if (i < rate2_size && (unsigned int )*(rate2 + (unsigned long )i) != 0U) { goto ldv_54582; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_get_common_rates"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: Tx data rate set to %#x\n"; descriptor.lineno = 173U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: Tx data rate set to %#x\n", priv->data_rate); } } else { } if ((unsigned int )priv->is_data_rate_auto == 0U) { goto ldv_54589; ldv_54588: ; if (((u32 )*ptr & 127U) == priv->data_rate) { ret = 0; goto done; } else { } ptr = ptr + 1; ldv_54589: ; if ((unsigned int )*ptr != 0U) { goto ldv_54588; } else { } { dev_err((struct device const *)(priv->adapter)->dev, "previously set fixed data rate %#x is not compatible with the network\n", priv->data_rate); ret = -1; } goto done; } else { } ret = 0; done: { kfree((void const *)tmp); } return (ret); } } static int mwifiex_setup_rates_from_bssdesc(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc , u8 *out_rates , u32 *out_rates_size ) { u8 card_rates[14U] ; u32 card_rates_size ; int tmp ; size_t __min1 ; size_t tmp___0 ; size_t __min2 ; { { memcpy((void *)out_rates, (void const *)(& bss_desc->supported_rates), 14UL); card_rates_size = mwifiex_get_active_data_rates(priv, (u8 *)(& card_rates)); tmp = mwifiex_get_common_rates(priv, out_rates, 14U, (u8 *)(& card_rates), card_rates_size); } if (tmp != 0) { { *out_rates_size = 0U; dev_err((struct device const *)(priv->adapter)->dev, "%s: cannot get common rates\n", "mwifiex_setup_rates_from_bssdesc"); } return (-1); } else { } { tmp___0 = strlen((char const *)out_rates); __min1 = tmp___0; __min2 = 14UL; *out_rates_size = (u32 )(__min1 < __min2 ? __min1 : __min2); } return (0); } } static int mwifiex_cmd_append_wps_ie(struct mwifiex_private *priv , u8 **buffer ) { int retLen ; struct mwifiex_ie_types_header ie_header ; struct _ddebug descriptor ; long tmp ; { retLen = 0; if ((unsigned long )buffer == (unsigned long )((u8 **)0U) || (unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } if ((unsigned int )priv->wps_ie_len != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_append_wps_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "cmd: append wps ie %d to %p\n"; descriptor.lineno = 250U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: append wps ie %d to %p\n", (int )priv->wps_ie_len, *buffer); } } else { } { ie_header.type = 361U; ie_header.len = (unsigned short )priv->wps_ie_len; memcpy((void *)*buffer, (void const *)(& ie_header), 4UL); *buffer = *buffer + 4UL; retLen = (int )((unsigned int )retLen + 4U); memcpy((void *)*buffer, (void const *)priv->wps_ie, (size_t )priv->wps_ie_len); *buffer = *buffer + (unsigned long )priv->wps_ie_len; retLen = retLen + (int )priv->wps_ie_len; } } else { } { kfree((void const *)priv->wps_ie); priv->wps_ie_len = 0U; } return (retLen); } } static int mwifiex_cmd_append_wapi_ie(struct mwifiex_private *priv , u8 **buffer ) { int retLen ; struct mwifiex_ie_types_header ie_header ; struct _ddebug descriptor ; long tmp ; { retLen = 0; if ((unsigned long )buffer == (unsigned long )((u8 **)0U)) { return (0); } else { } if ((unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } if ((unsigned int )priv->wapi_ie_len != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_append_wapi_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "cmd: append wapi ie %d to %p\n"; descriptor.lineno = 296U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: append wapi ie %d to %p\n", (int )priv->wapi_ie_len, *buffer); } } else { } { ie_header.type = 350U; ie_header.len = (unsigned short )priv->wapi_ie_len; memcpy((void *)*buffer, (void const *)(& ie_header), 4UL); *buffer = *buffer + 4UL; retLen = (int )((unsigned int )retLen + 4U); memcpy((void *)*buffer, (void const *)(& priv->wapi_ie), (size_t )priv->wapi_ie_len); *buffer = *buffer + (unsigned long )priv->wapi_ie_len; retLen = retLen + (int )priv->wapi_ie_len; } } else { } return (retLen); } } static int mwifiex_append_rsn_ie_wpa_wpa2(struct mwifiex_private *priv , u8 **buffer ) { struct mwifiex_ie_types_rsn_param_set *rsn_ie_tlv ; int rsn_ie_len ; { if ((unsigned long )buffer == (unsigned long )((u8 **)0U) || (unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return (0); } else { } rsn_ie_tlv = (struct mwifiex_ie_types_rsn_param_set *)*buffer; rsn_ie_tlv->header.type = (unsigned short )priv->wpa_ie[0]; rsn_ie_tlv->header.type = (unsigned int )rsn_ie_tlv->header.type & 255U; rsn_ie_tlv->header.len = (unsigned short )priv->wpa_ie[1]; rsn_ie_tlv->header.len = (unsigned int )rsn_ie_tlv->header.len & 255U; if ((unsigned int )rsn_ie_tlv->header.len <= 254U) { { memcpy((void *)(& rsn_ie_tlv->rsn_ie), (void const *)(& priv->wpa_ie) + 2U, (size_t )rsn_ie_tlv->header.len); } } else { return (-1); } rsn_ie_len = (int )((unsigned int )rsn_ie_tlv->header.len + 4U); *buffer = *buffer + (unsigned long )rsn_ie_len; return (rsn_ie_len); } } int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_bssdescriptor *bss_desc ) { struct host_cmd_ds_802_11_associate *assoc ; struct mwifiex_ie_types_ssid_param_set *ssid_tlv ; struct mwifiex_ie_types_phy_param_set *phy_tlv ; struct mwifiex_ie_types_ss_param_set *ss_tlv ; struct mwifiex_ie_types_rates_param_set *rates_tlv ; struct mwifiex_ie_types_auth_type *auth_tlv ; struct mwifiex_ie_types_chan_list_param_set *chan_tlv ; u8 rates[14U] ; u32 rates_size ; u16 tmp_cap ; u8 *pos ; int rsn_ie_len ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; struct _ddebug descriptor___2 ; long tmp___3 ; { { assoc = & cmd->params.associate; rsn_ie_len = 0; pos = (u8 *)assoc; cmd->command = 18U; priv->attempted_bss_desc = bss_desc; memcpy((void *)(& assoc->peer_sta_addr), (void const *)(& bss_desc->mac_address), 6UL); pos = pos + 6UL; assoc->listen_interval = priv->listen_interval; assoc->beacon_period = bss_desc->beacon_period; pos = pos + 2UL; pos = pos + 2UL; pos = pos + 2UL; pos = pos + 1UL; ssid_tlv = (struct mwifiex_ie_types_ssid_param_set *)pos; ssid_tlv->header.type = 0U; ssid_tlv->header.len = (unsigned short )bss_desc->ssid.ssid_len; memcpy((void *)(& ssid_tlv->ssid), (void const *)(& bss_desc->ssid.ssid), (size_t )ssid_tlv->header.len); pos = pos + ((unsigned long )ssid_tlv->header.len + 4UL); phy_tlv = (struct mwifiex_ie_types_phy_param_set *)pos; phy_tlv->header.type = 3U; phy_tlv->header.len = 1U; memcpy((void *)(& phy_tlv->fh_ds.ds_param_set), (void const *)(& bss_desc->phy_param_set.ds_param_set.current_chan), 1UL); pos = pos + ((unsigned long )phy_tlv->header.len + 4UL); ss_tlv = (struct mwifiex_ie_types_ss_param_set *)pos; ss_tlv->header.type = 4U; ss_tlv->header.len = 6U; pos = pos + ((unsigned long )ss_tlv->header.len + 4UL); tmp = mwifiex_setup_rates_from_bssdesc(priv, bss_desc, (u8 *)(& rates), & rates_size); } if (tmp != 0) { return (-1); } else { } { priv->curr_bss_params.num_of_rates = rates_size; memcpy((void *)(& priv->curr_bss_params.data_rates), (void const *)(& rates), (size_t )rates_size); rates_tlv = (struct mwifiex_ie_types_rates_param_set *)pos; rates_tlv->header.type = 1U; rates_tlv->header.len = (unsigned short )rates_size; memcpy((void *)(& rates_tlv->rates), (void const *)(& rates), (size_t )rates_size); pos = pos + ((unsigned long )rates_size + 4UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_associate"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: ASSOC_CMD: rates size = %d\n"; descriptor.lineno = 457U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: ASSOC_CMD: rates size = %d\n", rates_size); } } else { } auth_tlv = (struct mwifiex_ie_types_auth_type *)pos; auth_tlv->header.type = 287U; auth_tlv->header.len = 2U; if ((unsigned int )priv->sec_info.wep_enabled != 0U) { auth_tlv->auth_type = (unsigned short )priv->sec_info.authentication_mode; } else { auth_tlv->auth_type = 0U; } pos = pos + ((unsigned long )auth_tlv->header.len + 4UL); if (((unsigned long )(priv->adapter)->fw_cap_info & 16128UL) != 0UL && (((((unsigned long )(priv->adapter)->fw_cap_info & 2048UL) == 0UL || (unsigned int )bss_desc->disable_11n != 0U) || ((unsigned int )(priv->adapter)->config_bands & 24U) == 0U) || (unsigned long )bss_desc->bcn_ht_cap == (unsigned long )((struct ieee80211_ht_cap *)0))) { { chan_tlv = (struct mwifiex_ie_types_chan_list_param_set *)pos; chan_tlv->header.type = 257U; chan_tlv->header.len = 7U; memset((void *)(& chan_tlv->chan_scan_param), 0, 7UL); chan_tlv->chan_scan_param[0].chan_number = bss_desc->phy_param_set.ds_param_set.current_chan; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_associate"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: Assoc: TLV Chan = %d\n"; descriptor___0.lineno = 491U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: Assoc: TLV Chan = %d\n", (int )chan_tlv->chan_scan_param[0].chan_number); } } else { } { chan_tlv->chan_scan_param[0].radio_type = mwifiex_band_to_radio_type((int )((unsigned char )bss_desc->bss_band)); descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cmd_802_11_associate"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: Assoc: TLV Band = %d\n"; descriptor___1.lineno = 497U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: Assoc: TLV Band = %d\n", (int )chan_tlv->chan_scan_param[0].radio_type); } } else { } pos = pos + 11UL; } else { } if ((unsigned int )priv->wps.session_enable == 0U) { if ((unsigned int )*((unsigned short *)priv + 358UL) != 0U) { { rsn_ie_len = mwifiex_append_rsn_ie_wpa_wpa2(priv, & pos); } } else { } if (rsn_ie_len == -1) { return (-1); } else { } } else { } if ((((unsigned long )(priv->adapter)->fw_cap_info & 2048UL) != 0UL && (unsigned int )bss_desc->disable_11n == 0U) && ((unsigned int )(priv->adapter)->config_bands & 24U) != 0U) { { mwifiex_cmd_append_11n_tlv(priv, bss_desc, & pos); } } else { } if (((((unsigned long )(priv->adapter)->fw_cap_info & 12288UL) != 0UL && (unsigned int )bss_desc->disable_11n == 0U) && (unsigned int )bss_desc->disable_11ac == 0U) && ((unsigned int )(priv->adapter)->config_bands & 96U) != 0U) { { mwifiex_cmd_append_11ac_tlv(priv, bss_desc, & pos); } } else { } { mwifiex_cmd_append_vsie_tlv(priv, 2, & pos); mwifiex_wmm_process_association_req(priv, & pos, & bss_desc->wmm_ie, bss_desc->bcn_ht_cap); } if ((unsigned int )priv->sec_info.wapi_enabled != 0U && (unsigned int )priv->wapi_ie_len != 0U) { { mwifiex_cmd_append_wapi_ie(priv, & pos); } } else { } if ((unsigned int )priv->wps.session_enable != 0U && (unsigned int )priv->wps_ie_len != 0U) { { mwifiex_cmd_append_wps_ie(priv, & pos); } } else { } { mwifiex_cmd_append_generic_ie(priv, & pos); mwifiex_cmd_append_tsf_tlv(priv, & pos, bss_desc); mwifiex_11h_process_join(priv, & pos, bss_desc); cmd->size = (unsigned int )((int )((unsigned short )((long )pos)) - (int )((unsigned short )((long )assoc))) + 8U; tmp_cap = bss_desc->cap_info_bitmap; } if ((unsigned int )(priv->adapter)->config_bands == 1U) { tmp_cap = (unsigned int )tmp_cap & 64511U; } else { } { tmp_cap = (unsigned int )tmp_cap & 9727U; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_cmd_802_11_associate"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n"; descriptor___2.lineno = 549U; descriptor___2.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", (int )tmp_cap, 0xffffffffffff25ffUL); } } else { } assoc->cap_info_bitmap = tmp_cap; return (0); } } int mwifiex_ret_802_11_associate(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct mwifiex_adapter *adapter ; int ret ; struct ieee_types_assoc_rsp *assoc_rsp ; struct mwifiex_bssdescriptor *bss_desc ; bool enable_data ; u16 cap_info ; u16 status_code ; unsigned long _min1 ; unsigned long _min2 ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; bool tmp___3 ; int tmp___4 ; { { adapter = priv->adapter; ret = 0; enable_data = 1; assoc_rsp = (struct ieee_types_assoc_rsp *)(& resp->params); cap_info = assoc_rsp->cap_info_bitmap; status_code = assoc_rsp->status_code; _min1 = (unsigned long )resp->size - 8UL; _min2 = 500UL; priv->assoc_rsp_size = (u32 )(_min1 < _min2 ? _min1 : _min2); memcpy((void *)(& priv->assoc_rsp_buf), (void const *)(& resp->params), (size_t )priv->assoc_rsp_size); } if ((unsigned int )status_code != 0U) { { (priv->adapter)->dbg.num_cmd_assoc_failure = (priv->adapter)->dbg.num_cmd_assoc_failure + 1U; dev_err((struct device const *)(priv->adapter)->dev, "ASSOC_RESP: failed, status code=%d err=%#x a_id=%#x\n", (int )status_code, (int )cap_info, (int )assoc_rsp->a_id); } if ((unsigned int )cap_info == 65532U) { if ((unsigned int )status_code == 2U) { ret = 16; } else { ret = 1; } } else { ret = (int )status_code; } goto done; } else { } { priv->media_connected = 1U; (priv->adapter)->ps_state = 0U; (priv->adapter)->pps_uapsd_mode = 0U; (priv->adapter)->tx_lock_flag = 0U; bss_desc = priv->attempted_bss_desc; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_associate"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: ASSOC_RESP: %s\n"; descriptor.lineno = 666U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: ASSOC_RESP: %s\n", (u8 *)(& bss_desc->ssid.ssid)); } } else { } { memcpy((void *)(& priv->curr_bss_params.bss_descriptor), (void const *)bss_desc, 336UL); priv->curr_bss_params.bss_descriptor.channel = (u32 )bss_desc->phy_param_set.ds_param_set.current_chan; priv->curr_bss_params.band = (unsigned char )bss_desc->bss_band; } if ((unsigned int )bss_desc->wmm_ie.vend_hdr.element_id == 221U) { priv->curr_bss_params.wmm_enabled = 1U; } else { priv->curr_bss_params.wmm_enabled = 0U; } if (((unsigned int )priv->wmm_required != 0U || (unsigned long )bss_desc->bcn_ht_cap != (unsigned long )((struct ieee80211_ht_cap *)0)) && (unsigned int )priv->curr_bss_params.wmm_enabled != 0U) { priv->wmm_enabled = 1U; } else { priv->wmm_enabled = 0U; } priv->curr_bss_params.wmm_uapsd_enabled = 0U; if ((unsigned int )priv->wmm_enabled != 0U) { priv->curr_bss_params.wmm_uapsd_enabled = (int )((signed char )bss_desc->wmm_ie.qos_info_bitmap) < 0; } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_802_11_associate"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: ASSOC_RESP: curr_pkt_filter is %#x\n"; descriptor___0.lineno = 697U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: ASSOC_RESP: curr_pkt_filter is %#x\n", (int )priv->curr_pkt_filter); } } else { } if ((unsigned int )*((unsigned short *)priv + 358UL) != 0U) { priv->wpa_is_gtk_set = 0U; } else { } if ((unsigned int )priv->wmm_enabled != 0U) { enable_data = 0; } else { { mwifiex_wmm_setup_queue_priorities(priv, (struct ieee_types_wmm_parameter *)0); mwifiex_wmm_setup_ac_downgrade(priv); } } if ((int )enable_data) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_802_11_associate"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: post association, re-enabling data flow\n"; descriptor___1.lineno = 714U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: post association, re-enabling data flow\n"); } } else { } } else { } { priv->data_rssi_last = 0; priv->data_nf_last = 0; priv->data_rssi_avg = 0; priv->data_nf_avg = 0; priv->bcn_rssi_last = 0; priv->bcn_nf_last = 0; priv->bcn_rssi_avg = 0; priv->bcn_nf_avg = 0; priv->rxpd_rate = 0U; priv->rxpd_htinfo = 0U; mwifiex_save_curr_bcn(priv); (priv->adapter)->dbg.num_cmd_assoc_success = (priv->adapter)->dbg.num_cmd_assoc_success + 1U; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_802_11_associate"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: ASSOC_RESP: associated\n"; descriptor___2.lineno = 732U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: ASSOC_RESP: associated\n"); } } else { } { mwifiex_ralist_add(priv, (u8 *)(& priv->curr_bss_params.bss_descriptor.mac_address)); tmp___3 = netif_carrier_ok((struct net_device const *)priv->netdev); } if (tmp___3) { tmp___4 = 0; } else { tmp___4 = 1; } if (tmp___4) { { netif_carrier_on(priv->netdev); } } else { } { mwifiex_wake_up_net_dev_queue(priv->netdev, adapter); } if ((unsigned int )*((unsigned short *)priv + 358UL) != 0U) { priv->scan_block = 1U; } else { } done: ; if ((adapter->curr_cmd)->wait_q_enabled != 0U) { if (ret != 0) { adapter->cmd_wait_q.status = -1; } else { adapter->cmd_wait_q.status = 0; } } else { } return (ret); } } int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct cfg80211_ssid *req_ssid ) { int rsn_ie_len ; struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_ad_hoc_start *adhoc_start ; struct mwifiex_bssdescriptor *bss_desc ; u32 cmd_append_size ; u32 i ; u16 tmp_cap ; struct mwifiex_ie_types_chan_list_param_set *chan_tlv ; u8 radio_type ; struct mwifiex_ie_types_htcap *ht_cap ; struct mwifiex_ie_types_htinfo *ht_info ; u8 *pos ; struct _ddebug descriptor ; long tmp ; struct mwifiex_chan_freq_power *cfp ; struct mwifiex_chan_freq_power *tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; struct _ddebug descriptor___2 ; long tmp___3 ; int tmp___4 ; struct _ddebug descriptor___3 ; long tmp___5 ; struct _ddebug descriptor___4 ; long tmp___6 ; struct _ddebug descriptor___5 ; long tmp___7 ; struct _ddebug descriptor___6 ; long tmp___8 ; int tmp___9 ; u16 tmp_ht_cap ; { rsn_ie_len = 0; adapter = priv->adapter; adhoc_start = & cmd->params.adhoc_start; cmd_append_size = 0U; pos = (u8 *)adhoc_start + 69UL; if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { return (-1); } else { } { cmd->command = 43U; bss_desc = & priv->curr_bss_params.bss_descriptor; priv->attempted_bss_desc = bss_desc; memset((void *)(& adhoc_start->ssid), 0, 32UL); memcpy((void *)(& adhoc_start->ssid), (void const *)(& req_ssid->ssid), (size_t )req_ssid->ssid_len); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: ADHOC_S_CMD: SSID = %s\n"; descriptor.lineno = 820U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: SSID = %s\n", (u8 *)(& adhoc_start->ssid)); } } else { } { memset((void *)(& bss_desc->ssid.ssid), 0, 32UL); memcpy((void *)(& bss_desc->ssid.ssid), (void const *)(& req_ssid->ssid), (size_t )req_ssid->ssid_len); bss_desc->ssid.ssid_len = req_ssid->ssid_len; adhoc_start->bss_mode = 2U; bss_desc->bss_mode = 1U; adhoc_start->beacon_period = priv->beacon_period; bss_desc->beacon_period = priv->beacon_period; adhoc_start->phy_param_set.ds_param_set.element_id = 3U; adhoc_start->phy_param_set.ds_param_set.len = 1U; tmp___0 = mwifiex_get_cfp(priv, (int )adapter->adhoc_start_band, (int )priv->adhoc_channel, 0U); } if ((unsigned long )tmp___0 == (unsigned long )((struct mwifiex_chan_freq_power *)0)) { { cfp = mwifiex_get_cfp(priv, (int )adapter->adhoc_start_band, 255, 0U); } if ((unsigned long )cfp != (unsigned long )((struct mwifiex_chan_freq_power *)0)) { priv->adhoc_channel = (unsigned char )cfp->channel; } else { } } else { } if ((unsigned int )priv->adhoc_channel == 0U) { { dev_err((struct device const *)adapter->dev, "ADHOC_S_CMD: adhoc_channel cannot be 0\n"); } return (-1); } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: ADHOC_S_CMD: creating ADHOC on channel %d\n"; descriptor___0.lineno = 857U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: creating ADHOC on channel %d\n", (int )priv->adhoc_channel); } } else { } { priv->curr_bss_params.bss_descriptor.channel = (u32 )priv->adhoc_channel; priv->curr_bss_params.band = adapter->adhoc_start_band; bss_desc->channel = (u32 )priv->adhoc_channel; adhoc_start->phy_param_set.ds_param_set.current_chan = priv->adhoc_channel; memcpy((void *)(& bss_desc->phy_param_set), (void const *)(& adhoc_start->phy_param_set), 7UL); adhoc_start->ss_param_set.ibss_param_set.element_id = 6U; adhoc_start->ss_param_set.ibss_param_set.len = 2U; adhoc_start->ss_param_set.ibss_param_set.atim_window = priv->atim_window; memcpy((void *)(& bss_desc->ss_param_set), (void const *)(& adhoc_start->ss_param_set), 8UL); bss_desc->cap_info_bitmap = (u16 )((unsigned int )bss_desc->cap_info_bitmap | 2U); tmp_cap = adhoc_start->cap_info_bitmap; tmp_cap = (unsigned int )tmp_cap & 65534U; tmp_cap = (u16 )((unsigned int )tmp_cap | 2U); } if (priv->sec_info.encryption_mode != 0U) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: ADHOC_S_CMD: wep_status set privacy to WEP\n"; descriptor___1.lineno = 892U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: wep_status set privacy to WEP\n"); } } else { } bss_desc->privacy = 1U; tmp_cap = (u16 )((unsigned int )tmp_cap | 16U); } else { { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: ADHOC_S_CMD: wep_status NOT set, setting privacy to ACCEPT ALL\n"; descriptor___2.lineno = 897U; descriptor___2.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: wep_status NOT set, setting privacy to ACCEPT ALL\n"); } } else { } bss_desc->privacy = 0U; } { memset((void *)(& adhoc_start->data_rate), 0, 14UL); mwifiex_get_active_data_rates(priv, (u8 *)(& adhoc_start->data_rate)); } if (((int )adapter->adhoc_start_band & 2) != 0 && ((int )priv->curr_pkt_filter & 8192) != 0) { { tmp___4 = mwifiex_send_cmd_async(priv, 40, 1, 0U, (void *)(& priv->curr_pkt_filter)); } if (tmp___4 != 0) { { dev_err((struct device const *)adapter->dev, "ADHOC_S_CMD: G Protection config failed\n"); } return (-1); } else { } } else { } i = 0U; goto ldv_54692; ldv_54691: ; if ((unsigned int )adhoc_start->data_rate[i] == 0U) { goto ldv_54690; } else { } i = i + 1U; ldv_54692: ; if (i <= 13U) { goto ldv_54691; } else { } ldv_54690: { priv->curr_bss_params.num_of_rates = i; memcpy((void *)(& priv->curr_bss_params.data_rates), (void const *)(& adhoc_start->data_rate), (size_t )priv->curr_bss_params.num_of_rates); descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___3.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___3.format = "info: ADHOC_S_CMD: rates=%4ph\n"; descriptor___3.lineno = 925U; descriptor___3.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: rates=%4ph\n", (u8 *)(& adhoc_start->data_rate)); } } else { } { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___4.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___4.format = "info: ADHOC_S_CMD: AD-HOC Start command is ready\n"; descriptor___4.lineno = 927U; descriptor___4.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: AD-HOC Start command is ready\n"); } } else { } if (((unsigned long )adapter->fw_cap_info & 16128UL) != 0UL) { { chan_tlv = (struct mwifiex_ie_types_chan_list_param_set *)pos; chan_tlv->header.type = 257U; chan_tlv->header.len = 7U; memset((void *)(& chan_tlv->chan_scan_param), 0, 7UL); chan_tlv->chan_scan_param[0].chan_number = (unsigned char )priv->curr_bss_params.bss_descriptor.channel; descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___5.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___5.format = "info: ADHOC_S_CMD: TLV Chan = %d\n"; descriptor___5.lineno = 942U; descriptor___5.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___7 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: TLV Chan = %d\n", (int )chan_tlv->chan_scan_param[0].chan_number); } } else { } { chan_tlv->chan_scan_param[0].radio_type = mwifiex_band_to_radio_type((int )priv->curr_bss_params.band); } if (((unsigned int )adapter->adhoc_start_band & 24U) != 0U) { if ((unsigned int )adapter->sec_chan_offset == 1U) { chan_tlv->chan_scan_param[0].radio_type = (u8 )((unsigned int )chan_tlv->chan_scan_param[0].radio_type | 16U); } else if ((unsigned int )adapter->sec_chan_offset == 1U) { chan_tlv->chan_scan_param[0].radio_type = (u8 )((unsigned int )chan_tlv->chan_scan_param[0].radio_type | 48U); } else { } } else { } { descriptor___6.modname = "mwifiex"; descriptor___6.function = "mwifiex_cmd_802_11_ad_hoc_start"; descriptor___6.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___6.format = "info: ADHOC_S_CMD: TLV Band = %d\n"; descriptor___6.lineno = 958U; descriptor___6.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); } if (tmp___8 != 0L) { { __dynamic_dev_dbg(& descriptor___6, (struct device const *)adapter->dev, "info: ADHOC_S_CMD: TLV Band = %d\n", (int )chan_tlv->chan_scan_param[0].radio_type); } } else { } pos = pos + 11UL; cmd_append_size = cmd_append_size + 11U; } else { } { tmp___9 = mwifiex_cmd_append_vsie_tlv(priv, 4, & pos); cmd_append_size = cmd_append_size + (u32 )tmp___9; } if ((unsigned int )priv->sec_info.wpa_enabled != 0U) { { rsn_ie_len = mwifiex_append_rsn_ie_wpa_wpa2(priv, & pos); } if (rsn_ie_len == -1) { return (-1); } else { } cmd_append_size = cmd_append_size + (u32 )rsn_ie_len; } else { } if ((unsigned int )adapter->adhoc_11n_enabled != 0U) { { ht_cap = (struct mwifiex_ie_types_htcap *)pos; memset((void *)ht_cap, 0, 30UL); ht_cap->header.type = 45U; ht_cap->header.len = 26U; radio_type = mwifiex_band_to_radio_type((int )(priv->adapter)->config_bands); mwifiex_fill_cap_info(priv, (int )radio_type, ht_cap); } if ((unsigned int )adapter->sec_chan_offset == 0U) { tmp_ht_cap = ht_cap->ht_cap.cap_info; tmp_ht_cap = (unsigned int )tmp_ht_cap & 65533U; tmp_ht_cap = (unsigned int )tmp_ht_cap & 65471U; ht_cap->ht_cap.cap_info = tmp_ht_cap; } else { } { pos = pos + 30UL; cmd_append_size = cmd_append_size + 30U; ht_info = (struct mwifiex_ie_types_htinfo *)pos; memset((void *)ht_info, 0, 26UL); ht_info->header.type = 61U; ht_info->header.len = 22U; ht_info->ht_oper.primary_chan = (unsigned char )priv->curr_bss_params.bss_descriptor.channel; } if ((unsigned int )adapter->sec_chan_offset != 0U) { ht_info->ht_oper.ht_param = adapter->sec_chan_offset; ht_info->ht_oper.ht_param = (u8 )((unsigned int )ht_info->ht_oper.ht_param | 4U); } else { } ht_info->ht_oper.operation_mode = 4U; ht_info->ht_oper.basic_set[0] = 255U; pos = pos + 26UL; cmd_append_size = cmd_append_size + 26U; } else { } cmd->size = (unsigned int )((unsigned short )cmd_append_size) + 77U; if ((unsigned int )adapter->adhoc_start_band == 1U) { tmp_cap = (unsigned int )tmp_cap & 64511U; } else { tmp_cap = (u16 )((unsigned int )tmp_cap | 1024U); } adhoc_start->cap_info_bitmap = tmp_cap; return (0); } } int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_bssdescriptor *bss_desc ) { int rsn_ie_len ; struct host_cmd_ds_802_11_ad_hoc_join *adhoc_join ; struct mwifiex_ie_types_chan_list_param_set *chan_tlv ; u32 cmd_append_size ; u16 tmp_cap ; u32 i ; u32 rates_size ; u16 curr_pkt_filter ; u8 *pos ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; struct _ddebug descriptor___2 ; long tmp___3 ; int tmp___4 ; int tmp___5 ; { rsn_ie_len = 0; adhoc_join = & cmd->params.adhoc_join; cmd_append_size = 0U; rates_size = 0U; pos = (u8 *)adhoc_join + 93UL; if (((int )bss_desc->erp_flags & 2) != 0) { { curr_pkt_filter = (u16 )((unsigned int )priv->curr_pkt_filter | 8192U); tmp = mwifiex_send_cmd_async(priv, 40, 1, 0U, (void *)(& curr_pkt_filter)); } if (tmp != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "ADHOC_J_CMD: G Protection config failed\n"); } return (-1); } else { } } else { } { priv->attempted_bss_desc = bss_desc; cmd->command = 44U; adhoc_join->bss_descriptor.bss_mode = 2U; adhoc_join->bss_descriptor.beacon_period = bss_desc->beacon_period; memcpy((void *)(& adhoc_join->bss_descriptor.bssid), (void const *)(& bss_desc->mac_address), 6UL); memcpy((void *)(& adhoc_join->bss_descriptor.ssid), (void const *)(& bss_desc->ssid.ssid), (size_t )bss_desc->ssid.ssid_len); memcpy((void *)(& adhoc_join->bss_descriptor.phy_param_set), (void const *)(& bss_desc->phy_param_set), 7UL); memcpy((void *)(& adhoc_join->bss_descriptor.ss_param_set), (void const *)(& bss_desc->ss_param_set), 8UL); tmp_cap = bss_desc->cap_info_bitmap; tmp_cap = (unsigned int )tmp_cap & 9727U; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_ad_hoc_join"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: ADHOC_J_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n"; descriptor.lineno = 1114U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", (int )tmp_cap, 0xffffffffffff25ffUL); } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_ad_hoc_join"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: ADHOC_J_CMD: BSSID=%pM, SSID=\'%s\'\n"; descriptor___0.lineno = 1119U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_CMD: BSSID=%pM, SSID=\'%s\'\n", (u8 *)(& adhoc_join->bss_descriptor.bssid), (u8 *)(& adhoc_join->bss_descriptor.ssid)); } } else { } i = 0U; goto ldv_54716; ldv_54715: i = i + 1U; ldv_54716: ; if (i <= 13U && (unsigned int )bss_desc->supported_rates[i] != 0U) { goto ldv_54715; } else { } { rates_size = i; memset((void *)(& adhoc_join->bss_descriptor.data_rates), 0, 14UL); memcpy((void *)(& adhoc_join->bss_descriptor.data_rates), (void const *)(& bss_desc->supported_rates), (size_t )rates_size); priv->curr_bss_params.num_of_rates = rates_size; memcpy((void *)(& priv->curr_bss_params.data_rates), (void const *)(& bss_desc->supported_rates), (size_t )rates_size); priv->curr_bss_params.bss_descriptor.channel = bss_desc->channel; priv->curr_bss_params.band = (unsigned char )bss_desc->bss_band; } if ((unsigned int )priv->sec_info.wep_enabled != 0U || (unsigned int )priv->sec_info.wpa_enabled != 0U) { tmp_cap = (u16 )((unsigned int )tmp_cap | 16U); } else { } if (((unsigned long )(priv->adapter)->fw_cap_info & 16128UL) != 0UL) { { chan_tlv = (struct mwifiex_ie_types_chan_list_param_set *)pos; chan_tlv->header.type = 257U; chan_tlv->header.len = 7U; memset((void *)(& chan_tlv->chan_scan_param), 0, 7UL); chan_tlv->chan_scan_param[0].chan_number = bss_desc->phy_param_set.ds_param_set.current_chan; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cmd_802_11_ad_hoc_join"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: ADHOC_J_CMD: TLV Chan=%d\n"; descriptor___1.lineno = 1156U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_CMD: TLV Chan=%d\n", (int )chan_tlv->chan_scan_param[0].chan_number); } } else { } { chan_tlv->chan_scan_param[0].radio_type = mwifiex_band_to_radio_type((int )((unsigned char )bss_desc->bss_band)); descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_cmd_802_11_ad_hoc_join"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: ADHOC_J_CMD: TLV Band=%d\n"; descriptor___2.lineno = 1162U; descriptor___2.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_CMD: TLV Band=%d\n", (int )chan_tlv->chan_scan_param[0].radio_type); } } else { } pos = pos + 11UL; cmd_append_size = cmd_append_size + 11U; } else { } if ((unsigned int )priv->sec_info.wpa_enabled != 0U) { { rsn_ie_len = mwifiex_append_rsn_ie_wpa_wpa2(priv, & pos); } } else { } if (rsn_ie_len == -1) { return (-1); } else { } cmd_append_size = cmd_append_size + (u32 )rsn_ie_len; if (((unsigned long )(priv->adapter)->fw_cap_info & 2048UL) != 0UL) { { tmp___4 = mwifiex_cmd_append_11n_tlv(priv, bss_desc, & pos); cmd_append_size = cmd_append_size + (u32 )tmp___4; } } else { } { tmp___5 = mwifiex_cmd_append_vsie_tlv(priv, 4, & pos); cmd_append_size = cmd_append_size + (u32 )tmp___5; cmd->size = (unsigned int )((unsigned short )cmd_append_size) + 101U; adhoc_join->bss_descriptor.cap_info_bitmap = tmp_cap; } return (0); } } int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { int ret ; struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_ad_hoc_result *adhoc_result ; struct mwifiex_bssdescriptor *bss_desc ; u16 reason_code ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; bool tmp___3 ; int tmp___4 ; { ret = 0; adapter = priv->adapter; adhoc_result = & resp->params.adhoc_result; bss_desc = priv->attempted_bss_desc; reason_code = resp->result; if ((unsigned int )reason_code != 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "ADHOC_RESP: failed\n"); } if ((unsigned int )priv->media_connected != 0U) { { mwifiex_reset_connect_state(priv, (int )reason_code); } } else { } { memset((void *)(& priv->curr_bss_params.bss_descriptor), 0, 336UL); ret = -1; } goto done; } else { } priv->media_connected = 1U; if ((unsigned int )resp->command == 43U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_ad_hoc"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: ADHOC_S_RESP %s\n"; descriptor.lineno = 1232U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: ADHOC_S_RESP %s\n", (u8 *)(& bss_desc->ssid.ssid)); } } else { } { memcpy((void *)(& bss_desc->mac_address), (void const *)(& adhoc_result->bssid), 6UL); priv->adhoc_state = 1U; } } else { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_802_11_ad_hoc"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: ADHOC_J_RESP %s\n"; descriptor___0.lineno = 1245U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_RESP %s\n", (u8 *)(& bss_desc->ssid.ssid)); } } else { } { memcpy((void *)(& priv->curr_bss_params.bss_descriptor), (void const *)bss_desc, 336UL); priv->adhoc_state = 2U; } } { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_802_11_ad_hoc"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: ADHOC_RESP: channel = %d\n"; descriptor___1.lineno = 1259U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: ADHOC_RESP: channel = %d\n", (int )priv->adhoc_channel); } } else { } { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_802_11_ad_hoc"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: ADHOC_RESP: BSSID = %pM\n"; descriptor___2.lineno = 1261U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: ADHOC_RESP: BSSID = %pM\n", (u8 *)(& priv->curr_bss_params.bss_descriptor.mac_address)); } } else { } { tmp___3 = netif_carrier_ok((struct net_device const *)priv->netdev); } if (tmp___3) { tmp___4 = 0; } else { tmp___4 = 1; } if (tmp___4) { { netif_carrier_on(priv->netdev); } } else { } { mwifiex_wake_up_net_dev_queue(priv->netdev, adapter); mwifiex_save_curr_bcn(priv); } done: ; if ((adapter->curr_cmd)->wait_q_enabled != 0U) { if (ret != 0) { adapter->cmd_wait_q.status = -1; } else { adapter->cmd_wait_q.status = 0; } } else { } return (ret); } } int mwifiex_associate(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { u8 current_bssid[6U] ; int tmp ; { if ((int )priv->bss_role & 1 || bss_desc->bss_mode != 2U) { return (-1); } else { } if (((((unsigned long )(priv->adapter)->fw_cap_info & 12288UL) != 0UL && (unsigned int )bss_desc->disable_11n == 0U) && (unsigned int )bss_desc->disable_11ac == 0U) && ((unsigned int )(priv->adapter)->config_bands & 96U) != 0U) { { mwifiex_set_11ac_ba_params(priv); } } else { { mwifiex_set_ba_params(priv); } } { memcpy((void *)(& current_bssid), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); priv->assoc_rsp_size = 0U; tmp = mwifiex_send_cmd_sync(priv, 18, 1, 0U, (void *)bss_desc); } return (tmp); } } int mwifiex_adhoc_start(struct mwifiex_private *priv , struct cfg80211_ssid *adhoc_ssid ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; int tmp___2 ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_adhoc_start"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: Adhoc Channel = %d\n"; descriptor.lineno = 1331U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: Adhoc Channel = %d\n", (int )priv->adhoc_channel); } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_adhoc_start"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: curr_bss_params.channel = %d\n"; descriptor___0.lineno = 1333U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: curr_bss_params.channel = %d\n", priv->curr_bss_params.bss_descriptor.channel); } } else { } { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_adhoc_start"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: curr_bss_params.band = %d\n"; descriptor___1.lineno = 1335U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: curr_bss_params.band = %d\n", (int )priv->curr_bss_params.band); } } else { } if (((unsigned long )(priv->adapter)->fw_cap_info & 12288UL) != 0UL && ((unsigned int )(priv->adapter)->config_bands & 96U) != 0U) { { mwifiex_set_11ac_ba_params(priv); } } else { { mwifiex_set_ba_params(priv); } } { tmp___2 = mwifiex_send_cmd_sync(priv, 43, 1, 0U, (void *)adhoc_ssid); } return (tmp___2); } } int mwifiex_adhoc_join(struct mwifiex_private *priv , struct mwifiex_bssdescriptor *bss_desc ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; s32 tmp___4 ; struct _ddebug descriptor___4 ; long tmp___5 ; struct _ddebug descriptor___5 ; long tmp___6 ; int tmp___7 ; { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_adhoc_join"; descriptor.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor.format = "info: adhoc join: curr_bss ssid =%s\n"; descriptor.lineno = 1358U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: adhoc join: curr_bss ssid =%s\n", (u8 *)(& priv->curr_bss_params.bss_descriptor.ssid.ssid)); } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_adhoc_join"; descriptor___0.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___0.format = "info: adhoc join: curr_bss ssid_len =%u\n"; descriptor___0.lineno = 1360U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: adhoc join: curr_bss ssid_len =%u\n", (int )priv->curr_bss_params.bss_descriptor.ssid.ssid_len); } } else { } { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_adhoc_join"; descriptor___1.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___1.format = "info: adhoc join: ssid =%s\n"; descriptor___1.lineno = 1362U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: adhoc join: ssid =%s\n", (u8 *)(& bss_desc->ssid.ssid)); } } else { } { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_adhoc_join"; descriptor___2.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___2.format = "info: adhoc join: ssid_len =%u\n"; descriptor___2.lineno = 1364U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: adhoc join: ssid_len =%u\n", (int )bss_desc->ssid.ssid_len); } } else { } if ((unsigned int )priv->curr_bss_params.bss_descriptor.ssid.ssid_len != 0U) { { tmp___4 = mwifiex_ssid_cmp(& bss_desc->ssid, & priv->curr_bss_params.bss_descriptor.ssid); } if (tmp___4 == 0) { if (priv->curr_bss_params.bss_descriptor.bss_mode == 1U) { { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_adhoc_join"; descriptor___3.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___3.format = "info: ADHOC_J_CMD: new ad-hoc SSID is the same as current; not attempting to re-join\n"; descriptor___3.lineno = 1373U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)(priv->adapter)->dev, "info: ADHOC_J_CMD: new ad-hoc SSID is the same as current; not attempting to re-join\n"); } } else { } return (-1); } else { } } else { } } else { } if (((((unsigned long )(priv->adapter)->fw_cap_info & 12288UL) != 0UL && (unsigned int )bss_desc->disable_11n == 0U) && (unsigned int )bss_desc->disable_11ac == 0U) && ((unsigned int )(priv->adapter)->config_bands & 96U) != 0U) { { mwifiex_set_11ac_ba_params(priv); } } else { { mwifiex_set_ba_params(priv); } } { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_adhoc_join"; descriptor___4.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___4.format = "info: curr_bss_params.channel = %d\n"; descriptor___4.lineno = 1386U; descriptor___4.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)(priv->adapter)->dev, "info: curr_bss_params.channel = %d\n", priv->curr_bss_params.bss_descriptor.channel); } } else { } { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_adhoc_join"; descriptor___5.filename = "drivers/net/wireless/mwifiex/join.c"; descriptor___5.format = "info: curr_bss_params.band = %c\n"; descriptor___5.lineno = 1388U; descriptor___5.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)(priv->adapter)->dev, "info: curr_bss_params.band = %c\n", (int )priv->curr_bss_params.band); } } else { } { tmp___7 = mwifiex_send_cmd_sync(priv, 44, 1, 0U, (void *)bss_desc); } return (tmp___7); } } static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv , u8 *mac ) { u8 mac_address[6U] ; int ret ; bool tmp ; { if ((unsigned long )mac == (unsigned long )((u8 *)0U)) { { memcpy((void *)(& mac_address), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); } } else { { tmp = is_zero_ether_addr((u8 const *)mac); } if ((int )tmp) { { memcpy((void *)(& mac_address), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); } } else { { memcpy((void *)(& mac_address), (void const *)mac, 6UL); } } } { ret = mwifiex_send_cmd_sync(priv, 36, 1, 0U, (void *)(& mac_address)); } return (ret); } } int mwifiex_deauthenticate(struct mwifiex_private *priv , u8 *mac ) { int ret ; int tmp ; int tmp___0 ; { ret = 0; if ((unsigned int )priv->media_connected == 0U) { return (0); } else { } { if (priv->bss_mode == 2U) { goto case_2; } else { } if (priv->bss_mode == 8U) { goto case_8; } else { } if (priv->bss_mode == 1U) { goto case_1; } else { } if (priv->bss_mode == 3U) { goto case_3; } else { } goto switch_default; case_2: /* CIL Label */ ; case_8: /* CIL Label */ { ret = mwifiex_deauthenticate_infra(priv, mac); } if (ret != 0) { { cfg80211_disconnected(priv->netdev, 0, (u8 *)0U, 0UL, 208U); } } else { } goto ldv_54773; case_1: /* CIL Label */ { tmp = mwifiex_send_cmd_sync(priv, 64, 1, 0U, (void *)0); } return (tmp); case_3: /* CIL Label */ { tmp___0 = mwifiex_send_cmd_sync(priv, 178, 1, 0U, (void *)0); } return (tmp___0); switch_default: /* CIL Label */ ; goto ldv_54773; switch_break: /* CIL Label */ ; } ldv_54773: ; return (ret); } } static char const __kstrtab_mwifiex_deauthenticate[23U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'd', 'e', 'a', 'u', 't', 'h', 'e', 'n', 't', 'i', 'c', 'a', 't', 'e', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_deauthenticate ; struct kernel_symbol const __ksymtab_mwifiex_deauthenticate = {(unsigned long )(& mwifiex_deauthenticate), (char const *)(& __kstrtab_mwifiex_deauthenticate)}; u8 mwifiex_band_to_radio_type(u8 band ) { { { if ((int )band == 4) { goto case_4; } else { } if ((int )band == 16) { goto case_16; } else { } if ((int )band == 20) { goto case_20; } else { } if ((int )band == 84) { goto case_84; } else { } if ((int )band == 1) { goto case_1; } else { } if ((int )band == 2) { goto case_2; } else { } if ((int )band == 3) { goto case_3; } else { } goto switch_default; case_4: /* CIL Label */ ; case_16: /* CIL Label */ ; case_20: /* CIL Label */ ; case_84: /* CIL Label */ ; return (1U); case_1: /* CIL Label */ ; case_2: /* CIL Label */ ; case_3: /* CIL Label */ ; switch_default: /* CIL Label */ ; return (0U); switch_break: /* CIL Label */ ; } } } extern int sprintf(char * , char const * , ...) ; extern int snprintf(char * , size_t , char const * , ...) ; extern int strncmp(char const * , char const * , __kernel_size_t ) ; extern void lock_acquire(struct lockdep_map * , unsigned int , int , int , int , struct lockdep_map * , unsigned long ) ; extern void lock_release(struct lockdep_map * , int , unsigned long ) ; extern int lock_is_held(struct lockdep_map * ) ; extern void lockdep_rcu_suspicious(char const * , int const , char const * ) ; __inline static void __preempt_count_add(int val ) { int pao_ID__ ; { pao_ID__ = 0; { if (4UL == 1UL) { goto case_1; } else { } if (4UL == 2UL) { goto case_2; } else { } if (4UL == 4UL) { goto case_4; } else { } if (4UL == 8UL) { goto case_8; } else { } goto switch_default; case_1: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" (__preempt_count): "qi" (val)); } goto ldv_6359; case_2: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" (__preempt_count): "ri" (val)); } goto ldv_6359; case_4: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" (__preempt_count): "ri" (val)); } goto ldv_6359; case_8: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" (__preempt_count): "re" (val)); } goto ldv_6359; switch_default: /* CIL Label */ { __bad_percpu_size(); } switch_break: /* CIL Label */ ; } ldv_6359: ; return; } } __inline static void __preempt_count_sub(int val ) { int pao_ID__ ; { pao_ID__ = 0; { if (4UL == 1UL) { goto case_1; } else { } if (4UL == 2UL) { goto case_2; } else { } if (4UL == 4UL) { goto case_4; } else { } if (4UL == 8UL) { goto case_8; } else { } goto switch_default; case_1: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" (__preempt_count): "qi" (- val)); } goto ldv_6371; case_2: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6371; case_4: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6371; case_8: /* CIL Label */ ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%P0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%P0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" (__preempt_count): "re" (- val)); } goto ldv_6371; switch_default: /* CIL Label */ { __bad_percpu_size(); } switch_break: /* CIL Label */ ; } ldv_6371: ; return; } } __inline static void __rcu_read_lock(void) { { { __preempt_count_add(1); __asm__ volatile ("": : : "memory"); } return; } } __inline static void __rcu_read_unlock(void) { { { __asm__ volatile ("": : : "memory"); __preempt_count_sub(1); } return; } } extern bool rcu_is_watching(void) ; extern bool rcu_lockdep_current_cpu_online(void) ; __inline static void rcu_lock_acquire(struct lockdep_map *map ) { { { lock_acquire(map, 0U, 0, 2, 1, (struct lockdep_map *)0, (unsigned long )((void *)0)); } return; } } __inline static void rcu_lock_release(struct lockdep_map *map ) { { { lock_release(map, 1, (unsigned long )((void *)0)); } return; } } extern struct lockdep_map rcu_lock_map ; extern int debug_lockdep_rcu_enabled(void) ; __inline static int rcu_read_lock_held(void) { int tmp ; bool tmp___0 ; int tmp___1 ; bool tmp___2 ; int tmp___3 ; int tmp___4 ; { { tmp = debug_lockdep_rcu_enabled(); } if (tmp == 0) { return (1); } else { } { tmp___0 = rcu_is_watching(); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { return (0); } else { } { tmp___2 = rcu_lockdep_current_cpu_online(); } if (tmp___2) { tmp___3 = 0; } else { tmp___3 = 1; } if (tmp___3) { return (0); } else { } { tmp___4 = lock_is_held(& rcu_lock_map); } return (tmp___4); } } __inline static void rcu_read_lock(void) { bool __warned ; int tmp ; bool tmp___0 ; int tmp___1 ; { { __rcu_read_lock(); rcu_lock_acquire(& rcu_lock_map); tmp = debug_lockdep_rcu_enabled(); } if (tmp != 0 && ! __warned) { { tmp___0 = rcu_is_watching(); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { __warned = 1; lockdep_rcu_suspicious("include/linux/rcupdate.h", 812, "rcu_read_lock() used illegally while idle"); } } else { } } else { } return; } } __inline static void rcu_read_unlock(void) { bool __warned ; int tmp ; bool tmp___0 ; int tmp___1 ; { { tmp = debug_lockdep_rcu_enabled(); } if (tmp != 0 && ! __warned) { { tmp___0 = rcu_is_watching(); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { __warned = 1; lockdep_rcu_suspicious("include/linux/rcupdate.h", 833, "rcu_read_unlock() used illegally while idle"); } } else { } } else { } { rcu_lock_release(& rcu_lock_map); __rcu_read_unlock(); } return; } } __inline static void *kzalloc(size_t size , gfp_t flags ) ; extern u8 const *ieee80211_bss_get_ie(struct cfg80211_bss * , u8 ) ; extern int ieee80211_frequency_to_channel(int ) ; int mwifiex_bss_start(struct mwifiex_private *priv , struct cfg80211_bss *bss , struct cfg80211_ssid *req_ssid ) ; int mwifiex_cancel_hs(struct mwifiex_private *priv , int cmd_type ) ; int mwifiex_enable_hs(struct mwifiex_adapter *adapter ) ; int mwifiex_disable_auto_ds(struct mwifiex_private *priv ) ; int mwifiex_drv_get_data_rate(struct mwifiex_private *priv , u32 *rate ) ; int mwifiex_set_encode(struct mwifiex_private *priv , struct key_params *kp , u8 const *key , int key_len , u8 key_index , u8 const *mac_addr , int disable ) ; int mwifiex_set_gen_ie(struct mwifiex_private *priv , u8 *ie , int ie_len ) ; int mwifiex_get_ver_ext(struct mwifiex_private *priv ) ; int mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv , u16 action , struct ieee80211_channel *chan , unsigned int duration ) ; int mwifiex_set_bss_role(struct mwifiex_private *priv , u8 bss_role ) ; int mwifiex_get_stats_info(struct mwifiex_private *priv , struct mwifiex_ds_get_stats *log ) ; int mwifiex_reg_write(struct mwifiex_private *priv , u32 reg_type , u32 reg_offset , u32 reg_value ) ; int mwifiex_reg_read(struct mwifiex_private *priv , u32 reg_type , u32 reg_offset , u32 *value ) ; int mwifiex_eeprom_read(struct mwifiex_private *priv , u16 offset , u16 bytes , u8 *value ) ; int mwifiex_drv_set_power(struct mwifiex_private *priv , u32 *ps_mode ) ; int mwifiex_set_tx_power(struct mwifiex_private *priv , struct mwifiex_power_cfg *power_cfg ) ; int mwifiex_get_bss_info(struct mwifiex_private *priv , struct mwifiex_bss_info *info___0 ) ; u8 mwifiex_chan_type_to_sec_chan_offset(enum nl80211_channel_type chan_type ) ; int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv , struct device_node *node , char const *prefix ) ; void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv ) ; static int disconnect_on_suspend = 1; int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist , struct net_device *dev ) { int i ; struct netdev_hw_addr *ha ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; { i = 0; __mptr = (struct list_head const *)dev->mc.list.next; ha = (struct netdev_hw_addr *)__mptr; goto ldv_54562; ldv_54561: { tmp = i; i = i + 1; memcpy((void *)(& mlist->mac_list) + (unsigned long )tmp, (void const *)(& ha->addr), 6UL); __mptr___0 = (struct list_head const *)ha->list.next; ha = (struct netdev_hw_addr *)__mptr___0; } ldv_54562: ; if ((unsigned long )(& ha->list) != (unsigned long )(& dev->mc.list)) { goto ldv_54561; } else { } return (i); } } int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter , struct cmd_ctrl_node *cmd_queued ) { int status ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp ; { __ret = 0; if ((unsigned int )*(cmd_queued->condition) == 0U) { { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; } ldv_54575: { tmp = prepare_to_wait_event(& adapter->cmd_wait_q.wait, & __wait, 1); __int = tmp; } if ((unsigned int )*(cmd_queued->condition) != 0U) { goto ldv_54574; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_54574; } else { } { schedule(); } goto ldv_54575; ldv_54574: { finish_wait(& adapter->cmd_wait_q.wait, & __wait); } __ret = (int )__ret___0; } else { } status = __ret; if (status != 0) { { dev_err((struct device const *)adapter->dev, "cmd_wait_q terminated: %d\n", status); } return (status); } else { } status = adapter->cmd_wait_q.status; adapter->cmd_wait_q.status = 0; return (status); } } int mwifiex_request_set_multicast_list(struct mwifiex_private *priv , struct mwifiex_multicast_list *mcast_list ) { int ret ; u16 old_pkt_filter ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; { ret = 0; old_pkt_filter = priv->curr_pkt_filter; if (mcast_list->mode == 1U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_request_set_multicast_list"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: Enable Promiscuous mode\n"; descriptor.lineno = 92U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: Enable Promiscuous mode\n"); } } else { } priv->curr_pkt_filter = (u16 )((unsigned int )priv->curr_pkt_filter | 128U); priv->curr_pkt_filter = (unsigned int )priv->curr_pkt_filter & 65279U; } else { priv->curr_pkt_filter = (unsigned int )priv->curr_pkt_filter & 65407U; if (mcast_list->mode == 4U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_request_set_multicast_list"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___0.format = "info: Enabling All Multicast!\n"; descriptor___0.lineno = 101U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: Enabling All Multicast!\n"); } } else { } priv->curr_pkt_filter = (u16 )((unsigned int )priv->curr_pkt_filter | 256U); } else { { priv->curr_pkt_filter = (unsigned int )priv->curr_pkt_filter & 65279U; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_request_set_multicast_list"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___1.format = "info: Set multicast list=%d\n"; descriptor___1.lineno = 109U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: Set multicast list=%d\n", mcast_list->num_multicast_addr); } } else { } { ret = mwifiex_send_cmd_async(priv, 16, 1, 0U, (void *)mcast_list); } } } { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_request_set_multicast_list"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___2.format = "info: old_pkt_filter=%#x, curr_pkt_filter=%#x\n"; descriptor___2.lineno = 119U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: old_pkt_filter=%#x, curr_pkt_filter=%#x\n", (int )old_pkt_filter, (int )priv->curr_pkt_filter); } } else { } if ((int )old_pkt_filter != (int )priv->curr_pkt_filter) { { ret = mwifiex_send_cmd_async(priv, 40, 1, 0U, (void *)(& priv->curr_pkt_filter)); } } else { } return (ret); } } int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv , struct cfg80211_bss *bss , struct mwifiex_bssdescriptor *bss_desc ) { u8 *beacon_ie ; size_t beacon_ie_len ; struct mwifiex_bss_priv *bss_priv ; struct cfg80211_bss_ies const *ies ; struct cfg80211_bss_ies const *_________p1 ; bool __warned ; int tmp ; int tmp___0 ; void *tmp___1 ; struct _ddebug descriptor ; long tmp___2 ; int tmp___3 ; { { bss_priv = (struct mwifiex_bss_priv *)(& bss->priv); rcu_read_lock(); _________p1 = *((struct cfg80211_bss_ies const * volatile *)(& bss->ies)); tmp = debug_lockdep_rcu_enabled(); } if (tmp != 0 && ! __warned) { { tmp___0 = rcu_read_lock_held(); } if (tmp___0 == 0) { { __warned = 1; lockdep_rcu_suspicious("drivers/net/wireless/mwifiex/sta_ioctl.c", 145, "suspicious rcu_dereference_check() usage"); } } else { } } else { } { ies = _________p1; tmp___1 = kmemdup((void const *)(& ies->data), (size_t )ies->len, 32U); beacon_ie = (u8 *)tmp___1; beacon_ie_len = (size_t )ies->len; bss_desc->timestamp = ies->tsf; rcu_read_unlock(); } if ((unsigned long )beacon_ie == (unsigned long )((u8 *)0U)) { { dev_err((struct device const *)(priv->adapter)->dev, " failed to alloc beacon_ie\n"); } return (-12); } else { } { memcpy((void *)(& bss_desc->mac_address), (void const *)(& bss->bssid), 6UL); bss_desc->rssi = bss->signal; bss_desc->beacon_buf = beacon_ie; bss_desc->beacon_buf_size = (u32 )beacon_ie_len; bss_desc->beacon_period = bss->beacon_interval; bss_desc->cap_info_bitmap = bss->capability; bss_desc->bss_band = (u16 )bss_priv->band; bss_desc->fw_tsf = bss_priv->fw_tsf; } if (((int )bss_desc->cap_info_bitmap & 16) != 0) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_fill_new_bss_desc"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: InterpretIE: AP WEP enabled\n"; descriptor.lineno = 166U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: InterpretIE: AP WEP enabled\n"); } } else { } bss_desc->privacy = 1U; } else { bss_desc->privacy = 0U; } if (((int )bss_desc->cap_info_bitmap & 2) != 0) { bss_desc->bss_mode = 1U; } else { bss_desc->bss_mode = 2U; } bss_desc->disable_11ac = 1U; if (((int )bss_desc->cap_info_bitmap & 256) != 0) { bss_desc->sensed_11h = 1U; } else { } { tmp___3 = mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc); } return (tmp___3); } } void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv ) { char txpwr[22U] ; { if ((unsigned long )(priv->adapter)->dt_node != (unsigned long )((struct device_node *)0)) { { txpwr[0] = 'm'; txpwr[1] = 'a'; txpwr[2] = 'r'; txpwr[3] = 'v'; txpwr[4] = 'e'; txpwr[5] = 'l'; txpwr[6] = 'l'; txpwr[7] = ','; txpwr[8] = '0'; txpwr[9] = '0'; txpwr[10] = '_'; txpwr[11] = 't'; txpwr[12] = 'x'; txpwr[13] = 'p'; txpwr[14] = 'w'; txpwr[15] = 'r'; txpwr[16] = 'l'; txpwr[17] = 'i'; txpwr[18] = 'm'; txpwr[19] = 'i'; txpwr[20] = 't'; txpwr[21] = '\000'; memcpy((void *)(& txpwr) + 8U, (void const *)(& (priv->adapter)->country_code), 2UL); mwifiex_dnld_dt_cfgdata(priv, (priv->adapter)->dt_node, (char const *)(& txpwr)); } } else { } return; } } static int mwifiex_process_country_ie(struct mwifiex_private *priv , struct cfg80211_bss *bss ) { u8 const *country_ie ; u8 country_ie_len ; struct mwifiex_802_11d_domain_reg *domain_info ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; int tmp___1 ; { { domain_info = & (priv->adapter)->domain_reg; rcu_read_lock(); country_ie = ieee80211_bss_get_ie(bss, 7); } if ((unsigned long )country_ie == (unsigned long )((u8 const *)0U)) { { rcu_read_unlock(); } return (0); } else { } country_ie_len = *(country_ie + 1UL); if ((unsigned int )country_ie_len <= 5U) { { rcu_read_unlock(); } return (0); } else { } { tmp___0 = strncmp((char const *)(& (priv->adapter)->country_code), (char const *)country_ie + 2U, 2UL); } if (tmp___0 == 0) { { rcu_read_unlock(); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_country_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "11D: skip setting domain info in FW\n"; descriptor.lineno = 221U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& ((priv->wdev)->wiphy)->dev), "11D: skip setting domain info in FW\n"); } } else { } return (0); } else { } { memcpy((void *)(& (priv->adapter)->country_code), (void const *)country_ie + 2U, 2UL); domain_info->country_code[0] = *(country_ie + 2UL); domain_info->country_code[1] = *(country_ie + 3UL); domain_info->country_code[2] = 32U; country_ie_len = (unsigned int )country_ie_len + 253U; domain_info->no_of_triplet = (u8 )((unsigned int )country_ie_len / 3U); memcpy((void *)(& domain_info->triplet), (void const *)country_ie + 5U, (size_t )country_ie_len); rcu_read_unlock(); tmp___1 = mwifiex_send_cmd_async(priv, 91, 1, 0U, (void *)0); } if (tmp___1 != 0) { { dev_err((struct device const *)(& ((priv->adapter)->wiphy)->dev), "11D: setting domain info in FW\n"); } return (-1); } else { } { mwifiex_dnld_txpwr_table(priv); } return (0); } } int mwifiex_bss_start(struct mwifiex_private *priv , struct cfg80211_bss *bss , struct cfg80211_ssid *req_ssid ) { int ret ; struct mwifiex_adapter *adapter ; struct mwifiex_bssdescriptor *bss_desc ; void *tmp ; u8 config_bands ; u8 tmp___0 ; u8 tmp___1 ; struct _ddebug descriptor ; long tmp___2 ; bool tmp___3 ; s32 tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; bool tmp___6 ; struct _ddebug descriptor___1 ; long tmp___7 ; struct _ddebug descriptor___2 ; long tmp___8 ; { adapter = priv->adapter; bss_desc = (struct mwifiex_bssdescriptor *)0; priv->scan_block = 0U; if ((unsigned long )bss != (unsigned long )((struct cfg80211_bss *)0)) { { mwifiex_process_country_ie(priv, bss); tmp = kzalloc(336UL, 208U); bss_desc = (struct mwifiex_bssdescriptor *)tmp; } if ((unsigned long )bss_desc == (unsigned long )((struct mwifiex_bssdescriptor *)0)) { return (-12); } else { } { ret = mwifiex_fill_new_bss_desc(priv, bss, bss_desc); } if (ret != 0) { goto done; } else { } } else { } if (priv->bss_mode == 2U || priv->bss_mode == 8U) { { ret = mwifiex_deauthenticate(priv, (u8 *)0U); } if (ret != 0) { goto done; } else { } if ((unsigned long )bss_desc == (unsigned long )((struct mwifiex_bssdescriptor *)0)) { return (-1); } else { } { tmp___0 = mwifiex_band_to_radio_type((int )((u8 )bss_desc->bss_band)); } if ((unsigned int )tmp___0 == 0U) { config_bands = 43U; } else { config_bands = 84U; } if ((((int )config_bands | (int )adapter->fw_bands) & ~ ((int )adapter->fw_bands)) == 0) { adapter->config_bands = config_bands; } else { } { ret = mwifiex_check_network_compatibility(priv, bss_desc); } if (ret != 0) { goto done; } else { } { tmp___1 = mwifiex_11h_get_csa_closed_channel(priv); } if ((int )tmp___1 == (int )((unsigned char )bss_desc->channel)) { { dev_err((struct device const *)adapter->dev, "Attempt to reconnect on csa closed chan(%d)\n", bss_desc->channel); } goto done; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_bss_start"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: SSID found in scan list ... associating...\n"; descriptor.lineno = 313U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: SSID found in scan list ... associating...\n"); } } else { } { mwifiex_stop_net_dev_queue(priv->netdev, adapter); tmp___3 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___3) { { netif_carrier_off(priv->netdev); } } else { } { priv->assoc_rsp_size = 0U; ret = mwifiex_associate(priv, bss_desc); } if ((ret == 13 && (unsigned int )priv->sec_info.is_authtype_auto != 0U) && (unsigned int )priv->sec_info.wep_enabled != 0U) { { priv->sec_info.authentication_mode = 1U; ret = mwifiex_associate(priv, bss_desc); } } else { } if ((unsigned long )bss != (unsigned long )((struct cfg80211_bss *)0)) { { cfg80211_put_bss((priv->adapter)->wiphy, bss); } } else { } } else { if ((unsigned long )bss_desc != (unsigned long )((struct mwifiex_bssdescriptor *)0) && (unsigned int )bss_desc->ssid.ssid_len != 0U) { { tmp___4 = mwifiex_ssid_cmp(& priv->curr_bss_params.bss_descriptor.ssid, & bss_desc->ssid); } if (tmp___4 == 0) { ret = 0; goto done; } else { } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_bss_start"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___0.format = "info: Sending Adhoc Stop\n"; descriptor___0.lineno = 347U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: Sending Adhoc Stop\n"); } } else { } { ret = mwifiex_deauthenticate(priv, (u8 *)0U); } if (ret != 0) { goto done; } else { } { priv->adhoc_is_link_sensed = 0U; ret = mwifiex_check_network_compatibility(priv, bss_desc); mwifiex_stop_net_dev_queue(priv->netdev, adapter); tmp___6 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___6) { { netif_carrier_off(priv->netdev); } } else { } if (ret == 0) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_bss_start"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___1.format = "info: network found in scan list. Joining...\n"; descriptor___1.lineno = 362U; descriptor___1.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___7 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: network found in scan list. Joining...\n"); } } else { } { ret = mwifiex_adhoc_join(priv, bss_desc); } if ((unsigned long )bss != (unsigned long )((struct cfg80211_bss *)0)) { { cfg80211_put_bss((priv->adapter)->wiphy, bss); } } else { } } else { { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_bss_start"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___2.format = "info: Network not found in the list, creating adhoc with ssid = %s\n"; descriptor___2.lineno = 369U; descriptor___2.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___8 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: Network not found in the list, creating adhoc with ssid = %s\n", (u8 *)(& req_ssid->ssid)); } } else { } { ret = mwifiex_adhoc_start(priv, req_ssid); } } } done: ; if ((unsigned long )bss_desc != (unsigned long )((struct mwifiex_bssdescriptor *)0)) { { kfree((void const *)bss_desc->beacon_buf); } } else { } { kfree((void const *)bss_desc); } return (ret); } } static int mwifiex_set_hs_params(struct mwifiex_private *priv , u16 action , int cmd_type , struct mwifiex_ds_hs_cfg *hs_cfg ) { struct mwifiex_adapter *adapter ; int status ; u32 prev_cond ; struct _ddebug descriptor ; long tmp ; { adapter = priv->adapter; status = 0; prev_cond = 0U; if ((unsigned long )hs_cfg == (unsigned long )((struct mwifiex_ds_hs_cfg *)0)) { return (-12); } else { } { if ((int )action == 1) { goto case_1; } else { } if ((int )action == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ ; if ((unsigned int )adapter->pps_uapsd_mode != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_hs_params"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: Host Sleep IOCTL is blocked in UAPSD/PPS mode\n"; descriptor.lineno = 405U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: Host Sleep IOCTL is blocked in UAPSD/PPS mode\n"); } } else { } status = -1; goto ldv_54643; } else { } if (hs_cfg->is_invoke_hostcmd != 0U) { if (hs_cfg->conditions == 4294967295U) { if ((unsigned int )adapter->is_hs_configured == 0U) { goto ldv_54643; } else { } prev_cond = adapter->hs_cfg.conditions; adapter->hs_cfg.conditions = hs_cfg->conditions; } else if (hs_cfg->conditions != 0U) { adapter->hs_cfg.conditions = hs_cfg->conditions; adapter->hs_cfg.gpio = (unsigned char )hs_cfg->gpio; if (hs_cfg->gap != 0U) { adapter->hs_cfg.gap = (unsigned char )hs_cfg->gap; } else { } } else if (adapter->hs_cfg.conditions == 4294967295U) { status = -1; goto ldv_54643; } else { } if (cmd_type == 1) { { status = mwifiex_send_cmd_sync(priv, 229, 1, 0U, (void *)(& adapter->hs_cfg)); } } else { { status = mwifiex_send_cmd_async(priv, 229, 1, 0U, (void *)(& adapter->hs_cfg)); } } if (hs_cfg->conditions == 4294967295U) { adapter->hs_cfg.conditions = prev_cond; } else { } } else { adapter->hs_cfg.conditions = hs_cfg->conditions; adapter->hs_cfg.gpio = (unsigned char )hs_cfg->gpio; adapter->hs_cfg.gap = (unsigned char )hs_cfg->gap; } goto ldv_54643; case_0: /* CIL Label */ hs_cfg->conditions = adapter->hs_cfg.conditions; hs_cfg->gpio = (u32 )adapter->hs_cfg.gpio; hs_cfg->gap = (u32 )adapter->hs_cfg.gap; goto ldv_54643; switch_default: /* CIL Label */ status = -1; goto ldv_54643; switch_break: /* CIL Label */ ; } ldv_54643: ; return (status); } } int mwifiex_cancel_hs(struct mwifiex_private *priv , int cmd_type ) { struct mwifiex_ds_hs_cfg hscfg ; int tmp ; { { hscfg.conditions = 4294967295U; hscfg.is_invoke_hostcmd = 1U; tmp = mwifiex_set_hs_params(priv, 1, cmd_type, & hscfg); } return (tmp); } } static char const __kstrtab_mwifiex_cancel_hs[18U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'c', 'a', 'n', 'c', 'e', 'l', '_', 'h', 's', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_cancel_hs ; struct kernel_symbol const __ksymtab_mwifiex_cancel_hs = {(unsigned long )(& mwifiex_cancel_hs), (char const *)(& __kstrtab_mwifiex_cancel_hs)}; int mwifiex_enable_hs(struct mwifiex_adapter *adapter ) { struct mwifiex_ds_hs_cfg hscfg ; struct mwifiex_private *priv ; int i ; struct _ddebug descriptor ; long tmp ; struct mwifiex_private *tmp___0 ; int tmp___1 ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp___2 ; { if (disconnect_on_suspend != 0) { i = 0; goto ldv_54666; ldv_54665: priv = adapter->priv[i]; if ((unsigned long )priv != (unsigned long )((struct mwifiex_private *)0)) { { mwifiex_deauthenticate(priv, (u8 *)0U); } } else { } i = i + 1; ldv_54666: ; if (i < (int )adapter->priv_num) { goto ldv_54665; } else { } } else { } if ((unsigned int )adapter->hs_activated != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_enable_hs"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "cmd: HS Already activated\n"; descriptor.lineno = 505U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: HS Already activated\n"); } } else { } return (1); } else { } { adapter->hs_activate_wait_q_woken = 0U; memset((void *)(& hscfg), 0, 16UL); hscfg.is_invoke_hostcmd = 1U; tmp___0 = mwifiex_get_priv___1(adapter, 0); tmp___1 = mwifiex_set_hs_params(tmp___0, 1, 1, & hscfg); } if (tmp___1 != 0) { { dev_err((struct device const *)adapter->dev, "IOCTL request HS enable failed\n"); } return (0); } else { } __ret = 0; if ((unsigned int )adapter->hs_activate_wait_q_woken == 0U) { { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; } ldv_54676: { tmp___2 = prepare_to_wait_event(& adapter->hs_activate_wait_q, & __wait, 1); __int = tmp___2; } if ((unsigned int )adapter->hs_activate_wait_q_woken != 0U) { goto ldv_54675; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_54675; } else { } { schedule(); } goto ldv_54676; ldv_54675: { finish_wait(& adapter->hs_activate_wait_q, & __wait); } __ret = (int )__ret___0; } else { } if (__ret != 0) { { dev_err((struct device const *)adapter->dev, "hs_activate_wait_q terminated\n"); } return (0); } else { } return (1); } } static char const __kstrtab_mwifiex_enable_hs[18U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'e', 'n', 'a', 'b', 'l', 'e', '_', 'h', 's', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_enable_hs ; struct kernel_symbol const __ksymtab_mwifiex_enable_hs = {(unsigned long )(& mwifiex_enable_hs), (char const *)(& __kstrtab_mwifiex_enable_hs)}; int mwifiex_get_bss_info(struct mwifiex_private *priv , struct mwifiex_bss_info *info___0 ) { struct mwifiex_adapter *adapter ; struct mwifiex_bssdescriptor *bss_desc ; { adapter = priv->adapter; if ((unsigned long )info___0 == (unsigned long )((struct mwifiex_bss_info *)0)) { return (-1); } else { } { bss_desc = & priv->curr_bss_params.bss_descriptor; info___0->bss_mode = priv->bss_mode; memcpy((void *)(& info___0->ssid), (void const *)(& bss_desc->ssid), 33UL); memcpy((void *)(& info___0->bssid), (void const *)(& bss_desc->mac_address), 6UL); info___0->bss_chan = bss_desc->channel; memcpy((void *)(& info___0->country_code), (void const *)(& adapter->country_code), 3UL); info___0->media_connected = (u32 )priv->media_connected; info___0->max_power_level = (u32 )priv->max_tx_power_level; info___0->min_power_level = (u32 )priv->min_tx_power_level; info___0->adhoc_state = (u32 )priv->adhoc_state; info___0->bcn_nf_last = (int )priv->bcn_nf_last; } if ((unsigned int )priv->sec_info.wep_enabled != 0U) { info___0->wep_status = 1U; } else { info___0->wep_status = 0U; } info___0->is_hs_configured = (u32 )adapter->is_hs_configured; info___0->is_deep_sleep = (u32 )adapter->is_deep_sleep; return (0); } } int mwifiex_disable_auto_ds(struct mwifiex_private *priv ) { struct mwifiex_ds_auto_ds auto_ds ; int tmp ; { { auto_ds.auto_ds = 0U; tmp = mwifiex_send_cmd_sync(priv, 228, 254, 1U, (void *)(& auto_ds)); } return (tmp); } } static char const __kstrtab_mwifiex_disable_auto_ds[24U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'd', 'i', 's', 'a', 'b', 'l', 'e', '_', 'a', 'u', 't', 'o', '_', 'd', 's', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_disable_auto_ds ; struct kernel_symbol const __ksymtab_mwifiex_disable_auto_ds = {(unsigned long )(& mwifiex_disable_auto_ds), (char const *)(& __kstrtab_mwifiex_disable_auto_ds)}; int mwifiex_drv_get_data_rate(struct mwifiex_private *priv , u32 *rate ) { int ret ; { { ret = mwifiex_send_cmd_sync(priv, 127, 0, 0U, (void *)0); } if (ret == 0) { if ((unsigned int )priv->is_data_rate_auto != 0U) { { *rate = mwifiex_index_to_data_rate(priv, (int )priv->tx_rate, (int )priv->tx_htinfo); } } else { *rate = priv->data_rate; } } else { } return (ret); } } int mwifiex_set_tx_power(struct mwifiex_private *priv , struct mwifiex_power_cfg *power_cfg ) { int ret ; struct host_cmd_ds_txpwr_cfg *txp_cfg ; struct mwifiex_types_power_group *pg_tlv ; struct mwifiex_power_group *pg ; u8 *buf ; u16 dbm ; void *tmp ; { dbm = 0U; if (power_cfg->is_power_auto == 0U) { dbm = (unsigned short )power_cfg->power_level; if ((int )dbm < (int )((unsigned short )priv->min_tx_power_level) || (int )dbm > (int )((unsigned short )priv->max_tx_power_level)) { { dev_err((struct device const *)(priv->adapter)->dev, "txpower value %d dBm is out of range (%d dBm-%d dBm)\n", (int )dbm, (int )priv->min_tx_power_level, (int )priv->max_tx_power_level); } return (-1); } else { } } else { } { tmp = kzalloc(2048UL, 208U); buf = (u8 *)tmp; } if ((unsigned long )buf == (unsigned long )((u8 *)0U)) { return (-12); } else { } txp_cfg = (struct host_cmd_ds_txpwr_cfg *)buf; txp_cfg->action = 1U; if (power_cfg->is_power_auto == 0U) { txp_cfg->mode = 1U; pg_tlv = (struct mwifiex_types_power_group *)buf + 8U; pg_tlv->type = 340U; pg_tlv->length = 32U; pg = (struct mwifiex_power_group *)buf + 12U; pg->first_rate_code = 0U; pg->last_rate_code = 3U; pg->modulation_class = 3U; pg->power_step = 0; pg->power_min = (signed char )dbm; pg->power_max = (signed char )dbm; pg = pg + 1; pg->first_rate_code = 0U; pg->last_rate_code = 7U; pg->modulation_class = 7U; pg->power_step = 0; pg->power_min = (signed char )dbm; pg->power_max = (signed char )dbm; pg = pg + 1; pg->first_rate_code = 0U; pg->last_rate_code = 32U; pg->modulation_class = 8U; pg->power_step = 0; pg->power_min = (signed char )dbm; pg->power_max = (signed char )dbm; pg->ht_bandwidth = 0U; pg = pg + 1; pg->first_rate_code = 0U; pg->last_rate_code = 32U; pg->modulation_class = 8U; pg->power_step = 0; pg->power_min = (signed char )dbm; pg->power_max = (signed char )dbm; pg->ht_bandwidth = 1U; } else { } { ret = mwifiex_send_cmd_sync(priv, 209, 1, 0U, (void *)buf); kfree((void const *)buf); } return (ret); } } int mwifiex_drv_set_power(struct mwifiex_private *priv , u32 *ps_mode ) { int ret ; struct mwifiex_adapter *adapter ; u16 sub_cmd ; { adapter = priv->adapter; if (*ps_mode != 0U) { adapter->ps_mode = 1U; } else { adapter->ps_mode = 0U; } { sub_cmd = *ps_mode != 0U ? 255U : 254U; ret = mwifiex_send_cmd_sync(priv, 228, (int )sub_cmd, 16U, (void *)0); } if (ret == 0 && (unsigned int )sub_cmd == 254U) { { ret = mwifiex_send_cmd_async(priv, 228, 0, 0U, (void *)0); } } else { } return (ret); } } static int mwifiex_set_wpa_ie_helper(struct mwifiex_private *priv , u8 *ie_data_ptr , u16 ie_len ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { if ((unsigned int )ie_len != 0U) { if ((unsigned int )ie_len > 256U) { { dev_err((struct device const *)(priv->adapter)->dev, "failed to copy WPA IE, too big\n"); } return (-1); } else { } { memcpy((void *)(& priv->wpa_ie), (void const *)ie_data_ptr, (size_t )ie_len); priv->wpa_ie_len = (unsigned char )ie_len; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_wpa_ie_helper"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "cmd: Set Wpa_ie_len=%d IE=%#x\n"; descriptor.lineno = 754U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: Set Wpa_ie_len=%d IE=%#x\n", (int )priv->wpa_ie_len, (int )priv->wpa_ie[0]); } } else { } if ((unsigned int )priv->wpa_ie[0] == 221U) { priv->sec_info.wpa_enabled = 1U; } else if ((unsigned int )priv->wpa_ie[0] == 48U) { priv->sec_info.wpa2_enabled = 1U; } else { priv->sec_info.wpa_enabled = 0U; priv->sec_info.wpa2_enabled = 0U; } } else { { memset((void *)(& priv->wpa_ie), 0, 256UL); priv->wpa_ie_len = 0U; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_set_wpa_ie_helper"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___0.format = "info: reset wpa_ie_len=%d IE=%#x\n"; descriptor___0.lineno = 768U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: reset wpa_ie_len=%d IE=%#x\n", (int )priv->wpa_ie_len, (int )priv->wpa_ie[0]); } } else { } priv->sec_info.wpa_enabled = 0U; priv->sec_info.wpa2_enabled = 0U; } return (0); } } static int mwifiex_set_wapi_ie(struct mwifiex_private *priv , u8 *ie_data_ptr , u16 ie_len ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { if ((unsigned int )ie_len != 0U) { if ((unsigned int )ie_len > 256U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_wapi_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: failed to copy WAPI IE, too big\n"; descriptor.lineno = 789U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: failed to copy WAPI IE, too big\n"); } } else { } return (-1); } else { } { memcpy((void *)(& priv->wapi_ie), (void const *)ie_data_ptr, (size_t )ie_len); priv->wapi_ie_len = (u8 )ie_len; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_set_wapi_ie"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___0.format = "cmd: Set wapi_ie_len=%d IE=%#x\n"; descriptor___0.lineno = 795U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: Set wapi_ie_len=%d IE=%#x\n", (int )priv->wapi_ie_len, (int )priv->wapi_ie[0]); } } else { } if ((unsigned int )priv->wapi_ie[0] == 68U) { priv->sec_info.wapi_enabled = 1U; } else { } } else { { memset((void *)(& priv->wapi_ie), 0, 256UL); priv->wapi_ie_len = (u8 )ie_len; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_set_wapi_ie"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___1.format = "info: Reset wapi_ie_len=%d IE=%#x\n"; descriptor___1.lineno = 804U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: Reset wapi_ie_len=%d IE=%#x\n", (int )priv->wapi_ie_len, (int )priv->wapi_ie[0]); } } else { } priv->sec_info.wapi_enabled = 0U; } return (0); } } static int mwifiex_set_wps_ie(struct mwifiex_private *priv , u8 *ie_data_ptr , u16 ie_len ) { struct _ddebug descriptor ; long tmp ; void *tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; { if ((unsigned int )ie_len != 0U) { if ((unsigned int )ie_len > 256U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_wps_ie"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: failed to copy WPS IE, too big\n"; descriptor.lineno = 823U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: failed to copy WPS IE, too big\n"); } } else { } return (-1); } else { } { tmp___0 = kzalloc(256UL, 208U); priv->wps_ie = (u8 *)tmp___0; } if ((unsigned long )priv->wps_ie == (unsigned long )((u8 *)0U)) { return (-12); } else { } { memcpy((void *)priv->wps_ie, (void const *)ie_data_ptr, (size_t )ie_len); priv->wps_ie_len = (u8 )ie_len; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_set_wps_ie"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___0.format = "cmd: Set wps_ie_len=%d IE=%#x\n"; descriptor___0.lineno = 834U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: Set wps_ie_len=%d IE=%#x\n", (int )priv->wps_ie_len, (int )*(priv->wps_ie)); } } else { } } else { { kfree((void const *)priv->wps_ie); priv->wps_ie_len = (u8 )ie_len; descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_set_wps_ie"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor___1.format = "info: Reset wps_ie_len=%d\n"; descriptor___1.lineno = 839U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: Reset wps_ie_len=%d\n", (int )priv->wps_ie_len); } } else { } } return (0); } } static int mwifiex_sec_ioctl_set_wapi_key(struct mwifiex_private *priv , struct mwifiex_ds_encrypt_key *encrypt_key ) { int tmp ; { { tmp = mwifiex_send_cmd_sync(priv, 94, 1, 1U, (void *)encrypt_key); } return (tmp); } } static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv , struct mwifiex_ds_encrypt_key *encrypt_key ) { int ret ; struct mwifiex_wep_key *wep_key ; int index ; { if ((unsigned int )priv->wep_key_curr_index > 3U) { priv->wep_key_curr_index = 0U; } else { } wep_key = (struct mwifiex_wep_key *)(& priv->wep_key) + (unsigned long )priv->wep_key_curr_index; index = (int )encrypt_key->key_index; if (encrypt_key->key_disable != 0U) { priv->sec_info.wep_enabled = 0U; } else if (encrypt_key->key_len == 0U) { wep_key = (struct mwifiex_wep_key *)(& priv->wep_key) + (unsigned long )index; if (wep_key->key_length == 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "key not set, so cannot enable it\n"); } return (-1); } else { } priv->wep_key_curr_index = (unsigned short )index; priv->sec_info.wep_enabled = 1U; } else { { wep_key = (struct mwifiex_wep_key *)(& priv->wep_key) + (unsigned long )index; memset((void *)wep_key, 0, 28UL); memcpy((void *)(& wep_key->key_material), (void const *)(& encrypt_key->key_material), (size_t )encrypt_key->key_len); wep_key->key_index = (u32 )index; wep_key->key_length = encrypt_key->key_len; priv->sec_info.wep_enabled = 1U; } } if (wep_key->key_length != 0U) { { ret = mwifiex_send_cmd_async(priv, 94, 1, 0U, (void *)0); } if (ret != 0) { return (ret); } else { } } else { } if ((unsigned int )priv->sec_info.wep_enabled != 0U) { priv->curr_pkt_filter = (u16 )((unsigned int )priv->curr_pkt_filter | 8U); } else { priv->curr_pkt_filter = (unsigned int )priv->curr_pkt_filter & 65527U; } { ret = mwifiex_send_cmd_sync(priv, 40, 1, 0U, (void *)(& priv->curr_pkt_filter)); } return (ret); } } static int mwifiex_sec_ioctl_set_wpa_key(struct mwifiex_private *priv , struct mwifiex_ds_encrypt_key *encrypt_key ) { int ret ; u8 remove_key ; struct host_cmd_ds_802_11_key_material *ibss_key ; { remove_key = 0U; if (encrypt_key->key_len > 32U) { { dev_err((struct device const *)(priv->adapter)->dev, "key length too long\n"); } return (-1); } else { } if (priv->bss_mode == 1U) { { encrypt_key->key_index = 1073741824U; ret = mwifiex_send_cmd_async(priv, 94, 1, 1U, (void *)encrypt_key); } if (ret != 0) { return (ret); } else { } { ibss_key = & priv->aes_key; memset((void *)ibss_key, 0, 62UL); memcpy((void *)(& ibss_key->key_param_set.key), (void const *)(& encrypt_key->key_material), (size_t )encrypt_key->key_len); memcpy((void *)(& ibss_key->key_param_set.key_len), (void const *)(& encrypt_key->key_len), 2UL); ibss_key->key_param_set.key_type_id = 1U; ibss_key->key_param_set.key_info = 4U; encrypt_key->key_index = 3221225471U; } } else { } if (encrypt_key->key_index == 0U) { encrypt_key->key_index = 1073741824U; } else { } if ((unsigned int )remove_key != 0U) { { ret = mwifiex_send_cmd_sync(priv, 94, 1, 0U, (void *)encrypt_key); } } else { { ret = mwifiex_send_cmd_sync(priv, 94, 1, 1U, (void *)encrypt_key); } } return (ret); } } static int mwifiex_sec_ioctl_encrypt_key(struct mwifiex_private *priv , struct mwifiex_ds_encrypt_key *encrypt_key ) { int status ; { if (encrypt_key->is_wapi_key != 0U) { { status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key); } } else if (encrypt_key->key_len > 13U) { { status = mwifiex_sec_ioctl_set_wpa_key(priv, encrypt_key); } } else { { status = mwifiex_sec_ioctl_set_wep_key(priv, encrypt_key); } } return (status); } } int mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter , char *version , int max_len ) { union __anonunion_ver_321 ver ; char fw_ver[32U] ; struct _ddebug descriptor ; long tmp ; { { ver.l = adapter->fw_release_number; sprintf((char *)(& fw_ver), "%u.%u.%u.p%u", (int )ver.c[2], (int )ver.c[1], (int )ver.c[0], (int )ver.c[3]); snprintf(version, (size_t )max_len, (char const *)(& driver_version), (char *)(& fw_ver)); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_drv_get_driver_version"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: MWIFIEX VERSION: %s\n"; descriptor.lineno = 1028U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: MWIFIEX VERSION: %s\n", version); } } else { } return (0); } } int mwifiex_set_encode(struct mwifiex_private *priv , struct key_params *kp , u8 const *key , int key_len , u8 key_index , u8 const *mac_addr , int disable ) { struct mwifiex_ds_encrypt_key encrypt_key ; int tmp ; { { memset((void *)(& encrypt_key), 0, 76UL); encrypt_key.key_len = (u32 )key_len; } if ((unsigned long )kp != (unsigned long )((struct key_params *)0) && kp->cipher == 1027078U) { encrypt_key.is_igtk_key = 1U; } else { } if (disable == 0) { encrypt_key.key_index = (u32 )key_index; if (key_len != 0) { { memcpy((void *)(& encrypt_key.key_material), (void const *)key, (size_t )key_len); } } else { } if ((unsigned long )mac_addr != (unsigned long )((u8 const *)0U)) { { memcpy((void *)(& encrypt_key.mac_addr), (void const *)mac_addr, 6UL); } } else { } if (((unsigned long )kp != (unsigned long )((struct key_params *)0) && (unsigned long )kp->seq != (unsigned long )((u8 *)0U)) && kp->seq_len != 0) { { memcpy((void *)(& encrypt_key.pn), (void const *)kp->seq, (size_t )kp->seq_len); } } else { } } else { encrypt_key.key_disable = 1U; if ((unsigned long )mac_addr != (unsigned long )((u8 const *)0U)) { { memcpy((void *)(& encrypt_key.mac_addr), (void const *)mac_addr, 6UL); } } else { } } { tmp = mwifiex_sec_ioctl_encrypt_key(priv, & encrypt_key); } return (tmp); } } int mwifiex_get_ver_ext(struct mwifiex_private *priv ) { struct mwifiex_ver_ext ver_ext ; int tmp ; { { memset((void *)(& ver_ext), 0, 129UL); tmp = mwifiex_send_cmd_sync(priv, 151, 0, 0U, (void *)(& ver_ext)); } if (tmp != 0) { return (-1); } else { } return (0); } } int mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv , u16 action , struct ieee80211_channel *chan , unsigned int duration ) { struct host_cmd_ds_remain_on_chan roc_cfg ; u8 sc ; int tmp ; int tmp___0 ; { { memset((void *)(& roc_cfg), 0, 10UL); roc_cfg.action = action; } if ((unsigned int )action == 1U) { { roc_cfg.band_cfg = (u8 )chan->band; sc = mwifiex_chan_type_to_sec_chan_offset(0); roc_cfg.band_cfg = (u8 )((int )((signed char )roc_cfg.band_cfg) | (int )((signed char )((int )sc << 2))); tmp = ieee80211_frequency_to_channel((int )chan->center_freq); roc_cfg.channel = (u8 )tmp; roc_cfg.duration = duration; } } else { } { tmp___0 = mwifiex_send_cmd_sync(priv, 269, (int )action, 0U, (void *)(& roc_cfg)); } if (tmp___0 != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "failed to remain on channel\n"); } return (-1); } else { } return ((int )roc_cfg.status); } } int mwifiex_set_bss_role(struct mwifiex_private *priv , u8 bss_role ) { struct _ddebug descriptor ; long tmp ; int tmp___0 ; { if (((unsigned long )priv->bss_role & 1UL) == (unsigned long )bss_role) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_bss_role"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: already in the desired role.\n"; descriptor.lineno = 1120U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: already in the desired role.\n"); } } else { } return (0); } else { } { mwifiex_free_priv(priv); mwifiex_init_priv(priv); priv->bss_role = bss_role; } { if ((int )bss_role == 1) { goto case_1; } else { } if ((int )bss_role == 0) { goto case_0; } else { } if ((int )bss_role == 255) { goto case_255; } else { } goto switch_default; case_1: /* CIL Label */ priv->bss_mode = 3U; goto ldv_54815; case_0: /* CIL Label */ ; case_255: /* CIL Label */ ; switch_default: /* CIL Label */ priv->bss_mode = 2U; goto ldv_54815; switch_break: /* CIL Label */ ; } ldv_54815: { mwifiex_send_cmd_sync(priv, 247, 1, 0U, (void *)0); tmp___0 = mwifiex_sta_init_cmd(priv, 0); } return (tmp___0); } } int mwifiex_get_stats_info(struct mwifiex_private *priv , struct mwifiex_ds_get_stats *log ) { int tmp ; { { tmp = mwifiex_send_cmd_sync(priv, 11, 0, 0U, (void *)log); } return (tmp); } } static int mwifiex_reg_mem_ioctl_reg_rw(struct mwifiex_private *priv , struct mwifiex_ds_reg_rw *reg_rw , u16 action ) { u16 cmd_no ; int tmp ; { { if (reg_rw->type == 1U) { goto case_1; } else { } if (reg_rw->type == 2U) { goto case_2; } else { } if (reg_rw->type == 3U) { goto case_3; } else { } if (reg_rw->type == 4U) { goto case_4; } else { } if (reg_rw->type == 5U) { goto case_5; } else { } goto switch_default; case_1: /* CIL Label */ cmd_no = 25U; goto ldv_54830; case_2: /* CIL Label */ cmd_no = 26U; goto ldv_54830; case_3: /* CIL Label */ cmd_no = 27U; goto ldv_54830; case_4: /* CIL Label */ cmd_no = 173U; goto ldv_54830; case_5: /* CIL Label */ cmd_no = 237U; goto ldv_54830; switch_default: /* CIL Label */ ; return (-1); switch_break: /* CIL Label */ ; } ldv_54830: { tmp = mwifiex_send_cmd_sync(priv, (int )cmd_no, (int )action, 0U, (void *)reg_rw); } return (tmp); } } int mwifiex_reg_write(struct mwifiex_private *priv , u32 reg_type , u32 reg_offset , u32 reg_value ) { struct mwifiex_ds_reg_rw reg_rw ; int tmp ; { { reg_rw.type = reg_type; reg_rw.offset = reg_offset; reg_rw.value = reg_value; tmp = mwifiex_reg_mem_ioctl_reg_rw(priv, & reg_rw, 1); } return (tmp); } } int mwifiex_reg_read(struct mwifiex_private *priv , u32 reg_type , u32 reg_offset , u32 *value ) { int ret ; struct mwifiex_ds_reg_rw reg_rw ; { { reg_rw.type = reg_type; reg_rw.offset = reg_offset; ret = mwifiex_reg_mem_ioctl_reg_rw(priv, & reg_rw, 0); } if (ret != 0) { goto done; } else { } *value = reg_rw.value; done: ; return (ret); } } int mwifiex_eeprom_read(struct mwifiex_private *priv , u16 offset , u16 bytes , u8 *value ) { int ret ; struct mwifiex_ds_read_eeprom rd_eeprom ; { { rd_eeprom.offset = offset; rd_eeprom.byte_count = bytes; ret = mwifiex_send_cmd_sync(priv, 89, 0, 0U, (void *)(& rd_eeprom)); } if (ret == 0) { { memcpy((void *)value, (void const *)(& rd_eeprom.value), 256UL); } } else { } return (ret); } } static int mwifiex_set_gen_ie_helper(struct mwifiex_private *priv , u8 *ie_data_ptr , u16 ie_len ) { int ret ; struct ieee_types_vendor_header *pvendor_ie ; u8 wpa_oui[4U] ; u8 wps_oui[4U] ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; { ret = 0; wpa_oui[0] = 0U; wpa_oui[1] = 80U; wpa_oui[2] = 242U; wpa_oui[3] = 1U; wps_oui[0] = 0U; wps_oui[1] = 80U; wps_oui[2] = 242U; wps_oui[3] = 4U; if ((unsigned int )ie_len == 0U) { priv->gen_ie_buf_len = 0U; priv->wps.session_enable = 0U; return (0); } else if ((unsigned long )ie_data_ptr == (unsigned long )((u8 *)0U)) { return (-1); } else { } pvendor_ie = (struct ieee_types_vendor_header *)ie_data_ptr; if ((unsigned int )pvendor_ie->element_id == 221U) { { tmp = memcmp((void const *)(& pvendor_ie->oui), (void const *)(& wpa_oui), 4UL); } if (tmp == 0) { { ret = mwifiex_set_wpa_ie_helper(priv, ie_data_ptr, (int )ie_len); priv->wps.session_enable = 0U; } return (ret); } else { goto _L; } } else _L: /* CIL Label */ if ((unsigned int )pvendor_ie->element_id == 48U) { { ret = mwifiex_set_wpa_ie_helper(priv, ie_data_ptr, (int )ie_len); priv->wps.session_enable = 0U; } return (ret); } else if ((unsigned int )pvendor_ie->element_id == 68U) { { ret = mwifiex_set_wapi_ie(priv, ie_data_ptr, (int )ie_len); } return (ret); } else { } if ((unsigned long )ie_len < 256UL - (unsigned long )priv->gen_ie_buf_len) { pvendor_ie = (struct ieee_types_vendor_header *)ie_data_ptr; if ((unsigned int )pvendor_ie->element_id == 221U) { { tmp___1 = memcmp((void const *)(& pvendor_ie->oui), (void const *)(& wps_oui), 4UL); } if (tmp___1 == 0) { { priv->wps.session_enable = 1U; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_gen_ie_helper"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_ioctl.c"; descriptor.format = "info: WPS Session Enabled.\n"; descriptor.lineno = 1325U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: WPS Session Enabled.\n"); } } else { } { ret = mwifiex_set_wps_ie(priv, ie_data_ptr, (int )ie_len); } } else { } } else { } { memcpy((void *)(& priv->gen_ie_buf) + (unsigned long )priv->gen_ie_buf_len, (void const *)ie_data_ptr, (size_t )ie_len); priv->gen_ie_buf_len = (int )priv->gen_ie_buf_len + (int )((u8 )ie_len); } } else { ret = -1; } return (ret); } } static int mwifiex_misc_ioctl_gen_ie(struct mwifiex_private *priv , struct mwifiex_ds_misc_gen_ie *gen_ie , u16 action ) { struct mwifiex_adapter *adapter ; { adapter = priv->adapter; { if (gen_ie->type == 0U) { goto case_0; } else { } if (gen_ie->type == 1U) { goto case_1; } else { } goto switch_default; case_0: /* CIL Label */ ; if ((unsigned int )action == 0U) { { gen_ie->len = (u32 )priv->wpa_ie_len; memcpy((void *)(& gen_ie->ie_data), (void const *)(& priv->wpa_ie), (size_t )gen_ie->len); } } else { { mwifiex_set_gen_ie_helper(priv, (u8 *)(& gen_ie->ie_data), (int )((unsigned short )gen_ie->len)); } } goto ldv_54878; case_1: /* CIL Label */ { memset((void *)(& adapter->arp_filter), 0, 68UL); } if (gen_ie->len > 68U) { { adapter->arp_filter_size = 0U; dev_err((struct device const *)adapter->dev, "invalid ARP filter size\n"); } return (-1); } else { { memcpy((void *)(& adapter->arp_filter), (void const *)(& gen_ie->ie_data), (size_t )gen_ie->len); adapter->arp_filter_size = gen_ie->len; } } goto ldv_54878; switch_default: /* CIL Label */ { dev_err((struct device const *)adapter->dev, "invalid IE type\n"); } return (-1); switch_break: /* CIL Label */ ; } ldv_54878: ; return (0); } } int mwifiex_set_gen_ie(struct mwifiex_private *priv , u8 *ie , int ie_len ) { struct mwifiex_ds_misc_gen_ie gen_ie ; int tmp ; { if (ie_len > 256) { return (-14); } else { } { gen_ie.type = 0U; gen_ie.len = (u32 )ie_len; memcpy((void *)(& gen_ie.ie_data), (void const *)ie, (size_t )ie_len); tmp = mwifiex_misc_ioctl_gen_ie(priv, & gen_ie, 1); } if (tmp != 0) { return (-14); } else { } return (0); } } extern long simple_strtol(char const * , char ** , unsigned int ) ; __inline static bool is_broadcast_ether_addr(u8 const *addr ) { { return ((unsigned int )(((int )((unsigned short )*((u16 const *)addr)) & (int )((unsigned short )*((u16 const *)addr + 2U))) & (int )((unsigned short )*((u16 const *)addr + 4U))) == 65535U); } } extern unsigned char const _ctype[] ; __inline static struct device_node *of_find_node_by_name(struct device_node *from , char const *name ) { { return ((struct device_node *)0); } } __inline static int of_property_read_u8_array(struct device_node const *np , char const *propname , u8 *out_values , size_t sz ) { { return (-38); } } static int mwifiex_cmd_802_11_rssi_info(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action ) { { cmd->command = 164U; cmd->size = 40U; cmd->params.rssi_info.action = cmd_action; cmd->params.rssi_info.ndata = priv->data_avg_factor; cmd->params.rssi_info.nbcn = priv->bcn_avg_factor; priv->data_rssi_last = 0; priv->data_nf_last = 0; priv->data_rssi_avg = 0; priv->data_nf_avg = 0; priv->bcn_rssi_last = 0; priv->bcn_nf_last = 0; priv->bcn_rssi_avg = 0; priv->bcn_nf_avg = 0; return (0); } } static int mwifiex_cmd_mac_control(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , u16 *action ) { struct host_cmd_ds_mac_control *mac_ctrl ; { mac_ctrl = & cmd->params.mac_ctrl; if ((unsigned int )cmd_action != 1U) { { dev_err((struct device const *)(priv->adapter)->dev, "mac_control: only support set cmd\n"); } return (-1); } else { } cmd->command = 40U; cmd->size = 12U; mac_ctrl->action = *action; return (0); } } static int mwifiex_cmd_802_11_snmp_mib(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , u32 cmd_oid , u16 *ul_temp ) { struct host_cmd_ds_802_11_snmp_mib *snmp_mib ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { { snmp_mib = & cmd->params.smib; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_snmp_mib"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "cmd: SNMP_CMD: cmd_oid = 0x%x\n"; descriptor.lineno = 111U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid); } } else { } cmd->command = 22U; cmd->size = 14U; snmp_mib->oid = (unsigned short )cmd_oid; if ((unsigned int )cmd_action == 0U) { { snmp_mib->query_type = 0U; snmp_mib->buf_size = 128U; le16_add_cpu(& cmd->size, 128); } } else if ((unsigned int )cmd_action == 1U) { { snmp_mib->query_type = 1U; snmp_mib->buf_size = 2U; *((__le16 *)(& snmp_mib->value)) = *ul_temp; le16_add_cpu(& cmd->size, 2); } } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_snmp_mib"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___0.format = "cmd: SNMP_CMD: Action=0x%x, OID=0x%x, OIDSize=0x%x, Value=0x%x\n"; descriptor___0.lineno = 132U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: SNMP_CMD: Action=0x%x, OID=0x%x, OIDSize=0x%x, Value=0x%x\n", (int )cmd_action, cmd_oid, (int )snmp_mib->buf_size, (int )*((__le16 *)(& snmp_mib->value))); } } else { } return (0); } } static int mwifiex_cmd_802_11_get_log(struct host_cmd_ds_command *cmd ) { { cmd->command = 11U; cmd->size = 76U; return (0); } } static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , u16 *pbitmap_rates ) { struct host_cmd_ds_tx_rate_cfg *rate_cfg ; struct mwifiex_rate_scope *rate_scope ; struct mwifiex_rate_drop_pattern *rate_drop ; u32 i ; { rate_cfg = & cmd->params.tx_rate_cfg; cmd->command = 214U; rate_cfg->action = cmd_action; rate_cfg->cfg_index = 0U; rate_scope = (struct mwifiex_rate_scope *)rate_cfg + 4U; rate_scope->type = 339U; rate_scope->length = 20U; if ((unsigned long )pbitmap_rates != (unsigned long )((u16 *)0U)) { rate_scope->hr_dsss_rate_bitmap = *pbitmap_rates; rate_scope->ofdm_rate_bitmap = *(pbitmap_rates + 1UL); i = 0U; goto ldv_54587; ldv_54586: rate_scope->ht_mcs_rate_bitmap[i] = *(pbitmap_rates + (unsigned long )(i + 2U)); i = i + 1U; ldv_54587: ; if (i <= 7U) { goto ldv_54586; } else { } } else { rate_scope->hr_dsss_rate_bitmap = priv->bitmap_rates[0]; rate_scope->ofdm_rate_bitmap = priv->bitmap_rates[1]; i = 0U; goto ldv_54590; ldv_54589: rate_scope->ht_mcs_rate_bitmap[i] = priv->bitmap_rates[i + 2U]; i = i + 1U; ldv_54590: ; if (i <= 7U) { goto ldv_54589; } else { } } rate_drop = (struct mwifiex_rate_drop_pattern *)rate_scope + 24U; rate_drop->type = 338U; rate_drop->length = 4U; rate_drop->rate_drop_mode = 0U; cmd->size = 44U; return (0); } } static int mwifiex_cmd_tx_power_cfg(struct host_cmd_ds_command *cmd , u16 cmd_action , struct host_cmd_ds_txpwr_cfg *txp ) { struct mwifiex_types_power_group *pg_tlv ; struct host_cmd_ds_txpwr_cfg *cmd_txp_cfg ; { cmd_txp_cfg = & cmd->params.txp_cfg; cmd->command = 209U; cmd->size = 16U; { if ((int )cmd_action == 1) { goto case_1; } else { } if ((int )cmd_action == 0) { goto case_0; } else { } goto switch_break; case_1: /* CIL Label */ ; if (txp->mode != 0U) { { pg_tlv = (struct mwifiex_types_power_group *)((unsigned long )txp + 8UL); memmove((void *)cmd_txp_cfg, (void const *)txp, (unsigned long )pg_tlv->length + 12UL); pg_tlv = (struct mwifiex_types_power_group *)cmd_txp_cfg + 8U; cmd->size = (unsigned int )((int )cmd->size + (int )pg_tlv->length) + 4U; } } else { { memmove((void *)cmd_txp_cfg, (void const *)txp, 8UL); } } cmd_txp_cfg->action = cmd_action; goto ldv_54600; case_0: /* CIL Label */ cmd_txp_cfg->action = cmd_action; goto ldv_54600; switch_break: /* CIL Label */ ; } ldv_54600: ; return (0); } } static int mwifiex_cmd_rf_tx_power(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , void *data_buf ) { struct host_cmd_ds_rf_tx_pwr *txp ; { txp = & cmd->params.txp; cmd->size = 14U; cmd->command = 30U; txp->action = cmd_action; return (0); } } static int mwifiex_cmd_rf_antenna(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_ds_ant_cfg *ant_cfg ) { struct host_cmd_ds_rf_ant_mimo *ant_mimo ; struct host_cmd_ds_rf_ant_siso *ant_siso ; { ant_mimo = & cmd->params.ant_mimo; ant_siso = & cmd->params.ant_siso; cmd->command = 32U; if ((unsigned int )cmd_action != 1U) { return (0); } else { } if ((unsigned int )(priv->adapter)->hw_dev_mcs_support == 34U) { cmd->size = 16U; ant_mimo->action_tx = 2U; ant_mimo->tx_ant_mode = (unsigned short )ant_cfg->tx_ant; ant_mimo->action_rx = 1U; ant_mimo->rx_ant_mode = (unsigned short )ant_cfg->rx_ant; } else { cmd->size = 12U; ant_siso->action = 3U; ant_siso->ant_mode = (unsigned short )ant_cfg->tx_ant; } return (0); } } static int mwifiex_cmd_802_11_hs_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_hs_config_param *hscfg_param ) { struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_hs_cfg_enh *hs_cfg ; bool hs_activate ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { adapter = priv->adapter; hs_cfg = & cmd->params.opt_hs_cfg; hs_activate = 0; if ((unsigned long )hscfg_param == (unsigned long )((struct mwifiex_hs_config_param *)0)) { hs_activate = 1; } else { } cmd->command = 229U; if ((! hs_activate && hscfg_param->conditions != 4294967295U) && adapter->arp_filter_size - 1U <= 67U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_hs_cfg"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "cmd: Attach %d bytes ArpFilter to HSCfg cmd\n"; descriptor.lineno = 343U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "cmd: Attach %d bytes ArpFilter to HSCfg cmd\n", adapter->arp_filter_size); } } else { } { memcpy((void *)hs_cfg + 8U, (void const *)(& adapter->arp_filter), (size_t )adapter->arp_filter_size); cmd->size = (unsigned int )((unsigned short )adapter->arp_filter_size) + 16U; } } else { cmd->size = 16U; } if ((int )hs_activate) { hs_cfg->action = 2U; hs_cfg->params.hs_activate.resp_ctrl = 1U; } else { { hs_cfg->action = 1U; hs_cfg->params.hs_config.conditions = hscfg_param->conditions; hs_cfg->params.hs_config.gpio = hscfg_param->gpio; hs_cfg->params.hs_config.gap = hscfg_param->gap; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_hs_cfg"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___0.format = "cmd: HS_CFG_CMD: condition:0x%x gpio:0x%x gap:0x%x\n"; descriptor___0.lineno = 367U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: HS_CFG_CMD: condition:0x%x gpio:0x%x gap:0x%x\n", hs_cfg->params.hs_config.conditions, (int )hs_cfg->params.hs_config.gpio, (int )hs_cfg->params.hs_config.gap); } } else { } } return (0); } } static int mwifiex_cmd_802_11_mac_address(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action ) { { cmd->command = 77U; cmd->size = 16U; cmd->result = 0U; cmd->params.mac_addr.action = cmd_action; if ((unsigned int )cmd_action == 1U) { { memcpy((void *)(& cmd->params.mac_addr.mac_addr), (void const *)(& priv->curr_addr), 6UL); } } else { } return (0); } } static int mwifiex_cmd_mac_multicast_adr(struct host_cmd_ds_command *cmd , u16 cmd_action , struct mwifiex_multicast_list *mcast_list ) { struct host_cmd_ds_mac_multicast_adr *mcast_addr ; { { mcast_addr = & cmd->params.mc_addr; cmd->size = 204U; cmd->command = 16U; mcast_addr->action = cmd_action; mcast_addr->num_of_adrs = (unsigned short )mcast_list->num_multicast_addr; memcpy((void *)(& mcast_addr->mac_list), (void const *)(& mcast_list->mac_list), (size_t )(mcast_list->num_multicast_addr * 6U)); } return (0); } } static int mwifiex_cmd_802_11_deauthenticate(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u8 *mac ) { struct host_cmd_ds_802_11_deauthenticate *deauth ; struct _ddebug descriptor ; long tmp ; { { deauth = & cmd->params.deauth; cmd->command = 36U; cmd->size = 16U; memcpy((void *)(& deauth->mac_addr), (void const *)mac, 6UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_deauthenticate"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "cmd: Deauth: %pM\n"; descriptor.lineno = 447U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: Deauth: %pM\n", (u8 *)(& deauth->mac_addr)); } } else { } deauth->reason_code = 3U; return (0); } } static int mwifiex_cmd_802_11_ad_hoc_stop(struct host_cmd_ds_command *cmd ) { { cmd->command = 64U; cmd->size = 8U; return (0); } } static int mwifiex_set_keyparamset_wep(struct mwifiex_private *priv , struct mwifiex_ie_type_key_param_set *key_param_set , u16 *key_param_len ) { int cur_key_param_len ; u8 i ; { i = 0U; goto ldv_54660; ldv_54659: ; if (priv->wep_key[(int )i].key_length == 5U || priv->wep_key[(int )i].key_length == 13U) { key_param_set->type = 256U; key_param_set->length = (unsigned int )((unsigned short )priv->wep_key[(int )i].key_length) + 8U; key_param_set->key_type_id = 0U; key_param_set->key_info = 7U; key_param_set->key_len = (unsigned short )priv->wep_key[(int )i].key_length; key_param_set->key[0] = i; if ((int )i == ((int )priv->wep_key_curr_index & 16383)) { key_param_set->key[1] = 1U; } else { key_param_set->key[1] = 0U; } { memmove((void *)(& key_param_set->key) + 2U, (void const *)(& priv->wep_key[(int )i].key_material), (size_t )priv->wep_key[(int )i].key_length); cur_key_param_len = (int )(priv->wep_key[(int )i].key_length + 12U); *key_param_len = (int )*key_param_len + (int )((u16 )cur_key_param_len); key_param_set = key_param_set + (unsigned long )cur_key_param_len; } } else if (priv->wep_key[(int )i].key_length == 0U) { } else { { dev_err((struct device const *)(priv->adapter)->dev, "key%d Length = %d is incorrect\n", (int )i + 1, priv->wep_key[(int )i].key_length); } return (-1); } i = (u8 )((int )i + 1); ldv_54660: ; if ((unsigned int )i <= 3U) { goto ldv_54659; } else { } return (0); } } static int mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , u32 cmd_oid , struct mwifiex_ds_encrypt_key *enc_key ) { struct host_cmd_ds_802_11_key_material *key_material ; struct host_cmd_tlv_mac_addr *tlv_mac ; u16 key_param_len ; u16 cmd_size ; int ret ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct _ddebug descriptor___1 ; long tmp___3 ; struct _ddebug descriptor___2 ; long tmp___4 ; struct mwifiex_cmac_param *param ; { key_material = & cmd->params.key_material; key_param_len = 0U; ret = 0; cmd->command = 94U; key_material->action = cmd_action; if ((unsigned int )cmd_action == 0U) { cmd->size = 10U; return (ret); } else { } if ((unsigned long )enc_key == (unsigned long )((struct mwifiex_ds_encrypt_key *)0)) { { memset((void *)(& key_material->key_param_set), 0, 240UL); ret = mwifiex_set_keyparamset_wep(priv, & key_material->key_param_set, & key_param_len); cmd->size = (unsigned int )key_param_len + 10U; } return (ret); } else { { memset((void *)(& key_material->key_param_set), 0, 60UL); } } if (enc_key->is_wapi_key != 0U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_key_material"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "info: Set WAPI Key\n"; descriptor.lineno = 579U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: Set WAPI Key\n"); } } else { } key_material->key_param_set.key_type_id = 3U; if (cmd_oid == 1U) { key_material->key_param_set.key_info = 4U; } else { key_material->key_param_set.key_info = 0U; } key_material->key_param_set.key[0] = (u8 )enc_key->key_index; if ((unsigned int )priv->sec_info.wapi_key_on == 0U) { key_material->key_param_set.key[1] = 1U; } else { key_material->key_param_set.key[1] = 0U; } { tmp___0 = is_broadcast_ether_addr((u8 const *)(& enc_key->mac_addr)); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 2U); } else { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 1U); priv->sec_info.wapi_key_on = 1U; } { key_material->key_param_set.type = 256U; key_material->key_param_set.key_len = 50U; memcpy((void *)(& key_material->key_param_set.key) + 2U, (void const *)(& enc_key->key_material), (size_t )enc_key->key_len); memcpy((void *)(& key_material->key_param_set.key) + (unsigned long )(enc_key->key_len + 2U), (void const *)(& enc_key->pn), 16UL); key_material->key_param_set.length = 56U; key_param_len = 60U; cmd->size = (unsigned int )key_param_len + 10U; } return (ret); } else { } if (enc_key->key_len == 16U) { if ((unsigned int )enc_key->is_igtk_key != 0U) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_key_material"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___0.format = "cmd: CMAC_AES\n"; descriptor___0.lineno = 625U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: CMAC_AES\n"); } } else { } key_material->key_param_set.key_type_id = 4U; if (cmd_oid == 1U) { key_material->key_param_set.key_info = 4U; } else { key_material->key_param_set.key_info = 0U; } key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 1024U); } else { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cmd_802_11_key_material"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___1.format = "cmd: WPA_AES\n"; descriptor___1.lineno = 638U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "cmd: WPA_AES\n"); } } else { } key_material->key_param_set.key_type_id = 2U; if (cmd_oid == 1U) { key_material->key_param_set.key_info = 4U; } else { key_material->key_param_set.key_info = 0U; } if ((enc_key->key_index & 1073741824U) != 0U) { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 2U); } else { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 1U); } } } else if (enc_key->key_len == 32U) { { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_cmd_802_11_key_material"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___2.format = "cmd: WPA_TKIP\n"; descriptor___2.lineno = 657U; descriptor___2.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "cmd: WPA_TKIP\n"); } } else { } key_material->key_param_set.key_type_id = 1U; key_material->key_param_set.key_info = 4U; if ((enc_key->key_index & 1073741824U) != 0U) { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 2U); } else { key_material->key_param_set.key_info = (__le16 )((unsigned int )key_material->key_param_set.key_info | 1U); } } else { } if ((unsigned int )key_material->key_param_set.key_type_id != 0U) { { key_material->key_param_set.type = 256U; key_material->key_param_set.key_len = (unsigned short )enc_key->key_len; memcpy((void *)(& key_material->key_param_set.key), (void const *)(& enc_key->key_material), (size_t )enc_key->key_len); key_material->key_param_set.length = (unsigned int )((unsigned short )enc_key->key_len) + 6U; key_param_len = (unsigned int )((u16 )enc_key->key_len) + 10U; } if ((unsigned int )key_material->key_param_set.key_type_id == 4U) { { param = (struct mwifiex_cmac_param *)(& key_material->key_param_set.key); memcpy((void *)(& param->ipn), (void const *)(& enc_key->pn), 8UL); memcpy((void *)(& param->key), (void const *)(& enc_key->key_material), 16UL); key_param_len = 24U; key_material->key_param_set.key_len = key_param_len; key_param_len = (unsigned int )key_param_len + 6U; key_material->key_param_set.length = key_param_len; key_param_len = (unsigned int )key_param_len + 4U; } } else { } cmd->size = (unsigned int )key_param_len + 10U; if ((unsigned int )priv->bss_type == 1U) { { tlv_mac = (struct host_cmd_tlv_mac_addr *)(& key_material->key_param_set) + (unsigned long )key_param_len; tlv_mac->header.type = 288U; tlv_mac->header.len = 6U; memcpy((void *)(& tlv_mac->mac_addr), (void const *)(& enc_key->mac_addr), 6UL); cmd_size = (unsigned int )key_param_len + 20U; } } else { cmd_size = (unsigned int )key_param_len + 10U; } cmd->size = cmd_size; } else { } return (ret); } } static int mwifiex_cmd_802_11d_domain_info(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action ) { struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11d_domain_info *domain_info ; struct mwifiex_ietypes_domain_param_set *domain ; u8 no_of_triplet ; struct _ddebug descriptor ; long tmp ; { { adapter = priv->adapter; domain_info = & cmd->params.domain_info; domain = & domain_info->domain; no_of_triplet = adapter->domain_reg.no_of_triplet; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11d_domain_info"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "info: 11D: no_of_triplet=0x%x\n"; descriptor.lineno = 746U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: 11D: no_of_triplet=0x%x\n", (int )no_of_triplet); } } else { } cmd->command = 91U; domain_info->action = cmd_action; if ((unsigned int )cmd_action == 0U) { cmd->size = 10U; return (0); } else { } { domain->header.type = 7U; memcpy((void *)(& domain->country_code), (void const *)(& adapter->domain_reg.country_code), 3UL); domain->header.len = ((unsigned int )((unsigned short )no_of_triplet) + 1U) * 3U; } if ((unsigned int )no_of_triplet != 0U) { { memcpy((void *)(& domain->triplet), (void const *)(& adapter->domain_reg.triplet), (unsigned long )no_of_triplet * 3UL); cmd->size = (unsigned int )domain->header.len + 14U; } } else { cmd->size = 10U; } return (0); } } static int mwifiex_cmd_ibss_coalescing_status(struct host_cmd_ds_command *cmd , u16 cmd_action , u16 *enable ) { struct host_cmd_ds_802_11_ibss_status *ibss_coal ; { ibss_coal = & cmd->params.ibss_coalescing; cmd->command = 131U; cmd->size = 24U; cmd->result = 0U; ibss_coal->action = cmd_action; { if ((int )cmd_action == 1) { goto case_1; } else { } if ((int )cmd_action == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ ; if ((unsigned long )enable != (unsigned long )((u16 *)0U)) { ibss_coal->enable = *enable; } else { ibss_coal->enable = 0U; } goto ldv_54698; case_0: /* CIL Label */ ; switch_default: /* CIL Label */ ; goto ldv_54698; switch_break: /* CIL Label */ ; } ldv_54698: ; return (0); } } static int mwifiex_cmd_reg_access(struct host_cmd_ds_command *cmd , u16 cmd_action , void *data_buf ) { struct mwifiex_ds_reg_rw *reg_rw ; struct host_cmd_ds_mac_reg_access *mac_reg ; struct host_cmd_ds_bbp_reg_access *bbp_reg ; struct host_cmd_ds_rf_reg_access *rf_reg ; struct host_cmd_ds_pmic_reg_access *pmic_reg ; struct host_cmd_ds_rf_reg_access *cau_reg ; struct mwifiex_ds_read_eeprom *rd_eeprom ; struct host_cmd_ds_802_11_eeprom_access *cmd_eeprom ; { reg_rw = (struct mwifiex_ds_reg_rw *)data_buf; { if ((int )cmd->command == 25) { goto case_25; } else { } if ((int )cmd->command == 26) { goto case_26; } else { } if ((int )cmd->command == 27) { goto case_27; } else { } if ((int )cmd->command == 173) { goto case_173; } else { } if ((int )cmd->command == 237) { goto case_237; } else { } if ((int )cmd->command == 89) { goto case_89; } else { } goto switch_default; case_25: /* CIL Label */ cmd->size = 16U; mac_reg = & cmd->params.mac_reg; mac_reg->action = cmd_action; mac_reg->offset = (unsigned short )reg_rw->offset; mac_reg->value = reg_rw->value; goto ldv_54709; case_26: /* CIL Label */ cmd->size = 16U; bbp_reg = & cmd->params.bbp_reg; bbp_reg->action = cmd_action; bbp_reg->offset = (unsigned short )reg_rw->offset; bbp_reg->value = (unsigned char )reg_rw->value; goto ldv_54709; case_27: /* CIL Label */ cmd->size = 16U; rf_reg = & cmd->params.rf_reg; rf_reg->action = cmd_action; rf_reg->offset = (unsigned short )reg_rw->offset; rf_reg->value = (unsigned char )reg_rw->value; goto ldv_54709; case_173: /* CIL Label */ cmd->size = 16U; pmic_reg = & cmd->params.pmic_reg; pmic_reg->action = cmd_action; pmic_reg->offset = (unsigned short )reg_rw->offset; pmic_reg->value = (unsigned char )reg_rw->value; goto ldv_54709; case_237: /* CIL Label */ cmd->size = 16U; cau_reg = & cmd->params.rf_reg; cau_reg->action = cmd_action; cau_reg->offset = (unsigned short )reg_rw->offset; cau_reg->value = (unsigned char )reg_rw->value; goto ldv_54709; case_89: /* CIL Label */ rd_eeprom = (struct mwifiex_ds_read_eeprom *)data_buf; cmd_eeprom = & cmd->params.eeprom; cmd->size = 15U; cmd_eeprom->action = cmd_action; cmd_eeprom->offset = rd_eeprom->offset; cmd_eeprom->byte_count = rd_eeprom->byte_count; cmd_eeprom->value = 0U; goto ldv_54709; switch_default: /* CIL Label */ ; return (-1); switch_break: /* CIL Label */ ; } ldv_54709: ; return (0); } } static int mwifiex_cmd_pcie_host_spec(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 action ) { struct host_cmd_ds_pcie_details *host_spec ; struct pcie_service_card *card ; struct _ddebug descriptor ; long tmp ; { { host_spec = & cmd->params.pcie_host_spec; card = (struct pcie_service_card *)(priv->adapter)->card; cmd->command = 250U; cmd->size = 52U; cmd->result = 0U; memset((void *)host_spec, 0, 44UL); } if ((unsigned int )action != 1U) { return (0); } else { } host_spec->txbd_addr_lo = (unsigned int )card->txbd_ring_pbase; host_spec->txbd_addr_hi = (unsigned int )(card->txbd_ring_pbase >> 32); host_spec->txbd_count = 32U; host_spec->rxbd_addr_lo = (unsigned int )card->rxbd_ring_pbase; host_spec->rxbd_addr_hi = (unsigned int )(card->rxbd_ring_pbase >> 32); host_spec->rxbd_count = 32U; host_spec->evtbd_addr_lo = (unsigned int )card->evtbd_ring_pbase; host_spec->evtbd_addr_hi = (unsigned int )(card->evtbd_ring_pbase >> 32); host_spec->evtbd_count = 4U; if ((unsigned long )card->sleep_cookie_vbase != (unsigned long )((u8 *)0U)) { { host_spec->sleep_cookie_addr_lo = (unsigned int )card->sleep_cookie_pbase; host_spec->sleep_cookie_addr_hi = (unsigned int )(card->sleep_cookie_pbase >> 32); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_pcie_host_spec"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "sleep_cook_lo phy addr: 0x%x\n"; descriptor.lineno = 963U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "sleep_cook_lo phy addr: 0x%x\n", host_spec->sleep_cookie_addr_lo); } } else { } } else { } return (0); } } static int mwifiex_cmd_802_11_subsc_evt(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_ds_misc_subsc_evt *subsc_evt_cfg ) { struct host_cmd_ds_802_11_subsc_evt *subsc_evt ; struct mwifiex_ie_types_rssi_threshold *rssi_tlv ; u16 event_bitmap ; u8 *pos ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; { { subsc_evt = & cmd->params.subsc_evt; cmd->command = 117U; cmd->size = 12U; subsc_evt->action = subsc_evt_cfg->action; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_802_11_subsc_evt"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "cmd: action: %d\n"; descriptor.lineno = 990U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: action: %d\n", (int )subsc_evt_cfg->action); } } else { } if ((unsigned int )subsc_evt_cfg->action == 0U) { return (0); } else { } { subsc_evt->events = subsc_evt_cfg->events; event_bitmap = subsc_evt_cfg->events; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_802_11_subsc_evt"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___0.format = "cmd: event bitmap : %16x\n"; descriptor___0.lineno = 1000U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "cmd: event bitmap : %16x\n", (int )event_bitmap); } } else { } if ((unsigned int )subsc_evt_cfg->action - 2U <= 1U && (unsigned int )event_bitmap == 0U) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cmd_802_11_subsc_evt"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___1.format = "Error: No event specified for bitwise action type\n"; descriptor___1.lineno = 1006U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "Error: No event specified for bitwise action type\n"); } } else { } return (-22); } else { } if ((unsigned int )subsc_evt_cfg->action == 3U) { return (0); } else { } pos = (u8 *)subsc_evt + 4UL; if ((int )event_bitmap & 1) { { rssi_tlv = (struct mwifiex_ie_types_rssi_threshold *)pos; rssi_tlv->header.type = 260U; rssi_tlv->header.len = 2U; rssi_tlv->abs_value = subsc_evt_cfg->bcn_l_rssi_cfg.abs_value; rssi_tlv->evt_freq = subsc_evt_cfg->bcn_l_rssi_cfg.evt_freq; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_cmd_802_11_subsc_evt"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___2.format = "Cfg Beacon Low Rssi event, RSSI:-%d dBm, Freq:%d\n"; descriptor___2.lineno = 1034U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "Cfg Beacon Low Rssi event, RSSI:-%d dBm, Freq:%d\n", (int )subsc_evt_cfg->bcn_l_rssi_cfg.abs_value, (int )subsc_evt_cfg->bcn_l_rssi_cfg.evt_freq); } } else { } { pos = pos + 6UL; le16_add_cpu(& cmd->size, 6); } } else { } if (((unsigned long )event_bitmap & 16UL) != 0UL) { { rssi_tlv = (struct mwifiex_ie_types_rssi_threshold *)pos; rssi_tlv->header.type = 278U; rssi_tlv->header.len = 2U; rssi_tlv->abs_value = subsc_evt_cfg->bcn_h_rssi_cfg.abs_value; rssi_tlv->evt_freq = subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq; descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_cmd_802_11_subsc_evt"; descriptor___3.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___3.format = "Cfg Beacon High Rssi event, RSSI:-%d dBm, Freq:%d\n"; descriptor___3.lineno = 1054U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)(priv->adapter)->dev, "Cfg Beacon High Rssi event, RSSI:-%d dBm, Freq:%d\n", (int )subsc_evt_cfg->bcn_h_rssi_cfg.abs_value, (int )subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq); } } else { } { pos = pos + 6UL; le16_add_cpu(& cmd->size, 6); } } else { } return (0); } } static int mwifiex_cmd_append_rpn_expression(struct mwifiex_private *priv , struct mwifiex_mef_entry *mef_entry , u8 **buffer ) { struct mwifiex_mef_filter *filter ; int i ; int byte_len ; u8 *stack_ptr ; { filter = (struct mwifiex_mef_filter *)(& mef_entry->filter); stack_ptr = *buffer; i = 0; goto ldv_54757; ldv_54756: filter = (struct mwifiex_mef_filter *)(& mef_entry->filter) + (unsigned long )i; if ((unsigned int )filter->filt_type == 0U) { goto ldv_54755; } else { } { *((__le32 *)stack_ptr) = (unsigned int )filter->repeat; stack_ptr = stack_ptr + 4UL; *stack_ptr = 1U; stack_ptr = stack_ptr + 1UL; byte_len = (int )filter->byte_seq[6]; memcpy((void *)stack_ptr, (void const *)(& filter->byte_seq), (size_t )byte_len); stack_ptr = stack_ptr + (unsigned long )byte_len; *stack_ptr = (u8 )byte_len; stack_ptr = stack_ptr + 1UL; *stack_ptr = 2U; stack_ptr = stack_ptr + 1UL; *((__le32 *)stack_ptr) = (unsigned int )filter->offset; stack_ptr = stack_ptr + 4UL; *stack_ptr = 1U; stack_ptr = stack_ptr + 1UL; *stack_ptr = filter->filt_type; stack_ptr = stack_ptr + 1UL; } if ((unsigned int )filter->filt_action != 0U) { *stack_ptr = filter->filt_action; stack_ptr = stack_ptr + 1UL; } else { } if ((long )stack_ptr - (long )*buffer > 100L) { return (-1); } else { } i = i + 1; ldv_54757: ; if (i <= 9) { goto ldv_54756; } else { } ldv_54755: *buffer = stack_ptr; return (0); } } static int mwifiex_cmd_mef_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , struct mwifiex_ds_mef_cfg *mef ) { struct host_cmd_ds_mef_cfg *mef_cfg ; u8 *pos ; int tmp ; { { mef_cfg = & cmd->params.mef_cfg; pos = (u8 *)mef_cfg; cmd->command = 154U; mef_cfg->criteria = mef->criteria; mef_cfg->num_entries = mef->num_entries; pos = pos + 6UL; ((struct mwifiex_fw_mef_entry *)(& mef_cfg->mef_entry))->mode = (mef->mef_entry)->mode; ((struct mwifiex_fw_mef_entry *)(& mef_cfg->mef_entry))->action = (mef->mef_entry)->action; pos = pos + 4UL; tmp = mwifiex_cmd_append_rpn_expression(priv, mef->mef_entry, & pos); } if (tmp != 0) { return (-1); } else { } ((struct mwifiex_fw_mef_entry *)(& mef_cfg->mef_entry))->exprsize = (int )((unsigned short )((long )pos)) - (int )((unsigned short )((long )(& ((struct mwifiex_fw_mef_entry *)(& mef_cfg->mef_entry))->expr))); cmd->size = (unsigned int )((int )((unsigned short )((long )pos)) - (int )((unsigned short )((long )mef_cfg))) + 8U; return (0); } } static u32 mwifiex_parse_cal_cfg(u8 *src , size_t len , u8 *dst ) { u8 *s ; u8 *d ; u8 *tmp ; long tmp___0 ; { s = src; d = dst; goto ldv_54772; ldv_54773: ; if ((unsigned int )*s != 0U && (((int )_ctype[(int )*s] & 32) != 0 || (unsigned int )*s == 9U)) { s = s + 1; goto ldv_54772; } else { } if (((int )_ctype[(int )*s] & 68) != 0) { { tmp = d; d = d + 1; tmp___0 = simple_strtol((char const *)s, (char **)0, 16U); *tmp = (u8 )tmp___0; s = s + 2UL; } } else { s = s + 1; } ldv_54772: ; if ((unsigned long )((long )s - (long )src) < len) { goto ldv_54773; } else { } return ((u32 )((long )d) - (u32 )((long )dst)); } } int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv , struct device_node *node , char const *prefix ) { { return (0); } } static int mwifiex_cmd_cfg_data(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , void *data_buf ) { struct mwifiex_adapter *adapter ; struct property *prop ; u32 len ; u8 *data ; int ret ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { adapter = priv->adapter; prop = (struct property *)data_buf; data = (u8 *)cmd + 8UL; if ((unsigned long )prop != (unsigned long )((struct property *)0)) { { len = (u32 )prop->length; ret = of_property_read_u8_array((struct device_node const *)adapter->dt_node, (char const *)prop->name, data, (size_t )len); } if (ret != 0) { return (ret); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cmd_cfg_data"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "download cfg_data from device tree: %s\n"; descriptor.lineno = 1204U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "download cfg_data from device tree: %s\n", prop->name); } } else { } } else if ((unsigned long )(adapter->cal_data)->data != (unsigned long )((u8 const */* const */)0U) && (unsigned long )(adapter->cal_data)->size != 0UL) { { len = mwifiex_parse_cal_cfg((u8 *)(adapter->cal_data)->data, (adapter->cal_data)->size, data); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cmd_cfg_data"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor___0.format = "download cfg_data from config file\n"; descriptor___0.lineno = 1208U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "download cfg_data from config file\n"); } } else { } } else { return (-1); } cmd->command = 143U; cmd->size = (unsigned int )((unsigned short )len) + 8U; return (0); } } static int mwifiex_cmd_coalesce_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u16 cmd_action , void *data_buf ) { struct host_cmd_ds_coalesce_cfg *coalesce_cfg ; struct mwifiex_ds_coalesce_cfg *cfg ; struct coalesce_filt_field_param *param ; u16 cnt ; u16 idx ; u16 length ; struct coalesce_receive_filt_rule *rule ; { coalesce_cfg = & cmd->params.coalesce_cfg; cfg = (struct mwifiex_ds_coalesce_cfg *)data_buf; cmd->command = 266U; cmd->size = 8U; coalesce_cfg->action = cmd_action; coalesce_cfg->num_of_rules = cfg->num_of_rules; rule = (struct coalesce_receive_filt_rule *)(& coalesce_cfg->rule); cnt = 0U; goto ldv_54810; ldv_54809: rule->header.type = 410U; rule->max_coalescing_delay = cfg->rule[(int )cnt].max_coalescing_delay; rule->pkt_type = cfg->rule[(int )cnt].pkt_type; rule->num_of_fields = cfg->rule[(int )cnt].num_of_fields; length = 0U; param = (struct coalesce_filt_field_param *)(& rule->params); idx = 0U; goto ldv_54807; ldv_54806: { param->operation = cfg->rule[(int )cnt].params[(int )idx].operation; param->operand_len = cfg->rule[(int )cnt].params[(int )idx].operand_len; param->offset = cfg->rule[(int )cnt].params[(int )idx].offset; memcpy((void *)(& param->operand_byte_stream), (void const *)(& cfg->rule[(int )cnt].params[(int )idx].operand_byte_stream), (size_t )param->operand_len); length = (unsigned int )length + 8U; param = param + 1; idx = (u16 )((int )idx + 1); } ldv_54807: ; if ((int )idx < (int )((unsigned short )cfg->rule[(int )cnt].num_of_fields)) { goto ldv_54806; } else { } { rule->header.len = (unsigned int )length + 4U; le16_add_cpu(& cmd->size, (int )((unsigned int )rule->header.len + 4U)); rule = (struct coalesce_receive_filt_rule *)(& rule->params) + (unsigned long )length; cnt = (u16 )((int )cnt + 1); } ldv_54810: ; if ((int )cnt < (int )cfg->num_of_rules) { goto ldv_54809; } else { } { le16_add_cpu(& cmd->size, 4); } return (0); } } int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv , uint16_t cmd_no , u16 cmd_action , u32 cmd_oid , void *data_buf , void *cmd_buf ) { struct host_cmd_ds_command *cmd_ptr ; int ret ; struct _ddebug descriptor ; long tmp ; { cmd_ptr = (struct host_cmd_ds_command *)cmd_buf; ret = 0; { if ((int )cmd_no == 3) { goto case_3; } else { } if ((int )cmd_no == 143) { goto case_143; } else { } if ((int )cmd_no == 40) { goto case_40; } else { } if ((int )cmd_no == 77) { goto case_77; } else { } if ((int )cmd_no == 16) { goto case_16; } else { } if ((int )cmd_no == 214) { goto case_214; } else { } if ((int )cmd_no == 209) { goto case_209; } else { } if ((int )cmd_no == 30) { goto case_30; } else { } if ((int )cmd_no == 32) { goto case_32; } else { } if ((int )cmd_no == 228) { goto case_228; } else { } if ((int )cmd_no == 229) { goto case_229; } else { } if ((int )cmd_no == 6) { goto case_6; } else { } if ((int )cmd_no == 108) { goto case_108; } else { } if ((int )cmd_no == 18) { goto case_18; } else { } if ((int )cmd_no == 36) { goto case_36; } else { } if ((int )cmd_no == 43) { goto case_43; } else { } if ((int )cmd_no == 11) { goto case_11; } else { } if ((int )cmd_no == 44) { goto case_44; } else { } if ((int )cmd_no == 64) { goto case_64; } else { } if ((int )cmd_no == 164) { goto case_164; } else { } if ((int )cmd_no == 22) { goto case_22; } else { } if ((int )cmd_no == 127) { goto case_127; } else { } if ((int )cmd_no == 151) { goto case_151; } else { } if ((int )cmd_no == 268) { goto case_268; } else { } if ((int )cmd_no == 269) { goto case_269; } else { } if ((int )cmd_no == 274) { goto case_274; } else { } if ((int )cmd_no == 235) { goto case_235; } else { } if ((int )cmd_no == 169) { goto case_169; } else { } if ((int )cmd_no == 170) { goto case_170; } else { } if ((int )cmd_no == 206) { goto case_206; } else { } if ((int )cmd_no == 208) { goto case_208; } else { } if ((int )cmd_no == 207) { goto case_207; } else { } if ((int )cmd_no == 94) { goto case_94; } else { } if ((int )cmd_no == 91) { goto case_91; } else { } if ((int )cmd_no == 217) { goto case_217; } else { } if ((int )cmd_no == 223) { goto case_223; } else { } if ((int )cmd_no == 205) { goto case_205; } else { } if ((int )cmd_no == 113) { goto case_113; } else { } if ((int )cmd_no == 131) { goto case_131; } else { } if ((int )cmd_no == 25) { goto case_25; } else { } if ((int )cmd_no == 26) { goto case_26; } else { } if ((int )cmd_no == 27) { goto case_27; } else { } if ((int )cmd_no == 173) { goto case_173; } else { } if ((int )cmd_no == 237) { goto case_237; } else { } if ((int )cmd_no == 89) { goto case_89; } else { } if ((int )cmd_no == 247) { goto case_247; } else { } if ((int )cmd_no == 250) { goto case_250; } else { } if ((int )cmd_no == 117) { goto case_117; } else { } if ((int )cmd_no == 154) { goto case_154; } else { } if ((int )cmd_no == 266) { goto case_266; } else { } goto switch_default; case_3: /* CIL Label */ { ret = mwifiex_cmd_get_hw_spec(priv, cmd_ptr); } goto ldv_54823; case_143: /* CIL Label */ { ret = mwifiex_cmd_cfg_data(priv, cmd_ptr, data_buf); } goto ldv_54823; case_40: /* CIL Label */ { ret = mwifiex_cmd_mac_control(priv, cmd_ptr, (int )cmd_action, (u16 *)data_buf); } goto ldv_54823; case_77: /* CIL Label */ { ret = mwifiex_cmd_802_11_mac_address(priv, cmd_ptr, (int )cmd_action); } goto ldv_54823; case_16: /* CIL Label */ { ret = mwifiex_cmd_mac_multicast_adr(cmd_ptr, (int )cmd_action, (struct mwifiex_multicast_list *)data_buf); } goto ldv_54823; case_214: /* CIL Label */ { ret = mwifiex_cmd_tx_rate_cfg(priv, cmd_ptr, (int )cmd_action, (u16 *)data_buf); } goto ldv_54823; case_209: /* CIL Label */ { ret = mwifiex_cmd_tx_power_cfg(cmd_ptr, (int )cmd_action, (struct host_cmd_ds_txpwr_cfg *)data_buf); } goto ldv_54823; case_30: /* CIL Label */ { ret = mwifiex_cmd_rf_tx_power(priv, cmd_ptr, (int )cmd_action, data_buf); } goto ldv_54823; case_32: /* CIL Label */ { ret = mwifiex_cmd_rf_antenna(priv, cmd_ptr, (int )cmd_action, (struct mwifiex_ds_ant_cfg *)data_buf); } goto ldv_54823; case_228: /* CIL Label */ { ret = mwifiex_cmd_enh_power_mode(priv, cmd_ptr, (int )cmd_action, (int )((unsigned short )cmd_oid), (struct mwifiex_ds_auto_ds *)data_buf); } goto ldv_54823; case_229: /* CIL Label */ { ret = mwifiex_cmd_802_11_hs_cfg(priv, cmd_ptr, (int )cmd_action, (struct mwifiex_hs_config_param *)data_buf); } goto ldv_54823; case_6: /* CIL Label */ { ret = mwifiex_cmd_802_11_scan(cmd_ptr, (struct mwifiex_scan_cmd_config *)data_buf); } goto ldv_54823; case_108: /* CIL Label */ { ret = mwifiex_cmd_802_11_bg_scan_query(cmd_ptr); } goto ldv_54823; case_18: /* CIL Label */ { ret = mwifiex_cmd_802_11_associate(priv, cmd_ptr, (struct mwifiex_bssdescriptor *)data_buf); } goto ldv_54823; case_36: /* CIL Label */ { ret = mwifiex_cmd_802_11_deauthenticate(priv, cmd_ptr, (u8 *)data_buf); } goto ldv_54823; case_43: /* CIL Label */ { ret = mwifiex_cmd_802_11_ad_hoc_start(priv, cmd_ptr, (struct cfg80211_ssid *)data_buf); } goto ldv_54823; case_11: /* CIL Label */ { ret = mwifiex_cmd_802_11_get_log(cmd_ptr); } goto ldv_54823; case_44: /* CIL Label */ { ret = mwifiex_cmd_802_11_ad_hoc_join(priv, cmd_ptr, (struct mwifiex_bssdescriptor *)data_buf); } goto ldv_54823; case_64: /* CIL Label */ { ret = mwifiex_cmd_802_11_ad_hoc_stop(cmd_ptr); } goto ldv_54823; case_164: /* CIL Label */ { ret = mwifiex_cmd_802_11_rssi_info(priv, cmd_ptr, (int )cmd_action); } goto ldv_54823; case_22: /* CIL Label */ { ret = mwifiex_cmd_802_11_snmp_mib(priv, cmd_ptr, (int )cmd_action, cmd_oid, (u16 *)data_buf); } goto ldv_54823; case_127: /* CIL Label */ cmd_ptr->command = 127U; cmd_ptr->size = 10U; priv->tx_rate = 0U; ret = 0; goto ldv_54823; case_151: /* CIL Label */ { cmd_ptr->command = cmd_no; cmd_ptr->params.verext.version_str_sel = (unsigned char )*((u32 *)data_buf); memcpy((void *)(& cmd_ptr->params), (void const *)data_buf, 129UL); cmd_ptr->size = 137U; ret = 0; } goto ldv_54823; case_268: /* CIL Label */ cmd_ptr->command = cmd_no; cmd_ptr->params.reg_mask.action = cmd_action; cmd_ptr->params.reg_mask.mask = *((u32 *)data_buf); cmd_ptr->size = 14U; ret = 0; goto ldv_54823; case_269: /* CIL Label */ { cmd_ptr->command = cmd_no; memcpy((void *)(& cmd_ptr->params), (void const *)data_buf, 10UL); cmd_ptr->size = 18U; } goto ldv_54823; case_274: /* CIL Label */ { ret = mwifiex_cmd_11ac_cfg(priv, cmd_ptr, (int )cmd_action, (struct mwifiex_11ac_vht_cfg *)data_buf); } goto ldv_54823; case_235: /* CIL Label */ cmd_ptr->command = cmd_no; cmd_ptr->params.mode_cfg.action = cmd_action; cmd_ptr->params.mode_cfg.mode = *((u16 *)data_buf); cmd_ptr->size = 12U; goto ldv_54823; case_169: /* CIL Label */ ; if ((unsigned int )(priv->adapter)->hw_status == 4U) { (priv->adapter)->hw_status = 0; } else { } cmd_ptr->command = cmd_no; cmd_ptr->size = 8U; goto ldv_54823; case_170: /* CIL Label */ (priv->adapter)->hw_status = 4; cmd_ptr->command = cmd_no; cmd_ptr->size = 8U; goto ldv_54823; case_206: /* CIL Label */ { ret = mwifiex_cmd_11n_addba_req(cmd_ptr, data_buf); } goto ldv_54823; case_208: /* CIL Label */ { ret = mwifiex_cmd_11n_delba(cmd_ptr, data_buf); } goto ldv_54823; case_207: /* CIL Label */ { ret = mwifiex_cmd_11n_addba_rsp_gen(priv, cmd_ptr, (struct host_cmd_ds_11n_addba_req *)data_buf); } goto ldv_54823; case_94: /* CIL Label */ { ret = mwifiex_cmd_802_11_key_material(priv, cmd_ptr, (int )cmd_action, cmd_oid, (struct mwifiex_ds_encrypt_key *)data_buf); } goto ldv_54823; case_91: /* CIL Label */ { ret = mwifiex_cmd_802_11d_domain_info(priv, cmd_ptr, (int )cmd_action); } goto ldv_54823; case_217: /* CIL Label */ { ret = mwifiex_cmd_recfg_tx_buf(priv, cmd_ptr, (int )cmd_action, (u16 *)data_buf); } goto ldv_54823; case_223: /* CIL Label */ { ret = mwifiex_cmd_amsdu_aggr_ctrl(cmd_ptr, (int )cmd_action, (struct mwifiex_ds_11n_amsdu_aggr_ctrl *)data_buf); } goto ldv_54823; case_205: /* CIL Label */ { ret = mwifiex_cmd_11n_cfg(priv, cmd_ptr, (int )cmd_action, (struct mwifiex_ds_11n_tx_cfg *)data_buf); } goto ldv_54823; case_113: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_sta_prepare_cmd"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmd.c"; descriptor.format = "cmd: WMM: WMM_GET_STATUS cmd sent\n"; descriptor.lineno = 1464U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "cmd: WMM: WMM_GET_STATUS cmd sent\n"); } } else { } cmd_ptr->command = 113U; cmd_ptr->size = 100U; ret = 0; goto ldv_54823; case_131: /* CIL Label */ { ret = mwifiex_cmd_ibss_coalescing_status(cmd_ptr, (int )cmd_action, (u16 *)data_buf); } goto ldv_54823; case_25: /* CIL Label */ ; case_26: /* CIL Label */ ; case_27: /* CIL Label */ ; case_173: /* CIL Label */ ; case_237: /* CIL Label */ ; case_89: /* CIL Label */ { ret = mwifiex_cmd_reg_access(cmd_ptr, (int )cmd_action, data_buf); } goto ldv_54823; case_247: /* CIL Label */ cmd_ptr->command = cmd_no; if (priv->bss_mode == 1U) { cmd_ptr->params.bss_mode.con_type = 1U; } else if (priv->bss_mode == 2U) { cmd_ptr->params.bss_mode.con_type = 0U; } else if (priv->bss_mode == 3U) { cmd_ptr->params.bss_mode.con_type = 2U; } else { } cmd_ptr->size = 9U; ret = 0; goto ldv_54823; case_250: /* CIL Label */ { ret = mwifiex_cmd_pcie_host_spec(priv, cmd_ptr, (int )cmd_action); } goto ldv_54823; case_117: /* CIL Label */ { ret = mwifiex_cmd_802_11_subsc_evt(priv, cmd_ptr, (struct mwifiex_ds_misc_subsc_evt *)data_buf); } goto ldv_54823; case_154: /* CIL Label */ { ret = mwifiex_cmd_mef_cfg(priv, cmd_ptr, (struct mwifiex_ds_mef_cfg *)data_buf); } goto ldv_54823; case_266: /* CIL Label */ { ret = mwifiex_cmd_coalesce_cfg(priv, cmd_ptr, (int )cmd_action, data_buf); } goto ldv_54823; switch_default: /* CIL Label */ { dev_err((struct device const *)(priv->adapter)->dev, "PREP_CMD: unknown cmd- %#x\n", (int )cmd_no); ret = -1; } goto ldv_54823; switch_break: /* CIL Label */ ; } ldv_54823: ; return (ret); } } int mwifiex_sta_init_cmd(struct mwifiex_private *priv , u8 first_sta ) { struct mwifiex_adapter *adapter ; int ret ; u16 enable ; struct mwifiex_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl ; struct mwifiex_ds_auto_ds auto_ds ; enum state_11d_t state_11d ; struct mwifiex_ds_11n_tx_cfg tx_cfg ; { adapter = priv->adapter; enable = 1U; if ((unsigned int )first_sta != 0U) { if ((unsigned int )(priv->adapter)->iface_type == 1U) { { ret = mwifiex_send_cmd_sync(priv, 250, 1, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } } else { } { ret = mwifiex_send_cmd_sync(priv, 169, 1, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } { adapter->dt_node = of_find_node_by_name((struct device_node *)0, "marvell_cfgdata"); } if ((unsigned long )adapter->dt_node != (unsigned long )((struct device_node *)0)) { { ret = mwifiex_dnld_dt_cfgdata(priv, adapter->dt_node, "marvell,caldata"); } if (ret != 0) { return (-1); } else { } } else { } if ((unsigned long )adapter->cal_data != (unsigned long )((struct firmware const *)0)) { { ret = mwifiex_send_cmd_sync(priv, 143, 1, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } } else { } { ret = mwifiex_send_cmd_sync(priv, 3, 0, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } { ret = mwifiex_send_cmd_sync(priv, 217, 1, 0U, (void *)(& (priv->adapter)->tx_buf_size)); } if (ret != 0) { return (-1); } else { } if ((unsigned int )priv->bss_type != 1U) { { (priv->adapter)->ps_mode = 1U; ret = mwifiex_send_cmd_sync(priv, 228, 255, 16U, (void *)0); } if (ret != 0) { return (-1); } else { } } else { } } else { } { ret = mwifiex_send_cmd_sync(priv, 214, 0, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } { priv->data_rate = 0U; ret = mwifiex_send_cmd_sync(priv, 30, 0, 0U, (void *)0); } if (ret != 0) { return (-1); } else { } if ((unsigned int )priv->bss_type == 0U) { { ret = mwifiex_send_cmd_sync(priv, 131, 1, 0U, (void *)(& enable)); } if (ret != 0) { return (-1); } else { } } else { } { memset((void *)(& amsdu_aggr_ctrl), 0, 4UL); amsdu_aggr_ctrl.enable = 1U; ret = mwifiex_send_cmd_sync(priv, 223, 1, 0U, (void *)(& amsdu_aggr_ctrl)); } if (ret != 0) { return (-1); } else { } { ret = mwifiex_send_cmd_sync(priv, 40, 1, 0U, (void *)(& priv->curr_pkt_filter)); } if (ret != 0) { return (-1); } else { } if (((unsigned int )first_sta != 0U && (unsigned int )(priv->adapter)->iface_type != 2U) && (unsigned int )priv->bss_type != 1U) { { auto_ds.auto_ds = 1U; auto_ds.idle_time = 100U; ret = mwifiex_send_cmd_sync(priv, 228, 255, 1U, (void *)(& auto_ds)); } if (ret != 0) { return (-1); } else { } } else { } if ((unsigned int )priv->bss_type != 1U) { { state_11d = 1; ret = mwifiex_send_cmd_sync(priv, 22, 1, 9U, (void *)(& state_11d)); } if (ret != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "11D: failed to enable 11D\n"); } } else { } } else { } { (priv->adapter)->last_init_cmd = 205U; tx_cfg.tx_htcap = 114U; ret = mwifiex_send_cmd_sync(priv, 205, 1, 0U, (void *)(& tx_cfg)); ret = -115; } return (ret); } } extern u8 const *cfg80211_find_ie(u8 , u8 const * , int ) ; extern u8 const *cfg80211_find_vendor_ie(unsigned int , u8 , u8 const * , int ) ; int mwifiex_set_secure_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_config , struct cfg80211_ap_settings *params ) ; void mwifiex_set_ht_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) ; void mwifiex_set_vht_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) ; void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) ; void mwifiex_set_vht_width(struct mwifiex_private *priv , enum nl80211_chan_width width , bool ap_11ac_enable ) ; void mwifiex_set_wmm_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) ; void mwifiex_set_sys_config_invalid_data(struct mwifiex_uap_bss_param *config ) ; int mwifiex_set_secure_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_config , struct cfg80211_ap_settings *params ) { int i ; struct mwifiex_wep_key wep_key ; { if (! params->privacy) { bss_config->protocol = 1U; bss_config->key_mgmt = 4U; bss_config->wpa_cfg.length = 0U; priv->sec_info.wep_enabled = 0U; priv->sec_info.wpa_enabled = 0U; priv->sec_info.wpa2_enabled = 0U; return (0); } else { } { if ((unsigned int )params->auth_type == 0U) { goto case_0; } else { } if ((unsigned int )params->auth_type == 1U) { goto case_1; } else { } if ((unsigned int )params->auth_type == 3U) { goto case_3; } else { } goto switch_default; case_0: /* CIL Label */ bss_config->auth_mode = 0U; goto ldv_54318; case_1: /* CIL Label */ bss_config->auth_mode = 1U; goto ldv_54318; case_3: /* CIL Label */ bss_config->auth_mode = 128U; goto ldv_54318; switch_default: /* CIL Label */ bss_config->auth_mode = 255U; goto ldv_54318; switch_break: /* CIL Label */ ; } ldv_54318: bss_config->key_mgmt_operation = (u16 )((unsigned int )bss_config->key_mgmt_operation | 3U); i = 0; goto ldv_54327; ldv_54326: ; { if (params->crypto.akm_suites[i] == 1027073U) { goto case_1027073; } else { } if (params->crypto.akm_suites[i] == 1027074U) { goto case_1027074; } else { } goto switch_default___0; case_1027073: /* CIL Label */ ; if ((int )params->crypto.wpa_versions & 1) { bss_config->protocol = 8U; bss_config->key_mgmt = 1U; } else { } if ((params->crypto.wpa_versions & 2U) != 0U) { bss_config->protocol = (u16 )((unsigned int )bss_config->protocol | 32U); bss_config->key_mgmt = 1U; } else { } goto ldv_54323; case_1027074: /* CIL Label */ ; if ((int )params->crypto.wpa_versions & 1) { bss_config->protocol = 8U; bss_config->key_mgmt = 2U; } else { } if ((params->crypto.wpa_versions & 2U) != 0U) { bss_config->protocol = (u16 )((unsigned int )bss_config->protocol | 32U); bss_config->key_mgmt = 2U; } else { } goto ldv_54323; switch_default___0: /* CIL Label */ ; goto ldv_54323; switch_break___0: /* CIL Label */ ; } ldv_54323: i = i + 1; ldv_54327: ; if (i < params->crypto.n_akm_suites) { goto ldv_54326; } else { } i = 0; goto ldv_54336; ldv_54335: ; { if (params->crypto.ciphers_pairwise[i] == 1027073U) { goto case_1027073___0; } else { } if (params->crypto.ciphers_pairwise[i] == 1027077U) { goto case_1027077; } else { } if (params->crypto.ciphers_pairwise[i] == 1027074U) { goto case_1027074___0; } else { } if (params->crypto.ciphers_pairwise[i] == 1027076U) { goto case_1027076; } else { } goto switch_default___1; case_1027073___0: /* CIL Label */ ; case_1027077: /* CIL Label */ ; goto ldv_54331; case_1027074___0: /* CIL Label */ ; if ((int )params->crypto.wpa_versions & 1) { bss_config->wpa_cfg.pairwise_cipher_wpa = (u8 )((unsigned int )bss_config->wpa_cfg.pairwise_cipher_wpa | 4U); } else { } if ((params->crypto.wpa_versions & 2U) != 0U) { bss_config->wpa_cfg.pairwise_cipher_wpa2 = (u8 )((unsigned int )bss_config->wpa_cfg.pairwise_cipher_wpa2 | 4U); } else { } goto ldv_54331; case_1027076: /* CIL Label */ ; if ((int )params->crypto.wpa_versions & 1) { bss_config->wpa_cfg.pairwise_cipher_wpa = (u8 )((unsigned int )bss_config->wpa_cfg.pairwise_cipher_wpa | 8U); } else { } if ((params->crypto.wpa_versions & 2U) != 0U) { bss_config->wpa_cfg.pairwise_cipher_wpa2 = (u8 )((unsigned int )bss_config->wpa_cfg.pairwise_cipher_wpa2 | 8U); } else { } switch_default___1: /* CIL Label */ ; goto ldv_54331; switch_break___1: /* CIL Label */ ; } ldv_54331: i = i + 1; ldv_54336: ; if (i < params->crypto.n_ciphers_pairwise) { goto ldv_54335; } else { } { if (params->crypto.cipher_group == 1027073U) { goto case_1027073___1; } else { } if (params->crypto.cipher_group == 1027077U) { goto case_1027077___0; } else { } if (params->crypto.cipher_group == 1027074U) { goto case_1027074___1; } else { } if (params->crypto.cipher_group == 1027076U) { goto case_1027076___0; } else { } goto switch_default___2; case_1027073___1: /* CIL Label */ ; case_1027077___0: /* CIL Label */ ; if ((unsigned int )priv->sec_info.wep_enabled != 0U) { bss_config->protocol = 2U; bss_config->key_mgmt = 4U; bss_config->wpa_cfg.length = 0U; i = 0; goto ldv_54341; ldv_54340: wep_key = priv->wep_key[i]; bss_config->wep_cfg[i].key_index = (u8 )i; if ((int )priv->wep_key_curr_index == i) { bss_config->wep_cfg[i].is_default = 1U; } else { bss_config->wep_cfg[i].is_default = 0U; } { bss_config->wep_cfg[i].length = (u16 )wep_key.key_length; memcpy((void *)(& bss_config->wep_cfg[i].key), (void const *)(& wep_key.key_material), (size_t )wep_key.key_length); i = i + 1; } ldv_54341: ; if (i <= 3) { goto ldv_54340; } else { } } else { } goto ldv_54343; case_1027074___1: /* CIL Label */ bss_config->wpa_cfg.group_cipher = 4U; goto ldv_54343; case_1027076___0: /* CIL Label */ bss_config->wpa_cfg.group_cipher = 8U; goto ldv_54343; switch_default___2: /* CIL Label */ ; goto ldv_54343; switch_break___2: /* CIL Label */ ; } ldv_54343: ; return (0); } } void mwifiex_set_ht_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) { u8 const *ht_ie ; { if (((unsigned long )(priv->adapter)->fw_cap_info & 2048UL) == 0UL) { return; } else { } { ht_ie = cfg80211_find_ie(45, params->beacon.tail, (int )params->beacon.tail_len); } if ((unsigned long )ht_ie != (unsigned long )((u8 const *)0U)) { { memcpy((void *)(& bss_cfg->ht_cap), (void const *)ht_ie + 2U, 26UL); priv->ap_11n_enabled = 1U; } } else { { memset((void *)(& bss_cfg->ht_cap), 0, 26UL); bss_cfg->ht_cap.cap_info = 4364U; bss_cfg->ht_cap.ampdu_params_info = 3U; } } return; } } void mwifiex_set_vht_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) { u8 const *vht_ie ; { { vht_ie = cfg80211_find_ie(191, params->beacon.tail, (int )params->beacon.tail_len); } if ((unsigned long )vht_ie != (unsigned long )((u8 const *)0U)) { { memcpy((void *)(& bss_cfg->vht_cap), (void const *)vht_ie + 2U, 12UL); priv->ap_11ac_enabled = 1U; } } else { priv->ap_11ac_enabled = 0U; } return; } } void mwifiex_set_vht_width(struct mwifiex_private *priv , enum nl80211_chan_width width , bool ap_11ac_enable ) { struct mwifiex_adapter *adapter ; struct mwifiex_11ac_vht_cfg vht_cfg ; { adapter = priv->adapter; vht_cfg.band_config = 2U; vht_cfg.cap_info = adapter->hw_dot_11ac_dev_cap; if (! ap_11ac_enable) { vht_cfg.mcs_tx_set = 65535U; vht_cfg.mcs_rx_set = 65535U; } else { vht_cfg.mcs_tx_set = 65530U; vht_cfg.mcs_rx_set = 65530U; } vht_cfg.misc_config = 3U; if ((int )ap_11ac_enable && (unsigned int )width > 2U) { vht_cfg.misc_config = (u8 )((unsigned int )vht_cfg.misc_config | 4U); } else { } { mwifiex_send_cmd_sync(priv, 274, 1, 0U, (void *)(& vht_cfg)); } return; } } void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) { struct ieee_types_header *rate_ie ; int var_offset ; u8 const *var_pos ; int len ; u8 rate_len ; u8 const *tmp ; u8 const *tmp___0 ; { { var_offset = 36; var_pos = params->beacon.head + (unsigned long )var_offset; len = (int )((unsigned int )params->beacon.head_len - (unsigned int )var_offset); rate_len = 0U; tmp = cfg80211_find_ie(1, var_pos, len); rate_ie = (struct ieee_types_header *)tmp; } if ((unsigned long )rate_ie != (unsigned long )((struct ieee_types_header *)0)) { { memcpy((void *)(& bss_cfg->rates), (void const *)rate_ie + 1U, (size_t )rate_ie->len); rate_len = rate_ie->len; } } else { } { tmp___0 = cfg80211_find_ie(50, params->beacon.tail, (int )params->beacon.tail_len); rate_ie = (struct ieee_types_header *)tmp___0; } if ((unsigned long )rate_ie != (unsigned long )((struct ieee_types_header *)0)) { { memcpy((void *)(& bss_cfg->rates) + (unsigned long )rate_len, (void const *)rate_ie + 1U, (size_t )rate_ie->len); } } else { } return; } } void mwifiex_set_sys_config_invalid_data(struct mwifiex_uap_bss_param *config ) { { config->bcast_ssid_ctl = 127U; config->radio_ctl = 127U; config->dtim_period = 127U; config->beacon_period = 32767U; config->auth_mode = 127U; config->rts_threshold = 32767U; config->frag_threshold = 32767U; config->retry_limit = 127U; config->qos_info = 255U; return; } } static void mwifiex_uap_bss_wpa(u8 **tlv_buf , void *cmd_buf , u16 *param_size ) { struct host_cmd_tlv_pwk_cipher *pwk_cipher ; struct host_cmd_tlv_gwk_cipher *gwk_cipher ; struct host_cmd_tlv_passphrase *passphrase ; struct host_cmd_tlv_akmp *tlv_akmp ; struct mwifiex_uap_bss_param *bss_cfg ; u16 cmd_size ; u8 *tlv ; { bss_cfg = (struct mwifiex_uap_bss_param *)cmd_buf; cmd_size = *param_size; tlv = *tlv_buf; tlv_akmp = (struct host_cmd_tlv_akmp *)tlv; tlv_akmp->header.type = 321U; tlv_akmp->header.len = 4U; tlv_akmp->key_mgmt_operation = bss_cfg->key_mgmt_operation; tlv_akmp->key_mgmt = bss_cfg->key_mgmt; cmd_size = (unsigned int )cmd_size + 8U; tlv = tlv + 8UL; if (((int )bss_cfg->wpa_cfg.pairwise_cipher_wpa & 12) != 0) { pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; pwk_cipher->header.type = 401U; pwk_cipher->header.len = 4U; pwk_cipher->proto = 8U; pwk_cipher->cipher = bss_cfg->wpa_cfg.pairwise_cipher_wpa; cmd_size = (unsigned int )cmd_size + 8U; tlv = tlv + 8UL; } else { } if (((int )bss_cfg->wpa_cfg.pairwise_cipher_wpa2 & 12) != 0) { pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; pwk_cipher->header.type = 401U; pwk_cipher->header.len = 4U; pwk_cipher->proto = 32U; pwk_cipher->cipher = bss_cfg->wpa_cfg.pairwise_cipher_wpa2; cmd_size = (unsigned int )cmd_size + 8U; tlv = tlv + 8UL; } else { } if (((int )bss_cfg->wpa_cfg.group_cipher & 12) != 0) { gwk_cipher = (struct host_cmd_tlv_gwk_cipher *)tlv; gwk_cipher->header.type = 402U; gwk_cipher->header.len = 2U; gwk_cipher->cipher = bss_cfg->wpa_cfg.group_cipher; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if (bss_cfg->wpa_cfg.length != 0U) { { passphrase = (struct host_cmd_tlv_passphrase *)tlv; passphrase->header.type = 316U; passphrase->header.len = (unsigned short )bss_cfg->wpa_cfg.length; memcpy((void *)(& passphrase->passphrase), (void const *)(& bss_cfg->wpa_cfg.passphrase), (size_t )bss_cfg->wpa_cfg.length); cmd_size = (unsigned int )((int )cmd_size + (int )((u16 )bss_cfg->wpa_cfg.length)) + 4U; tlv = tlv + ((unsigned long )bss_cfg->wpa_cfg.length + 4UL); } } else { } *param_size = cmd_size; *tlv_buf = tlv; return; } } void mwifiex_set_wmm_params(struct mwifiex_private *priv , struct mwifiex_uap_bss_param *bss_cfg , struct cfg80211_ap_settings *params ) { u8 const *vendor_ie ; struct ieee_types_header *wmm_ie ; u8 wmm_oui[4U] ; { { wmm_oui[0] = 0U; wmm_oui[1] = 80U; wmm_oui[2] = 242U; wmm_oui[3] = 2U; vendor_ie = cfg80211_find_vendor_ie(20722U, 2, params->beacon.tail, (int )params->beacon.tail_len); } if ((unsigned long )vendor_ie != (unsigned long )((u8 const *)0U)) { { wmm_ie = (struct ieee_types_header *)vendor_ie; memcpy((void *)(& bss_cfg->wmm_info), (void const *)wmm_ie + 1U, 24UL); priv->wmm_enabled = 1U; } } else { { memset((void *)(& bss_cfg->wmm_info), 0, 24UL); memcpy((void *)(& bss_cfg->wmm_info.oui), (void const *)(& wmm_oui), 4UL); bss_cfg->wmm_info.subtype = 1U; bss_cfg->wmm_info.version = 1U; priv->wmm_enabled = 0U; } } bss_cfg->qos_info = 0U; return; } } static void mwifiex_uap_bss_wep(u8 **tlv_buf , void *cmd_buf , u16 *param_size ) { struct host_cmd_tlv_wep_key *wep_key ; u16 cmd_size ; int i ; u8 *tlv ; struct mwifiex_uap_bss_param *bss_cfg ; { cmd_size = *param_size; tlv = *tlv_buf; bss_cfg = (struct mwifiex_uap_bss_param *)cmd_buf; i = 0; goto ldv_54409; ldv_54408: ; if ((unsigned int )bss_cfg->wep_cfg[i].length != 0U && ((unsigned int )bss_cfg->wep_cfg[i].length == 5U || (unsigned int )bss_cfg->wep_cfg[i].length == 13U)) { { wep_key = (struct host_cmd_tlv_wep_key *)tlv; wep_key->header.type = 315U; wep_key->header.len = (unsigned int )bss_cfg->wep_cfg[i].length + 2U; wep_key->key_index = bss_cfg->wep_cfg[i].key_index; wep_key->is_default = bss_cfg->wep_cfg[i].is_default; memcpy((void *)(& wep_key->key), (void const *)(& bss_cfg->wep_cfg[i].key), (size_t )bss_cfg->wep_cfg[i].length); cmd_size = (unsigned int )((int )cmd_size + (int )bss_cfg->wep_cfg[i].length) + 6U; tlv = tlv + ((unsigned long )bss_cfg->wep_cfg[i].length + 6UL); } } else { } i = i + 1; ldv_54409: ; if (i <= 3) { goto ldv_54408; } else { } *param_size = cmd_size; *tlv_buf = tlv; return; } } static int mwifiex_uap_bss_param_prepare(u8 *tlv , void *cmd_buf , u16 *param_size ) { struct host_cmd_tlv_dtim_period *dtim_period ; struct host_cmd_tlv_beacon_period *beacon_period ; struct host_cmd_tlv_ssid *ssid ; struct host_cmd_tlv_bcast_ssid *bcast_ssid ; struct host_cmd_tlv_channel_band *chan_band ; struct host_cmd_tlv_frag_threshold *frag_threshold ; struct host_cmd_tlv_rts_threshold *rts_threshold ; struct host_cmd_tlv_retry_limit *retry_limit ; struct host_cmd_tlv_encrypt_protocol *encrypt_protocol ; struct host_cmd_tlv_auth_type *auth_type ; struct host_cmd_tlv_rates *tlv_rates ; struct host_cmd_tlv_ageout_timer *ao_timer ; struct host_cmd_tlv_ageout_timer *ps_ao_timer ; struct mwifiex_ie_types_htcap *htcap ; struct mwifiex_ie_types_wmmcap *wmm_cap ; struct mwifiex_uap_bss_param *bss_cfg ; int i ; u16 cmd_size ; { bss_cfg = (struct mwifiex_uap_bss_param *)cmd_buf; cmd_size = *param_size; if (bss_cfg->ssid.ssid_len != 0U) { { ssid = (struct host_cmd_tlv_ssid *)tlv; ssid->header.type = 0U; ssid->header.len = (unsigned short )bss_cfg->ssid.ssid_len; memcpy((void *)(& ssid->ssid), (void const *)(& bss_cfg->ssid.ssid), (size_t )bss_cfg->ssid.ssid_len); cmd_size = (unsigned int )((int )cmd_size + (int )((u16 )bss_cfg->ssid.ssid_len)) + 4U; tlv = tlv + ((unsigned long )bss_cfg->ssid.ssid_len + 4UL); bcast_ssid = (struct host_cmd_tlv_bcast_ssid *)tlv; bcast_ssid->header.type = 304U; bcast_ssid->header.len = 1U; bcast_ssid->bcast_ctl = bss_cfg->bcast_ssid_ctl; cmd_size = (unsigned int )cmd_size + 5U; tlv = tlv + 5UL; } } else { } if ((unsigned int )bss_cfg->rates[0] != 0U) { tlv_rates = (struct host_cmd_tlv_rates *)tlv; tlv_rates->header.type = 1U; i = 0; goto ldv_54435; ldv_54434: tlv_rates->rates[i] = bss_cfg->rates[i]; i = i + 1; ldv_54435: ; if (i <= 13 && (unsigned int )bss_cfg->rates[i] != 0U) { goto ldv_54434; } else { } tlv_rates->header.len = (unsigned short )i; cmd_size = (unsigned int )((int )cmd_size + (int )((u16 )i)) + 4U; tlv = tlv + ((unsigned long )i + 4UL); } else { } if ((unsigned int )bss_cfg->channel != 0U && (((unsigned int )bss_cfg->band_cfg == 0U && (unsigned int )bss_cfg->channel <= 14U) || ((unsigned int )bss_cfg->band_cfg == 1U && (unsigned int )bss_cfg->channel <= 165U))) { chan_band = (struct host_cmd_tlv_channel_band *)tlv; chan_band->header.type = 298U; chan_band->header.len = 2U; chan_band->band_config = bss_cfg->band_cfg; chan_band->channel = bss_cfg->channel; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if ((unsigned int )bss_cfg->beacon_period - 50U <= 3950U) { beacon_period = (struct host_cmd_tlv_beacon_period *)tlv; beacon_period->header.type = 300U; beacon_period->header.len = 2U; beacon_period->period = bss_cfg->beacon_period; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if ((unsigned int )bss_cfg->dtim_period - 1U <= 99U) { dtim_period = (struct host_cmd_tlv_dtim_period *)tlv; dtim_period->header.type = 301U; dtim_period->header.len = 1U; dtim_period->period = bss_cfg->dtim_period; cmd_size = (unsigned int )cmd_size + 5U; tlv = tlv + 5UL; } else { } if ((unsigned int )bss_cfg->rts_threshold <= 2347U) { rts_threshold = (struct host_cmd_tlv_rts_threshold *)tlv; rts_threshold->header.type = 307U; rts_threshold->header.len = 2U; rts_threshold->rts_thr = bss_cfg->rts_threshold; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if ((unsigned int )bss_cfg->frag_threshold - 256U <= 2090U) { frag_threshold = (struct host_cmd_tlv_frag_threshold *)tlv; frag_threshold->header.type = 326U; frag_threshold->header.len = 2U; frag_threshold->frag_thr = bss_cfg->frag_threshold; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if ((unsigned int )bss_cfg->retry_limit <= 14U) { retry_limit = (struct host_cmd_tlv_retry_limit *)tlv; retry_limit->header.type = 349U; retry_limit->header.len = 1U; retry_limit->limit = bss_cfg->retry_limit; cmd_size = (unsigned int )cmd_size + 5U; tlv = tlv + 5UL; } else { } if (((unsigned int )bss_cfg->protocol & 40U) != 0U || ((int )bss_cfg->protocol & 64) != 0) { { mwifiex_uap_bss_wpa(& tlv, cmd_buf, & cmd_size); } } else { { mwifiex_uap_bss_wep(& tlv, cmd_buf, & cmd_size); } } if ((unsigned int )bss_cfg->auth_mode <= 1U || (unsigned int )bss_cfg->auth_mode == 255U) { auth_type = (struct host_cmd_tlv_auth_type *)tlv; auth_type->header.type = 287U; auth_type->header.len = 1U; auth_type->auth_type = (unsigned char )bss_cfg->auth_mode; cmd_size = (unsigned int )cmd_size + 5U; tlv = tlv + 5UL; } else { } if ((unsigned int )bss_cfg->protocol != 0U) { encrypt_protocol = (struct host_cmd_tlv_encrypt_protocol *)tlv; encrypt_protocol->header.type = 320U; encrypt_protocol->header.len = 2U; encrypt_protocol->proto = bss_cfg->protocol; cmd_size = (unsigned int )cmd_size + 6U; tlv = tlv + 6UL; } else { } if ((unsigned int )bss_cfg->ht_cap.cap_info != 0U) { { htcap = (struct mwifiex_ie_types_htcap *)tlv; htcap->header.type = 45U; htcap->header.len = 26U; htcap->ht_cap.cap_info = bss_cfg->ht_cap.cap_info; htcap->ht_cap.ampdu_params_info = bss_cfg->ht_cap.ampdu_params_info; memcpy((void *)(& htcap->ht_cap.mcs), (void const *)(& bss_cfg->ht_cap.mcs), 16UL); htcap->ht_cap.extended_ht_cap_info = bss_cfg->ht_cap.extended_ht_cap_info; htcap->ht_cap.tx_BF_cap_info = bss_cfg->ht_cap.tx_BF_cap_info; htcap->ht_cap.antenna_selection_info = bss_cfg->ht_cap.antenna_selection_info; cmd_size = (unsigned int )cmd_size + 30U; tlv = tlv + 30UL; } } else { } if ((unsigned int )bss_cfg->wmm_info.qos_info != 255U) { { wmm_cap = (struct mwifiex_ie_types_wmmcap *)tlv; wmm_cap->header.type = 221U; wmm_cap->header.len = 24U; memcpy((void *)(& wmm_cap->wmm_info), (void const *)(& bss_cfg->wmm_info), 24UL); cmd_size = (unsigned int )cmd_size + 28U; tlv = tlv + 28UL; } } else { } if (bss_cfg->sta_ao_timer != 0U) { ao_timer = (struct host_cmd_tlv_ageout_timer *)tlv; ao_timer->header.type = 313U; ao_timer->header.len = 4U; ao_timer->sta_ao_timer = bss_cfg->sta_ao_timer; cmd_size = (unsigned int )cmd_size + 8U; tlv = tlv + 8UL; } else { } if (bss_cfg->ps_sta_ao_timer != 0U) { ps_ao_timer = (struct host_cmd_tlv_ageout_timer *)tlv; ps_ao_timer->header.type = 379U; ps_ao_timer->header.len = 4U; ps_ao_timer->sta_ao_timer = bss_cfg->ps_sta_ao_timer; cmd_size = (unsigned int )cmd_size + 8U; tlv = tlv + 8UL; } else { } *param_size = cmd_size; return (0); } } static int mwifiex_uap_custom_ie_prepare(u8 *tlv , void *cmd_buf , u16 *ie_size ) { struct mwifiex_ie_list *ap_ie ; struct mwifiex_ie_types_header *tlv_ie ; { ap_ie = (struct mwifiex_ie_list *)cmd_buf; tlv_ie = (struct mwifiex_ie_types_header *)tlv; if (((unsigned long )ap_ie == (unsigned long )((struct mwifiex_ie_list *)0) || (unsigned int )ap_ie->len == 0U) || (unsigned long )(& ap_ie->ie_list) == (unsigned long )((struct mwifiex_ie (*)[16])0)) { return (-1); } else { } { *ie_size = (unsigned int )((int )*ie_size + (int )ap_ie->len) + 4U; tlv_ie->type = 361U; tlv_ie->len = ap_ie->len; tlv = tlv + 4UL; memcpy((void *)tlv, (void const *)(& ap_ie->ie_list), (size_t )ap_ie->len); } return (0); } } static int mwifiex_cmd_uap_sys_config(struct host_cmd_ds_command *cmd , u16 cmd_action , u32 type , void *cmd_buf ) { u8 *tlv ; u16 cmd_size ; u16 param_size ; u16 ie_size ; struct host_cmd_ds_sys_config *sys_cfg ; int tmp ; int tmp___0 ; { cmd->command = 176U; cmd_size = 10U; sys_cfg = & cmd->params.uap_sys_config; sys_cfg->action = cmd_action; tlv = (u8 *)(& sys_cfg->tlv); { if (type == 0U) { goto case_0; } else { } if (type == 1U) { goto case_1; } else { } goto switch_default; case_0: /* CIL Label */ { param_size = cmd_size; tmp = mwifiex_uap_bss_param_prepare(tlv, cmd_buf, & param_size); } if (tmp != 0) { return (-1); } else { } cmd->size = param_size; goto ldv_54456; case_1: /* CIL Label */ { ie_size = cmd_size; tmp___0 = mwifiex_uap_custom_ie_prepare(tlv, cmd_buf, & ie_size); } if (tmp___0 != 0) { return (-1); } else { } cmd->size = ie_size; goto ldv_54456; switch_default: /* CIL Label */ ; return (-1); switch_break: /* CIL Label */ ; } ldv_54456: ; return (0); } } static int mwifiex_cmd_uap_sta_deauth(struct mwifiex_private *priv , struct host_cmd_ds_command *cmd , u8 *mac ) { struct host_cmd_ds_sta_deauth *sta_deauth ; { { sta_deauth = & cmd->params.sta_deauth; cmd->command = 181U; memcpy((void *)(& sta_deauth->mac), (void const *)mac, 6UL); sta_deauth->reason = 3U; cmd->size = 16U; } return (0); } } int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv , unsigned short cmd_no , u16 cmd_action , u32 type , void *data_buf , void *cmd_buf ) { struct host_cmd_ds_command *cmd ; int tmp ; int tmp___0 ; { cmd = (struct host_cmd_ds_command *)cmd_buf; { if ((int )cmd_no == 176) { goto case_176; } else { } if ((int )cmd_no == 177) { goto case_177; } else { } if ((int )cmd_no == 178) { goto case_178; } else { } if ((int )cmd_no == 181) { goto case_181; } else { } goto switch_default; case_176: /* CIL Label */ { tmp = mwifiex_cmd_uap_sys_config(cmd, (int )cmd_action, type, data_buf); } if (tmp != 0) { return (-1); } else { } goto ldv_54475; case_177: /* CIL Label */ ; case_178: /* CIL Label */ cmd->command = cmd_no; cmd->size = 8U; goto ldv_54475; case_181: /* CIL Label */ { tmp___0 = mwifiex_cmd_uap_sta_deauth(priv, cmd, (u8 *)data_buf); } if (tmp___0 != 0) { return (-1); } else { } goto ldv_54475; switch_default: /* CIL Label */ { dev_err((struct device const *)(priv->adapter)->dev, "PREP_CMD: unknown cmd %#x\n", (int )cmd_no); } return (-1); switch_break: /* CIL Label */ ; } ldv_54475: ; return (0); } } __inline static void *kzalloc(size_t size , gfp_t flags ) ; int mwifiex_set_mgmt_ies(struct mwifiex_private *priv , struct cfg80211_beacon_data *info___0 ) ; int mwifiex_del_mgmt_ies(struct mwifiex_private *priv ) ; static int mwifiex_ie_index_used_by_other_intf(struct mwifiex_private *priv , u16 idx ) { int i ; struct mwifiex_adapter *adapter ; struct mwifiex_ie *ie ; { adapter = priv->adapter; i = 0; goto ldv_54305; ldv_54304: ; if ((unsigned long )adapter->priv[i] != (unsigned long )priv) { ie = (struct mwifiex_ie *)(& (adapter->priv[i])->mgmt_ie) + (unsigned long )idx; if ((unsigned int )ie->mgmt_subtype_mask != 0U && (unsigned int )ie->ie_length != 0U) { return (-1); } else { } } else { } i = i + 1; ldv_54305: ; if (i < (int )adapter->priv_num) { goto ldv_54304; } else { } return (0); } } static int mwifiex_ie_get_autoidx(struct mwifiex_private *priv , u16 subtype_mask , struct mwifiex_ie *ie , u16 *index ) { u16 mask ; u16 len ; u16 i ; int tmp ; { i = 0U; goto ldv_54318; ldv_54317: mask = priv->mgmt_ie[(int )i].mgmt_subtype_mask; len = ie->ie_length; if ((unsigned int )mask == 65535U) { goto ldv_54316; } else { } if ((int )mask == (int )subtype_mask) { if ((unsigned int )len > 256U) { goto ldv_54316; } else { } *index = i; return (0); } else { } if ((unsigned int )priv->mgmt_ie[(int )i].ie_length == 0U) { { tmp = mwifiex_ie_index_used_by_other_intf(priv, (int )i); } if (tmp != 0) { goto ldv_54316; } else { } *index = i; return (0); } else { } ldv_54316: i = (u16 )((int )i + 1); ldv_54318: ; if ((int )i < (int )(priv->adapter)->max_mgmt_ie_index) { goto ldv_54317; } else { } return (-1); } } static int mwifiex_update_autoindex_ies(struct mwifiex_private *priv , struct mwifiex_ie_list *ie_list ) { u16 travel_len ; u16 index ; u16 mask ; s16 input_len ; s16 tlv_len ; struct mwifiex_ie *ie ; u8 *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { input_len = (s16 )ie_list->len; travel_len = 4U; ie_list->len = 0U; goto ldv_54332; ldv_54331: ie = (struct mwifiex_ie *)ie_list + (unsigned long )travel_len; tlv_len = (s16 )ie->ie_length; travel_len = (unsigned int )((int )travel_len + (int )((u16 )tlv_len)) + 6U; if ((unsigned long )input_len < (unsigned long )tlv_len + 6UL) { return (-1); } else { } index = ie->ie_index; mask = ie->mgmt_subtype_mask; if ((unsigned int )index == 65535U) { { tmp___0 = mwifiex_ie_get_autoidx(priv, (int )mask, ie, & index); } if (tmp___0 != 0) { return (-1); } else { } if ((unsigned int )index == 65535U) { return (-1); } else { } { tmp = (u8 *)(& priv->mgmt_ie[(int )index].ie_buffer); memcpy((void *)tmp, (void const *)(& ie->ie_buffer), (size_t )ie->ie_length); priv->mgmt_ie[(int )index].ie_length = ie->ie_length; priv->mgmt_ie[(int )index].ie_index = index; priv->mgmt_ie[(int )index].mgmt_subtype_mask = mask; ie->ie_index = index; } } else { if ((unsigned int )mask != 0U) { return (-1); } else { } { tmp___1 = mwifiex_ie_index_used_by_other_intf(priv, (int )index); } if (tmp___1 != 0) { return (-1); } else { } { ie->ie_length = 0U; memcpy((void *)(& priv->mgmt_ie) + (unsigned long )index, (void const *)ie, 262UL); } } { le16_add_cpu(& ie_list->len, (int )((unsigned int )priv->mgmt_ie[(int )index].ie_length + 6U)); input_len = (s16 )((unsigned int )((int )((unsigned short )input_len) - (int )((unsigned short )tlv_len)) - 6U); } ldv_54332: ; if ((unsigned int )((unsigned short )input_len) > 3U) { goto ldv_54331; } else { } if ((int )priv->bss_role & 1) { { tmp___2 = mwifiex_send_cmd_async(priv, 176, 1, 1U, (void *)ie_list); } return (tmp___2); } else { } return (0); } } static int mwifiex_update_uap_custom_ie(struct mwifiex_private *priv , struct mwifiex_ie *beacon_ie , u16 *beacon_idx , struct mwifiex_ie *pr_ie , u16 *probe_idx , struct mwifiex_ie *ar_ie , u16 *assoc_idx ) { struct mwifiex_ie_list *ap_custom_ie ; u8 *pos ; u16 len ; int ret ; void *tmp ; { { tmp = kzalloc(4196UL, 208U); ap_custom_ie = (struct mwifiex_ie_list *)tmp; } if ((unsigned long )ap_custom_ie == (unsigned long )((struct mwifiex_ie_list *)0)) { return (-12); } else { } ap_custom_ie->type = 361U; pos = (u8 *)(& ap_custom_ie->ie_list); if ((unsigned long )beacon_ie != (unsigned long )((struct mwifiex_ie *)0)) { { len = (unsigned int )beacon_ie->ie_length + 6U; memcpy((void *)pos, (void const *)beacon_ie, (size_t )len); pos = pos + (unsigned long )len; le16_add_cpu(& ap_custom_ie->len, (int )len); } } else { } if ((unsigned long )pr_ie != (unsigned long )((struct mwifiex_ie *)0)) { { len = (unsigned int )pr_ie->ie_length + 6U; memcpy((void *)pos, (void const *)pr_ie, (size_t )len); pos = pos + (unsigned long )len; le16_add_cpu(& ap_custom_ie->len, (int )len); } } else { } if ((unsigned long )ar_ie != (unsigned long )((struct mwifiex_ie *)0)) { { len = (unsigned int )ar_ie->ie_length + 6U; memcpy((void *)pos, (void const *)ar_ie, (size_t )len); pos = pos + (unsigned long )len; le16_add_cpu(& ap_custom_ie->len, (int )len); } } else { } { ret = mwifiex_update_autoindex_ies(priv, ap_custom_ie); pos = (u8 *)(& ap_custom_ie->ie_list[0].ie_index); } if ((unsigned long )beacon_ie != (unsigned long )((struct mwifiex_ie *)0) && (unsigned int )*beacon_idx == 65535U) { *beacon_idx = ap_custom_ie->ie_list[0].ie_index; len = (unsigned int )beacon_ie->ie_length + 6U; pos = pos + (unsigned long )len; } else { } if ((unsigned long )pr_ie != (unsigned long )((struct mwifiex_ie *)0) && (unsigned int )pr_ie->ie_index == 65535U) { *probe_idx = *((u16 *)pos); len = (unsigned int )pr_ie->ie_length + 6U; pos = pos + (unsigned long )len; } else { } if ((unsigned long )ar_ie != (unsigned long )((struct mwifiex_ie *)0) && (unsigned int )ar_ie->ie_index == 65535U) { *assoc_idx = *((u16 *)pos); } else { } { kfree((void const *)ap_custom_ie); } return (ret); } } static int mwifiex_update_vs_ie(u8 const *ies , int ies_len , struct mwifiex_ie **ie_ptr , u16 mask , unsigned int oui , u8 oui_type ) { struct ieee_types_header *vs_ie ; struct mwifiex_ie *ie ; u8 const *vendor_ie ; void *tmp ; { { ie = *ie_ptr; vendor_ie = cfg80211_find_vendor_ie(oui, (int )oui_type, ies, ies_len); } if ((unsigned long )vendor_ie != (unsigned long )((u8 const *)0U)) { if ((unsigned long )*ie_ptr == (unsigned long )((struct mwifiex_ie *)0)) { { tmp = kzalloc(262UL, 208U); *ie_ptr = (struct mwifiex_ie *)tmp; } if ((unsigned long )*ie_ptr == (unsigned long )((struct mwifiex_ie *)0)) { return (-12); } else { } ie = *ie_ptr; } else { } { vs_ie = (struct ieee_types_header *)vendor_ie; memcpy((void *)(& ie->ie_buffer) + (unsigned long )ie->ie_length, (void const *)vs_ie, (size_t )((int )vs_ie->len + 2)); le16_add_cpu(& ie->ie_length, (int )((unsigned int )((u16 )vs_ie->len) + 2U)); ie->mgmt_subtype_mask = mask; ie->ie_index = 65535U; } } else { } *ie_ptr = ie; return (0); } } static int mwifiex_set_mgmt_beacon_data_ies(struct mwifiex_private *priv , struct cfg80211_beacon_data *data ) { struct mwifiex_ie *beacon_ie ; struct mwifiex_ie *pr_ie ; struct mwifiex_ie *ar_ie ; u16 beacon_idx ; u16 pr_idx ; u16 ar_idx ; int ret ; { beacon_ie = (struct mwifiex_ie *)0; pr_ie = (struct mwifiex_ie *)0; ar_ie = (struct mwifiex_ie *)0; beacon_idx = 65535U; pr_idx = 65535U; ar_idx = 65535U; ret = 0; if ((unsigned long )data->beacon_ies != (unsigned long )((u8 const *)0U) && data->beacon_ies_len != 0UL) { { mwifiex_update_vs_ie(data->beacon_ies, (int )data->beacon_ies_len, & beacon_ie, 256, 20722U, 4); mwifiex_update_vs_ie(data->beacon_ies, (int )data->beacon_ies_len, & beacon_ie, 256, 5271450U, 9); } } else { } if ((unsigned long )data->proberesp_ies != (unsigned long )((u8 const *)0U) && data->proberesp_ies_len != 0UL) { { mwifiex_update_vs_ie(data->proberesp_ies, (int )data->proberesp_ies_len, & pr_ie, 32, 20722U, 4); mwifiex_update_vs_ie(data->proberesp_ies, (int )data->proberesp_ies_len, & pr_ie, 32, 5271450U, 9); } } else { } if ((unsigned long )data->assocresp_ies != (unsigned long )((u8 const *)0U) && data->assocresp_ies_len != 0UL) { { mwifiex_update_vs_ie(data->assocresp_ies, (int )data->assocresp_ies_len, & ar_ie, 10, 20722U, 4); mwifiex_update_vs_ie(data->assocresp_ies, (int )data->assocresp_ies_len, & ar_ie, 10, 5271450U, 9); } } else { } if (((unsigned long )beacon_ie != (unsigned long )((struct mwifiex_ie *)0) || (unsigned long )pr_ie != (unsigned long )((struct mwifiex_ie *)0)) || (unsigned long )ar_ie != (unsigned long )((struct mwifiex_ie *)0)) { { ret = mwifiex_update_uap_custom_ie(priv, beacon_ie, & beacon_idx, pr_ie, & pr_idx, ar_ie, & ar_idx); } if (ret != 0) { goto done; } else { } } else { } priv->beacon_idx = beacon_idx; priv->proberesp_idx = pr_idx; priv->assocresp_idx = ar_idx; done: { kfree((void const *)beacon_ie); kfree((void const *)pr_ie); kfree((void const *)ar_ie); } return (ret); } } int mwifiex_set_mgmt_ies(struct mwifiex_private *priv , struct cfg80211_beacon_data *info___0 ) { struct mwifiex_ie *gen_ie ; struct ieee_types_header *rsn_ie ; struct ieee_types_header *wpa_ie ; u16 rsn_idx ; u16 ie_len ; u8 const *vendor_ie ; void *tmp ; u8 const *tmp___0 ; int tmp___1 ; int tmp___2 ; { wpa_ie = (struct ieee_types_header *)0; rsn_idx = 65535U; ie_len = 0U; if ((unsigned long )info___0->tail != (unsigned long )((u8 const *)0U) && info___0->tail_len != 0UL) { { tmp = kzalloc(262UL, 208U); gen_ie = (struct mwifiex_ie *)tmp; } if ((unsigned long )gen_ie == (unsigned long )((struct mwifiex_ie *)0)) { return (-12); } else { } { gen_ie->ie_index = rsn_idx; gen_ie->mgmt_subtype_mask = 290U; tmp___0 = cfg80211_find_ie(48, info___0->tail, (int )info___0->tail_len); rsn_ie = (struct ieee_types_header *)tmp___0; } if ((unsigned long )rsn_ie != (unsigned long )((struct ieee_types_header *)0)) { { memcpy((void *)(& gen_ie->ie_buffer), (void const *)rsn_ie, (size_t )((int )rsn_ie->len + 2)); ie_len = (unsigned int )((u16 )rsn_ie->len) + 2U; gen_ie->ie_length = ie_len; } } else { } { vendor_ie = cfg80211_find_vendor_ie(20722U, 1, info___0->tail, (int )info___0->tail_len); } if ((unsigned long )vendor_ie != (unsigned long )((u8 const *)0U)) { { wpa_ie = (struct ieee_types_header *)vendor_ie; memcpy((void *)(& gen_ie->ie_buffer) + (unsigned long )ie_len, (void const *)wpa_ie, (size_t )((int )wpa_ie->len + 2)); ie_len = (unsigned int )((int )ie_len + (int )((u16 )wpa_ie->len)) + 2U; gen_ie->ie_length = ie_len; } } else { } if ((unsigned long )rsn_ie != (unsigned long )((struct ieee_types_header *)0) || (unsigned long )wpa_ie != (unsigned long )((struct ieee_types_header *)0)) { { tmp___1 = mwifiex_update_uap_custom_ie(priv, gen_ie, & rsn_idx, (struct mwifiex_ie *)0, (u16 *)0U, (struct mwifiex_ie *)0, (u16 *)0U); } if (tmp___1 != 0) { { kfree((void const *)gen_ie); } return (-1); } else { } priv->rsn_idx = rsn_idx; } else { } { kfree((void const *)gen_ie); } } else { } { tmp___2 = mwifiex_set_mgmt_beacon_data_ies(priv, info___0); } return (tmp___2); } } int mwifiex_del_mgmt_ies(struct mwifiex_private *priv ) { struct mwifiex_ie *beacon_ie ; struct mwifiex_ie *pr_ie ; struct mwifiex_ie *ar_ie ; struct mwifiex_ie *rsn_ie ; int ret ; void *tmp ; int tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; { beacon_ie = (struct mwifiex_ie *)0; pr_ie = (struct mwifiex_ie *)0; ar_ie = (struct mwifiex_ie *)0; rsn_ie = (struct mwifiex_ie *)0; ret = 0; if ((unsigned int )priv->rsn_idx != 65535U) { { tmp = kmalloc(262UL, 208U); rsn_ie = (struct mwifiex_ie *)tmp; } if ((unsigned long )rsn_ie == (unsigned long )((struct mwifiex_ie *)0)) { return (-12); } else { } { rsn_ie->ie_index = priv->rsn_idx; rsn_ie->mgmt_subtype_mask = 0U; rsn_ie->ie_length = 0U; tmp___0 = mwifiex_update_uap_custom_ie(priv, rsn_ie, & priv->rsn_idx, (struct mwifiex_ie *)0, & priv->proberesp_idx, (struct mwifiex_ie *)0, & priv->assocresp_idx); } if (tmp___0 != 0) { ret = -1; goto done; } else { } priv->rsn_idx = 65535U; } else { } if ((unsigned int )priv->beacon_idx != 65535U) { { tmp___1 = kmalloc(262UL, 208U); beacon_ie = (struct mwifiex_ie *)tmp___1; } if ((unsigned long )beacon_ie == (unsigned long )((struct mwifiex_ie *)0)) { ret = -12; goto done; } else { } beacon_ie->ie_index = priv->beacon_idx; beacon_ie->mgmt_subtype_mask = 0U; beacon_ie->ie_length = 0U; } else { } if ((unsigned int )priv->proberesp_idx != 65535U) { { tmp___2 = kmalloc(262UL, 208U); pr_ie = (struct mwifiex_ie *)tmp___2; } if ((unsigned long )pr_ie == (unsigned long )((struct mwifiex_ie *)0)) { ret = -12; goto done; } else { } pr_ie->ie_index = priv->proberesp_idx; pr_ie->mgmt_subtype_mask = 0U; pr_ie->ie_length = 0U; } else { } if ((unsigned int )priv->assocresp_idx != 65535U) { { tmp___3 = kmalloc(262UL, 208U); ar_ie = (struct mwifiex_ie *)tmp___3; } if ((unsigned long )ar_ie == (unsigned long )((struct mwifiex_ie *)0)) { ret = -12; goto done; } else { } ar_ie->ie_index = priv->assocresp_idx; ar_ie->mgmt_subtype_mask = 0U; ar_ie->ie_length = 0U; } else { } if (((unsigned long )beacon_ie != (unsigned long )((struct mwifiex_ie *)0) || (unsigned long )pr_ie != (unsigned long )((struct mwifiex_ie *)0)) || (unsigned long )ar_ie != (unsigned long )((struct mwifiex_ie *)0)) { { ret = mwifiex_update_uap_custom_ie(priv, beacon_ie, & priv->beacon_idx, pr_ie, & priv->proberesp_idx, ar_ie, & priv->assocresp_idx); } } else { } done: { kfree((void const *)beacon_ie); kfree((void const *)pr_ie); kfree((void const *)ar_ie); kfree((void const *)rsn_ie); } return (ret); } } static void mwifiex_process_cmdresp_error(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct cmd_ctrl_node *cmd_node ; struct cmd_ctrl_node *tmp_node ; struct mwifiex_adapter *adapter ; struct host_cmd_ds_802_11_ps_mode_enh *pm ; unsigned long flags ; raw_spinlock_t *tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr___1 ; raw_spinlock_t *tmp___1 ; raw_spinlock_t *tmp___2 ; { { cmd_node = (struct cmd_ctrl_node *)0; adapter = priv->adapter; dev_err((struct device const *)adapter->dev, "CMD_RESP: cmd %#x error, result=%#x\n", (int )resp->command, (int )resp->result); } if ((adapter->curr_cmd)->wait_q_enabled != 0U) { adapter->cmd_wait_q.status = -1; } else { } { if ((int )resp->command == 228) { goto case_228; } else { } if ((int )resp->command == 6) { goto case_6; } else { } if ((int )resp->command == 40) { goto case_40; } else { } goto switch_default; case_228: /* CIL Label */ { pm = & resp->params.psmode_enh; dev_err((struct device const *)adapter->dev, "PS_MODE_ENH cmd failed: result=0x%x action=0x%X\n", (int )resp->result, (int )pm->action); } if (((unsigned int )pm->action == 255U && ((int )pm->params.ps_bitmap & 16) != 0) && priv->bss_mode == 1U) { adapter->ps_mode = 0U; } else { } goto ldv_54560; case_6: /* CIL Label */ { tmp = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp); __mptr = (struct list_head const *)adapter->scan_pending_q.next; cmd_node = (struct cmd_ctrl_node *)__mptr; __mptr___0 = (struct list_head const *)cmd_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___0; } goto ldv_54575; ldv_54574: { list_del(& cmd_node->list); spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); mwifiex_insert_cmd_to_free_q(adapter, cmd_node); tmp___0 = spinlock_check(& adapter->scan_pending_q_lock); flags = _raw_spin_lock_irqsave(tmp___0); cmd_node = tmp_node; __mptr___1 = (struct list_head const *)tmp_node->list.next; tmp_node = (struct cmd_ctrl_node *)__mptr___1; } ldv_54575: ; if ((unsigned long )(& cmd_node->list) != (unsigned long )(& adapter->scan_pending_q)) { goto ldv_54574; } else { } { spin_unlock_irqrestore(& adapter->scan_pending_q_lock, flags); tmp___1 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___1); adapter->scan_processing = 0U; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } if ((unsigned int )priv->report_scan_result != 0U) { priv->report_scan_result = 0U; } else { } goto ldv_54560; case_40: /* CIL Label */ ; goto ldv_54560; switch_default: /* CIL Label */ ; goto ldv_54560; switch_break: /* CIL Label */ ; } ldv_54560: { mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); tmp___2 = spinlock_check(& adapter->mwifiex_cmd_lock); flags = _raw_spin_lock_irqsave(tmp___2); adapter->curr_cmd = (struct cmd_ctrl_node *)0; spin_unlock_irqrestore(& adapter->mwifiex_cmd_lock, flags); } return; } } static int mwifiex_ret_802_11_rssi_info(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11_rssi_info_rsp *rssi_info_rsp ; struct mwifiex_ds_misc_subsc_evt *subsc_evt ; long ret ; int __x___0 ; long ret___0 ; int __x___2 ; long ret___1 ; int __x___4 ; long ret___2 ; int __x___6 ; { rssi_info_rsp = & resp->params.rssi_info_rsp; subsc_evt = & priv->async_subsc_evt_storage; priv->data_rssi_last = (s16 )rssi_info_rsp->data_rssi_last; priv->data_nf_last = (s16 )rssi_info_rsp->data_nf_last; priv->data_rssi_avg = (s16 )rssi_info_rsp->data_rssi_avg; priv->data_nf_avg = (s16 )rssi_info_rsp->data_nf_avg; priv->bcn_rssi_last = (s16 )rssi_info_rsp->bcn_rssi_last; priv->bcn_nf_last = (s16 )rssi_info_rsp->bcn_nf_last; priv->bcn_rssi_avg = (s16 )rssi_info_rsp->bcn_rssi_avg; priv->bcn_nf_avg = (s16 )rssi_info_rsp->bcn_nf_avg; if ((unsigned int )priv->subsc_evt_rssi_state == 0U) { return (0); } else { } { memset((void *)subsc_evt, 0, 8UL); subsc_evt->events = 17U; subsc_evt->action = 2U; } if ((unsigned int )priv->subsc_evt_rssi_state == 1U) { __x___0 = (int )((u32 )priv->bcn_rssi_avg - priv->cqm_rssi_hyst); ret = (long )(__x___0 < 0 ? - __x___0 : __x___0); subsc_evt->bcn_l_rssi_cfg.abs_value = (u8 )ret; __x___2 = priv->cqm_rssi_thold; ret___0 = (long )(__x___2 < 0 ? - __x___2 : __x___2); subsc_evt->bcn_h_rssi_cfg.abs_value = (u8 )ret___0; } else if ((unsigned int )priv->subsc_evt_rssi_state == 2U) { __x___4 = priv->cqm_rssi_thold; ret___1 = (long )(__x___4 < 0 ? - __x___4 : __x___4); subsc_evt->bcn_l_rssi_cfg.abs_value = (u8 )ret___1; __x___6 = (int )((u32 )priv->bcn_rssi_avg + priv->cqm_rssi_hyst); ret___2 = (long )(__x___6 < 0 ? - __x___6 : __x___6); subsc_evt->bcn_h_rssi_cfg.abs_value = (u8 )ret___2; } else { } { subsc_evt->bcn_l_rssi_cfg.evt_freq = 1U; subsc_evt->bcn_h_rssi_cfg.evt_freq = 1U; priv->subsc_evt_rssi_state = 0U; mwifiex_send_cmd_async(priv, 117, 0, 0U, (void *)subsc_evt); } return (0); } } static int mwifiex_ret_802_11_snmp_mib(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , u32 *data_buf ) { struct host_cmd_ds_802_11_snmp_mib *smib ; u16 oid ; u16 query_type ; u32 ul_temp ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; { { smib = & resp->params.smib; oid = smib->oid; query_type = smib->query_type; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_snmp_mib"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: SNMP_RESP: oid value = %#x, query_type = %#x, buf size = %#x\n"; descriptor.lineno = 189U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: SNMP_RESP: oid value = %#x, query_type = %#x, buf size = %#x\n", (int )oid, (int )query_type, (int )smib->buf_size); } } else { } if ((unsigned int )query_type == 0U) { ul_temp = (u32 )*((__le16 *)(& smib->value)); if ((unsigned long )data_buf != (unsigned long )((u32 *)0U)) { *data_buf = ul_temp; } else { } { if ((int )oid == 8) { goto case_8; } else { } if ((int )oid == 5) { goto case_5; } else { } if ((int )oid == 6) { goto case_6; } else { } if ((int )oid == 3) { goto case_3; } else { } goto switch_default; case_8: /* CIL Label */ { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_802_11_snmp_mib"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___0.format = "info: SNMP_RESP: FragThsd =%u\n"; descriptor___0.lineno = 197U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: SNMP_RESP: FragThsd =%u\n", ul_temp); } } else { } goto ldv_54620; case_5: /* CIL Label */ { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_ret_802_11_snmp_mib"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___1.format = "info: SNMP_RESP: RTSThsd =%u\n"; descriptor___1.lineno = 201U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: SNMP_RESP: RTSThsd =%u\n", ul_temp); } } else { } goto ldv_54620; case_6: /* CIL Label */ { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_ret_802_11_snmp_mib"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___2.format = "info: SNMP_RESP: TxRetryCount=%u\n"; descriptor___2.lineno = 205U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)(priv->adapter)->dev, "info: SNMP_RESP: TxRetryCount=%u\n", ul_temp); } } else { } goto ldv_54620; case_3: /* CIL Label */ { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_ret_802_11_snmp_mib"; descriptor___3.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___3.format = "info: SNMP_RESP: DTIM period=%u\n"; descriptor___3.lineno = 209U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)(priv->adapter)->dev, "info: SNMP_RESP: DTIM period=%u\n", ul_temp); } } else { } switch_default: /* CIL Label */ ; goto ldv_54620; switch_break: /* CIL Label */ ; } ldv_54620: ; } else { } return (0); } } static int mwifiex_ret_get_log(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , struct mwifiex_ds_get_stats *stats ) { struct host_cmd_ds_802_11_get_log *get_log ; { get_log = & resp->params.get_log; if ((unsigned long )stats != (unsigned long )((struct mwifiex_ds_get_stats *)0)) { stats->mcast_tx_frame = get_log->mcast_tx_frame; stats->failed = get_log->failed; stats->retry = get_log->retry; stats->multi_retry = get_log->multi_retry; stats->frame_dup = get_log->frame_dup; stats->rts_success = get_log->rts_success; stats->rts_failure = get_log->rts_failure; stats->ack_failure = get_log->ack_failure; stats->rx_frag = get_log->rx_frag; stats->mcast_rx_frame = get_log->mcast_rx_frame; stats->fcs_error = get_log->fcs_error; stats->tx_frame = get_log->tx_frame; stats->wep_icv_error[0] = get_log->wep_icv_err_cnt[0]; stats->wep_icv_error[1] = get_log->wep_icv_err_cnt[1]; stats->wep_icv_error[2] = get_log->wep_icv_err_cnt[2]; stats->wep_icv_error[3] = get_log->wep_icv_err_cnt[3]; } else { } return (0); } } static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_tx_rate_cfg *rate_cfg ; struct mwifiex_rate_scope *rate_scope ; struct mwifiex_ie_types_header *head ; u16 tlv ; u16 tlv_buf_len ; u16 tlv_buf_left ; u8 *tlv_buf ; u32 i ; int tmp ; { rate_cfg = & resp->params.tx_rate_cfg; tlv_buf = (u8 *)rate_cfg + 4UL; tlv_buf_left = (unsigned int )resp->size - 12U; goto ldv_54653; ldv_54652: head = (struct mwifiex_ie_types_header *)tlv_buf; tlv = head->type; tlv_buf_len = head->len; if ((unsigned long )tlv_buf_left < (unsigned long )tlv_buf_len + 4UL) { goto ldv_54646; } else { } { if ((int )tlv == 339) { goto case_339; } else { } goto switch_break; case_339: /* CIL Label */ rate_scope = (struct mwifiex_rate_scope *)tlv_buf; priv->bitmap_rates[0] = rate_scope->hr_dsss_rate_bitmap; priv->bitmap_rates[1] = rate_scope->ofdm_rate_bitmap; i = 0U; goto ldv_54649; ldv_54648: priv->bitmap_rates[i + 2U] = rate_scope->ht_mcs_rate_bitmap[i]; i = i + 1U; ldv_54649: ; if (i <= 7U) { goto ldv_54648; } else { } goto ldv_54651; switch_break: /* CIL Label */ ; } ldv_54651: tlv_buf = tlv_buf + ((unsigned long )tlv_buf_len + 4UL); tlv_buf_left = (unsigned int )((int )tlv_buf_left - (int )tlv_buf_len) - 4U; ldv_54653: ; if ((unsigned int )tlv_buf_left > 3U) { goto ldv_54652; } else { } ldv_54646: { priv->is_data_rate_auto = mwifiex_is_rate_auto(priv); } if ((unsigned int )priv->is_data_rate_auto != 0U) { priv->data_rate = 0U; } else { { tmp = mwifiex_send_cmd_async(priv, 127, 0, 0U, (void *)0); } return (tmp); } return (0); } } static int mwifiex_get_power_level(struct mwifiex_private *priv , void *data_buf ) { int length ; int max_power ; int min_power ; struct mwifiex_types_power_group *pg_tlv_hdr ; struct mwifiex_power_group *pg ; { max_power = -1; min_power = -1; if ((unsigned long )data_buf == (unsigned long )((void *)0)) { return (-1); } else { } pg_tlv_hdr = (struct mwifiex_types_power_group *)data_buf; pg = (struct mwifiex_power_group *)pg_tlv_hdr + 4U; length = (int )pg_tlv_hdr->length; if ((unsigned int )length <= 7U) { return (0); } else { } max_power = (int )pg->power_max; min_power = (int )pg->power_min; length = (int )((unsigned int )length - 8U); goto ldv_54664; ldv_54663: pg = pg + 1; if (max_power < (int )pg->power_max) { max_power = (int )pg->power_max; } else { } if (min_power > (int )pg->power_min) { min_power = (int )pg->power_min; } else { } length = (int )((unsigned int )length - 8U); ldv_54664: ; if ((unsigned int )length > 7U) { goto ldv_54663; } else { } priv->min_tx_power_level = (unsigned char )min_power; priv->max_tx_power_level = (unsigned char )max_power; return (0); } } static int mwifiex_ret_tx_power_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct mwifiex_adapter *adapter ; struct host_cmd_ds_txpwr_cfg *txp_cfg ; struct mwifiex_types_power_group *pg_tlv_hdr ; struct mwifiex_power_group *pg ; u16 action ; u16 tlv_buf_left ; struct _ddebug descriptor ; long tmp ; { adapter = priv->adapter; txp_cfg = & resp->params.txp_cfg; action = txp_cfg->action; pg_tlv_hdr = (struct mwifiex_types_power_group *)txp_cfg + 8U; pg = (struct mwifiex_power_group *)pg_tlv_hdr + 4U; tlv_buf_left = (unsigned int )resp->size - 16U; if ((unsigned long )tlv_buf_left < (unsigned long )pg_tlv_hdr->length + 4UL) { return (0); } else { } { if ((int )action == 0) { goto case_0; } else { } if ((int )action == 1) { goto case_1; } else { } goto switch_default; case_0: /* CIL Label */ ; if ((unsigned int )adapter->hw_status == 1U) { { mwifiex_get_power_level(priv, (void *)pg_tlv_hdr); } } else { } priv->tx_power_level = (unsigned short )pg->power_min; goto ldv_54677; case_1: /* CIL Label */ ; if (txp_cfg->mode == 0U) { goto ldv_54677; } else { } if ((int )pg->power_max == (int )pg->power_min) { priv->tx_power_level = (unsigned short )pg->power_min; } else { } goto ldv_54677; switch_default: /* CIL Label */ { dev_err((struct device const *)adapter->dev, "CMD_RESP: unknown cmd action %d\n", (int )action); } return (0); switch_break: /* CIL Label */ ; } ldv_54677: { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_tx_power_cfg"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: Current TxPower Level = %d, Max Power=%d, Min Power=%d\n"; descriptor.lineno = 423U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: Current TxPower Level = %d, Max Power=%d, Min Power=%d\n", (int )priv->tx_power_level, (int )priv->max_tx_power_level, (int )priv->min_tx_power_level); } } else { } return (0); } } static int mwifiex_ret_rf_tx_power(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_rf_tx_pwr *txp ; u16 action ; struct _ddebug descriptor ; long tmp ; { txp = & resp->params.txp; action = txp->action; priv->tx_power_level = txp->cur_level; if ((unsigned int )action == 0U) { priv->max_tx_power_level = txp->max_power; priv->min_tx_power_level = txp->min_power; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_rf_tx_power"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "Current TxPower Level=%d, Max Power=%d, Min Power=%d\n"; descriptor.lineno = 447U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "Current TxPower Level=%d, Max Power=%d, Min Power=%d\n", (int )priv->tx_power_level, (int )priv->max_tx_power_level, (int )priv->min_tx_power_level); } } else { } return (0); } } static int mwifiex_ret_rf_antenna(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_rf_ant_mimo *ant_mimo ; struct host_cmd_ds_rf_ant_siso *ant_siso ; struct mwifiex_adapter *adapter ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { ant_mimo = & resp->params.ant_mimo; ant_siso = & resp->params.ant_siso; adapter = priv->adapter; if ((unsigned int )adapter->hw_dev_mcs_support == 34U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_rf_antenna"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "RF_ANT_RESP: Tx action = 0x%x, Tx Mode = 0x%04x Rx action = 0x%x, Rx Mode = 0x%04x\n"; descriptor.lineno = 469U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "RF_ANT_RESP: Tx action = 0x%x, Tx Mode = 0x%04x Rx action = 0x%x, Rx Mode = 0x%04x\n", (int )ant_mimo->action_tx, (int )ant_mimo->tx_ant_mode, (int )ant_mimo->action_rx, (int )ant_mimo->rx_ant_mode); } } else { } } else { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_rf_antenna"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___0.format = "RF_ANT_RESP: action = 0x%x, Mode = 0x%04x\n"; descriptor___0.lineno = 474U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "RF_ANT_RESP: action = 0x%x, Mode = 0x%04x\n", (int )ant_siso->action, (int )ant_siso->ant_mode); } } else { } } return (0); } } static int mwifiex_ret_802_11_mac_address(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11_mac_address *cmd_mac_addr ; struct _ddebug descriptor ; long tmp ; { { cmd_mac_addr = & resp->params.mac_addr; memcpy((void *)(& priv->curr_addr), (void const *)(& cmd_mac_addr->mac_addr), 6UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_mac_address"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: set mac address: %pM\n"; descriptor.lineno = 493U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: set mac address: %pM\n", (u8 *)(& priv->curr_addr)); } } else { } return (0); } } static int mwifiex_ret_mac_multicast_adr(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { { return (0); } } static int mwifiex_ret_802_11_tx_rate_query(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { { priv->tx_rate = resp->params.tx_rate.tx_rate; priv->tx_htinfo = resp->params.tx_rate.ht_info; if ((unsigned int )priv->is_data_rate_auto == 0U) { { priv->data_rate = mwifiex_index_to_data_rate(priv, (int )priv->tx_rate, (int )priv->tx_htinfo); } } else { } return (0); } } static int mwifiex_ret_802_11_deauthenticate(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct mwifiex_adapter *adapter ; int tmp ; { { adapter = priv->adapter; adapter->dbg.num_cmd_deauth = adapter->dbg.num_cmd_deauth + 1U; tmp = memcmp((void const *)(& resp->params.deauth.mac_addr), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); } if (tmp == 0) { { mwifiex_reset_connect_state(priv, 3); } } else { } return (0); } } static int mwifiex_ret_802_11_ad_hoc_stop(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { { { mwifiex_reset_connect_state(priv, 3); } return (0); } } static int mwifiex_ret_802_11_key_material(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11_key_material *key ; struct _ddebug descriptor ; long tmp ; { key = & resp->params.key_material; if ((unsigned int )key->action == 1U) { if ((int )key->key_param_set.key_info & 1) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11_key_material"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: key: GTK is set\n"; descriptor.lineno = 577U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: key: GTK is set\n"); } } else { } priv->wpa_is_gtk_set = 1U; priv->scan_block = 0U; } else { } } else { } { memset((void *)(& priv->aes_key.key_param_set.key), 0, 50UL); priv->aes_key.key_param_set.key_len = key->key_param_set.key_len; memcpy((void *)(& priv->aes_key.key_param_set.key), (void const *)(& key->key_param_set.key), (size_t )priv->aes_key.key_param_set.key_len); } return (0); } } static int mwifiex_ret_802_11d_domain_info(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11d_domain_info_rsp *domain_info ; struct mwifiex_ietypes_domain_param_set *domain ; u16 action ; u8 no_of_triplet ; struct _ddebug descriptor ; long tmp ; { { domain_info = & resp->params.domain_info_resp; domain = & domain_info->domain; action = domain_info->action; no_of_triplet = (unsigned char )((unsigned long )((int )domain->header.len + -3) / 3UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_802_11d_domain_info"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: 11D Domain Info Resp: no_of_triplet=%d\n"; descriptor.lineno = 610U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: 11D Domain Info Resp: no_of_triplet=%d\n", (int )no_of_triplet); } } else { } if ((unsigned int )no_of_triplet > 83U) { { dev_warn((struct device const *)(priv->adapter)->dev, "11D: invalid number of triplets %d returned\n", (int )no_of_triplet); } return (-1); } else { } { if ((int )action == 1) { goto case_1; } else { } if ((int )action == 0) { goto case_0; } else { } goto switch_default; case_1: /* CIL Label */ ; goto ldv_54742; case_0: /* CIL Label */ ; goto ldv_54742; switch_default: /* CIL Label */ { dev_err((struct device const *)(priv->adapter)->dev, "11D: invalid action:%d\n", (int )domain_info->action); } return (-1); switch_break: /* CIL Label */ ; } ldv_54742: ; return (0); } } static int mwifiex_ret_ver_ext(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , struct host_cmd_ds_version_ext *version_ext ) { struct host_cmd_ds_version_ext *ver_ext ; { ver_ext = & resp->params.verext; if ((unsigned long )version_ext != (unsigned long )((struct host_cmd_ds_version_ext *)0)) { { version_ext->version_str_sel = ver_ext->version_str_sel; memcpy((void *)(& version_ext->version_str), (void const *)(& ver_ext->version_str), 128UL); memcpy((void *)(& priv->version_str), (void const *)(& ver_ext->version_str), 128UL); } } else { } return (0); } } static int mwifiex_ret_remain_on_chan(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , struct host_cmd_ds_remain_on_chan *roc_cfg ) { struct host_cmd_ds_remain_on_chan *resp_cfg ; { resp_cfg = & resp->params.roc_cfg; if ((unsigned long )roc_cfg != (unsigned long )((struct host_cmd_ds_remain_on_chan *)0)) { { memcpy((void *)roc_cfg, (void const *)resp_cfg, 10UL); } } else { } return (0); } } static int mwifiex_ret_p2p_mode_cfg(struct mwifiex_private *priv , struct host_cmd_ds_command *resp , void *data_buf ) { struct host_cmd_ds_p2p_mode_cfg *mode_cfg ; { mode_cfg = & resp->params.mode_cfg; if ((unsigned long )data_buf != (unsigned long )((void *)0)) { *((u16 *)data_buf) = mode_cfg->mode; } else { } return (0); } } static int mwifiex_ret_reg_access(u16 type , struct host_cmd_ds_command *resp , void *data_buf ) { struct mwifiex_ds_reg_rw *reg_rw ; struct mwifiex_ds_read_eeprom *eeprom ; union reg r ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { if ((unsigned long )data_buf == (unsigned long )((void *)0)) { return (0); } else { } reg_rw = (struct mwifiex_ds_reg_rw *)data_buf; eeprom = (struct mwifiex_ds_read_eeprom *)data_buf; { if ((int )type == 25) { goto case_25; } else { } if ((int )type == 26) { goto case_26; } else { } if ((int )type == 27) { goto case_27; } else { } if ((int )type == 173) { goto case_173; } else { } if ((int )type == 237) { goto case_237; } else { } if ((int )type == 89) { goto case_89; } else { } goto switch_default; case_25: /* CIL Label */ r.mac = & resp->params.mac_reg; reg_rw->offset = (unsigned int )(r.mac)->offset; reg_rw->value = (r.mac)->value; goto ldv_54778; case_26: /* CIL Label */ r.bbp = & resp->params.bbp_reg; reg_rw->offset = (unsigned int )(r.bbp)->offset; reg_rw->value = (unsigned int )(r.bbp)->value; goto ldv_54778; case_27: /* CIL Label */ r.rf = & resp->params.rf_reg; reg_rw->offset = (unsigned int )(r.rf)->offset; reg_rw->value = (unsigned int )(r.bbp)->value; goto ldv_54778; case_173: /* CIL Label */ r.pmic = & resp->params.pmic_reg; reg_rw->offset = (unsigned int )(r.pmic)->offset; reg_rw->value = (unsigned int )(r.pmic)->value; goto ldv_54778; case_237: /* CIL Label */ r.rf = & resp->params.rf_reg; reg_rw->offset = (unsigned int )(r.rf)->offset; reg_rw->value = (unsigned int )(r.rf)->value; goto ldv_54778; case_89: /* CIL Label */ { r.eeprom = & resp->params.eeprom; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_reg_access"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: EEPROM read len=%x\n"; descriptor.lineno = 739U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_pr_debug(& descriptor, "mwifiex: info: EEPROM read len=%x\n", (int )(r.eeprom)->byte_count); } } else { } if ((int )eeprom->byte_count < (int )(r.eeprom)->byte_count) { { eeprom->byte_count = 0U; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_ret_reg_access"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___0.format = "info: EEPROM read length is too big\n"; descriptor___0.lineno = 743U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_pr_debug(& descriptor___0, "mwifiex: info: EEPROM read length is too big\n"); } } else { } return (-1); } else { } eeprom->offset = (r.eeprom)->offset; eeprom->byte_count = (r.eeprom)->byte_count; if ((unsigned int )eeprom->byte_count != 0U) { { memcpy((void *)(& eeprom->value), (void const *)(& (r.eeprom)->value), (size_t )(r.eeprom)->byte_count); } } else { } goto ldv_54778; switch_default: /* CIL Label */ ; return (-1); switch_break: /* CIL Label */ ; } ldv_54778: ; return (0); } } static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11_ibss_status *ibss_coal_resp ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; bool tmp___1 ; int tmp___2 ; { ibss_coal_resp = & resp->params.ibss_coalescing; if ((unsigned int )ibss_coal_resp->action == 1U) { return (0); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_ibss_coalescing_status"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: new BSSID %pM\n"; descriptor.lineno = 776U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: new BSSID %pM\n", (u8 *)(& ibss_coal_resp->bssid)); } } else { } { tmp___0 = is_zero_ether_addr((u8 const *)(& ibss_coal_resp->bssid)); } if ((int )tmp___0) { { dev_warn((struct device const *)(priv->adapter)->dev, "new BSSID is NULL\n"); } return (0); } else { } { tmp___1 = ether_addr_equal((u8 const *)(& priv->curr_bss_params.bss_descriptor.mac_address), (u8 const *)(& ibss_coal_resp->bssid)); } if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { { memcpy((void *)(& priv->curr_bss_params.bss_descriptor.mac_address), (void const *)(& ibss_coal_resp->bssid), 6UL); priv->curr_bss_params.bss_descriptor.beacon_period = ibss_coal_resp->beacon_interval; priv->curr_bss_params.bss_descriptor.erp_flags = (unsigned char )ibss_coal_resp->use_g_rate_protect; priv->adhoc_state = 3U; } } else { } return (0); } } static int mwifiex_ret_subsc_evt(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { struct host_cmd_ds_802_11_subsc_evt *cmd_sub_event ; struct _ddebug descriptor ; long tmp ; { { cmd_sub_event = & resp->params.subsc_evt; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_ret_subsc_evt"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "Bitmap of currently subscribed events: %16x\n"; descriptor.lineno = 816U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "Bitmap of currently subscribed events: %16x\n", (int )cmd_sub_event->events); } } else { } return (0); } } static int mwifiex_ret_cfg_data(struct mwifiex_private *priv , struct host_cmd_ds_command *resp ) { { if ((unsigned int )resp->result != 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "Cal data cmd resp failed\n"); } return (-1); } else { } return (0); } } int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv , u16 cmdresp_no , struct host_cmd_ds_command *resp ) { int ret ; struct mwifiex_adapter *adapter ; void *data_buf ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { ret = 0; adapter = priv->adapter; data_buf = (adapter->curr_cmd)->data_buf; if ((unsigned int )resp->result != 0U) { { mwifiex_process_cmdresp_error(priv, resp); } return (-1); } else { } { if ((int )cmdresp_no == 3) { goto case_3; } else { } if ((int )cmdresp_no == 143) { goto case_143; } else { } if ((int )cmdresp_no == 40) { goto case_40; } else { } if ((int )cmdresp_no == 77) { goto case_77; } else { } if ((int )cmdresp_no == 16) { goto case_16; } else { } if ((int )cmdresp_no == 214) { goto case_214; } else { } if ((int )cmdresp_no == 6) { goto case_6; } else { } if ((int )cmdresp_no == 108) { goto case_108; } else { } if ((int )cmdresp_no == 209) { goto case_209; } else { } if ((int )cmdresp_no == 30) { goto case_30; } else { } if ((int )cmdresp_no == 32) { goto case_32; } else { } if ((int )cmdresp_no == 228) { goto case_228; } else { } if ((int )cmdresp_no == 229) { goto case_229; } else { } if ((int )cmdresp_no == 18) { goto case_18; } else { } if ((int )cmdresp_no == 36) { goto case_36; } else { } if ((int )cmdresp_no == 43) { goto case_43; } else { } if ((int )cmdresp_no == 44) { goto case_44; } else { } if ((int )cmdresp_no == 64) { goto case_64; } else { } if ((int )cmdresp_no == 11) { goto case_11; } else { } if ((int )cmdresp_no == 164) { goto case_164; } else { } if ((int )cmdresp_no == 22) { goto case_22; } else { } if ((int )cmdresp_no == 127) { goto case_127; } else { } if ((int )cmdresp_no == 151) { goto case_151; } else { } if ((int )cmdresp_no == 269) { goto case_269; } else { } if ((int )cmdresp_no == 274) { goto case_274; } else { } if ((int )cmdresp_no == 235) { goto case_235; } else { } if ((int )cmdresp_no == 268) { goto case_268; } else { } if ((int )cmdresp_no == 169) { goto case_169; } else { } if ((int )cmdresp_no == 170) { goto case_170; } else { } if ((int )cmdresp_no == 94) { goto case_94; } else { } if ((int )cmdresp_no == 91) { goto case_91; } else { } if ((int )cmdresp_no == 206) { goto case_206; } else { } if ((int )cmdresp_no == 208) { goto case_208; } else { } if ((int )cmdresp_no == 207) { goto case_207; } else { } if ((int )cmdresp_no == 217) { goto case_217; } else { } if ((int )cmdresp_no == 223) { goto case_223; } else { } if ((int )cmdresp_no == 113) { goto case_113; } else { } if ((int )cmdresp_no == 131) { goto case_131; } else { } if ((int )cmdresp_no == 25) { goto case_25; } else { } if ((int )cmdresp_no == 26) { goto case_26; } else { } if ((int )cmdresp_no == 27) { goto case_27; } else { } if ((int )cmdresp_no == 173) { goto case_173; } else { } if ((int )cmdresp_no == 237) { goto case_237; } else { } if ((int )cmdresp_no == 89) { goto case_89; } else { } if ((int )cmdresp_no == 247) { goto case_247; } else { } if ((int )cmdresp_no == 205) { goto case_205; } else { } if ((int )cmdresp_no == 250) { goto case_250; } else { } if ((int )cmdresp_no == 117) { goto case_117; } else { } if ((int )cmdresp_no == 176) { goto case_176; } else { } if ((int )cmdresp_no == 177) { goto case_177; } else { } if ((int )cmdresp_no == 178) { goto case_178; } else { } if ((int )cmdresp_no == 181) { goto case_181; } else { } if ((int )cmdresp_no == 154) { goto case_154; } else { } if ((int )cmdresp_no == 266) { goto case_266; } else { } goto switch_default; case_3: /* CIL Label */ { ret = mwifiex_ret_get_hw_spec(priv, resp); } goto ldv_54815; case_143: /* CIL Label */ { ret = mwifiex_ret_cfg_data(priv, resp); } goto ldv_54815; case_40: /* CIL Label */ ; goto ldv_54815; case_77: /* CIL Label */ { ret = mwifiex_ret_802_11_mac_address(priv, resp); } goto ldv_54815; case_16: /* CIL Label */ { ret = mwifiex_ret_mac_multicast_adr(priv, resp); } goto ldv_54815; case_214: /* CIL Label */ { ret = mwifiex_ret_tx_rate_cfg(priv, resp); } goto ldv_54815; case_6: /* CIL Label */ { ret = mwifiex_ret_802_11_scan(priv, resp); (adapter->curr_cmd)->wait_q_enabled = 0U; } goto ldv_54815; case_108: /* CIL Label */ { ret = mwifiex_ret_802_11_scan(priv, resp); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_sta_cmdresp"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor.format = "info: CMD_RESP: BG_SCAN result is ready!\n"; descriptor.lineno = 877U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: CMD_RESP: BG_SCAN result is ready!\n"); } } else { } goto ldv_54815; case_209: /* CIL Label */ { ret = mwifiex_ret_tx_power_cfg(priv, resp); } goto ldv_54815; case_30: /* CIL Label */ { ret = mwifiex_ret_rf_tx_power(priv, resp); } goto ldv_54815; case_32: /* CIL Label */ { ret = mwifiex_ret_rf_antenna(priv, resp); } goto ldv_54815; case_228: /* CIL Label */ { ret = mwifiex_ret_enh_power_mode(priv, resp, (struct mwifiex_ds_pm_cfg *)data_buf); } goto ldv_54815; case_229: /* CIL Label */ { ret = mwifiex_ret_802_11_hs_cfg(priv, resp); } goto ldv_54815; case_18: /* CIL Label */ { ret = mwifiex_ret_802_11_associate(priv, resp); } goto ldv_54815; case_36: /* CIL Label */ { ret = mwifiex_ret_802_11_deauthenticate(priv, resp); } goto ldv_54815; case_43: /* CIL Label */ ; case_44: /* CIL Label */ { ret = mwifiex_ret_802_11_ad_hoc(priv, resp); } goto ldv_54815; case_64: /* CIL Label */ { ret = mwifiex_ret_802_11_ad_hoc_stop(priv, resp); } goto ldv_54815; case_11: /* CIL Label */ { ret = mwifiex_ret_get_log(priv, resp, (struct mwifiex_ds_get_stats *)data_buf); } goto ldv_54815; case_164: /* CIL Label */ { ret = mwifiex_ret_802_11_rssi_info(priv, resp); } goto ldv_54815; case_22: /* CIL Label */ { ret = mwifiex_ret_802_11_snmp_mib(priv, resp, (u32 *)data_buf); } goto ldv_54815; case_127: /* CIL Label */ { ret = mwifiex_ret_802_11_tx_rate_query(priv, resp); } goto ldv_54815; case_151: /* CIL Label */ { ret = mwifiex_ret_ver_ext(priv, resp, (struct host_cmd_ds_version_ext *)data_buf); } goto ldv_54815; case_269: /* CIL Label */ { ret = mwifiex_ret_remain_on_chan(priv, resp, (struct host_cmd_ds_remain_on_chan *)data_buf); } goto ldv_54815; case_274: /* CIL Label */ ; goto ldv_54815; case_235: /* CIL Label */ { ret = mwifiex_ret_p2p_mode_cfg(priv, resp, data_buf); } goto ldv_54815; case_268: /* CIL Label */ ; case_169: /* CIL Label */ ; case_170: /* CIL Label */ ; goto ldv_54815; case_94: /* CIL Label */ { ret = mwifiex_ret_802_11_key_material(priv, resp); } goto ldv_54815; case_91: /* CIL Label */ { ret = mwifiex_ret_802_11d_domain_info(priv, resp); } goto ldv_54815; case_206: /* CIL Label */ { ret = mwifiex_ret_11n_addba_req(priv, resp); } goto ldv_54815; case_208: /* CIL Label */ { ret = mwifiex_ret_11n_delba(priv, resp); } goto ldv_54815; case_207: /* CIL Label */ { ret = mwifiex_ret_11n_addba_resp(priv, resp); } goto ldv_54815; case_217: /* CIL Label */ { adapter->tx_buf_size = resp->params.tx_buf.buff_size; adapter->tx_buf_size = (unsigned int )((u16 )((unsigned int )adapter->tx_buf_size / 256U)) * 256U; adapter->curr_tx_buf_size = adapter->tx_buf_size; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_process_sta_cmdresp"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_cmdresp.c"; descriptor___0.format = "cmd: curr_tx_buf_size=%d\n"; descriptor___0.lineno = 957U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "cmd: curr_tx_buf_size=%d\n", (int )adapter->curr_tx_buf_size); } } else { } if ((unsigned long )adapter->if_ops.update_mp_end_port != (unsigned long )((void (*)(struct mwifiex_adapter * , u16 ))0)) { { (*(adapter->if_ops.update_mp_end_port))(adapter, (int )resp->params.tx_buf.mp_end_port); } } else { } goto ldv_54815; case_223: /* CIL Label */ ; goto ldv_54815; case_113: /* CIL Label */ { ret = mwifiex_ret_wmm_get_status(priv, (struct host_cmd_ds_command const *)resp); } goto ldv_54815; case_131: /* CIL Label */ { ret = mwifiex_ret_ibss_coalescing_status(priv, resp); } goto ldv_54815; case_25: /* CIL Label */ ; case_26: /* CIL Label */ ; case_27: /* CIL Label */ ; case_173: /* CIL Label */ ; case_237: /* CIL Label */ ; case_89: /* CIL Label */ { ret = mwifiex_ret_reg_access((int )cmdresp_no, resp, data_buf); } goto ldv_54815; case_247: /* CIL Label */ ; goto ldv_54815; case_205: /* CIL Label */ ; goto ldv_54815; case_250: /* CIL Label */ ; goto ldv_54815; case_117: /* CIL Label */ { ret = mwifiex_ret_subsc_evt(priv, resp); } goto ldv_54815; case_176: /* CIL Label */ ; goto ldv_54815; case_177: /* CIL Label */ priv->bss_started = 1U; goto ldv_54815; case_178: /* CIL Label */ priv->bss_started = 0U; goto ldv_54815; case_181: /* CIL Label */ ; goto ldv_54815; case_154: /* CIL Label */ ; goto ldv_54815; case_266: /* CIL Label */ ; goto ldv_54815; switch_default: /* CIL Label */ { dev_err((struct device const *)adapter->dev, "CMD_RESP: unknown cmd response %#x\n", (int )resp->command); } goto ldv_54815; switch_break: /* CIL Label */ ; } ldv_54815: ; return (ret); } } extern void cfg80211_michael_mic_failure(struct net_device * , u8 const * , enum nl80211_key_type , int , u8 const * , gfp_t ) ; extern void cfg80211_remain_on_channel_expired(struct wireless_dev * , u64 , struct ieee80211_channel * , gfp_t ) ; extern void cfg80211_cqm_rssi_notify(struct net_device * , enum nl80211_cqm_rssi_threshold_event , gfp_t ) ; void mwifiex_reset_connect_state(struct mwifiex_private *priv , u16 reason_code ) { struct mwifiex_adapter *adapter ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; bool tmp___3 ; { adapter = priv->adapter; if ((unsigned int )priv->media_connected == 0U) { return; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_reset_connect_state"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor.format = "info: handles disconnect event\n"; descriptor.lineno = 51U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: handles disconnect event\n"); } } else { } { priv->media_connected = 0U; priv->scan_block = 0U; mwifiex_clean_txrx(priv); priv->data_rssi_last = 0; priv->data_nf_last = 0; priv->data_rssi_avg = 0; priv->data_nf_avg = 0; priv->bcn_rssi_last = 0; priv->bcn_nf_last = 0; priv->bcn_rssi_avg = 0; priv->bcn_nf_avg = 0; priv->rxpd_rate = 0U; priv->rxpd_htinfo = 0U; priv->sec_info.wpa_enabled = 0U; priv->sec_info.wpa2_enabled = 0U; priv->wpa_ie_len = 0U; priv->sec_info.wapi_enabled = 0U; priv->wapi_ie_len = 0U; priv->sec_info.wapi_key_on = 0U; priv->sec_info.encryption_mode = 0U; priv->is_data_rate_auto = 1U; priv->data_rate = 0U; } if (priv->bss_mode == 1U) { priv->adhoc_state = 0U; priv->adhoc_is_link_sensed = 0U; } else { } { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_reset_connect_state"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___0.format = "info: previous SSID=%s, SSID len=%u\n"; descriptor___0.lineno = 96U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "info: previous SSID=%s, SSID len=%u\n", (u8 *)(& priv->prev_ssid.ssid), (int )priv->prev_ssid.ssid_len); } } else { } { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_reset_connect_state"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___1.format = "info: current SSID=%s, SSID len=%u\n"; descriptor___1.lineno = 100U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: current SSID=%s, SSID len=%u\n", (u8 *)(& priv->curr_bss_params.bss_descriptor.ssid.ssid), (int )priv->curr_bss_params.bss_descriptor.ssid.ssid_len); } } else { } { memcpy((void *)(& priv->prev_ssid), (void const *)(& priv->curr_bss_params.bss_descriptor.ssid), 33UL); memcpy((void *)(& priv->prev_bssid), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); memset((void *)(& priv->curr_bss_params), 0, 360UL); adapter->tx_lock_flag = 0U; adapter->pps_uapsd_mode = 0U; } if (adapter->num_cmd_timeout != 0U && (unsigned long )adapter->curr_cmd != (unsigned long )((struct cmd_ctrl_node *)0)) { return; } else { } { priv->media_connected = 0U; descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_reset_connect_state"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___2.format = "info: successfully disconnected from %pM: reason code %d\n"; descriptor___2.lineno = 120U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "info: successfully disconnected from %pM: reason code %d\n", (u8 *)(& priv->cfg_bssid), (int )reason_code); } } else { } if (priv->bss_mode == 2U || priv->bss_mode == 8U) { { cfg80211_disconnected(priv->netdev, (int )reason_code, (u8 *)0U, 0UL, 208U); } } else { } { memset((void *)(& priv->cfg_bssid), 0, 6UL); mwifiex_stop_net_dev_queue(priv->netdev, adapter); tmp___3 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___3) { { netif_carrier_off(priv->netdev); } } else { } return; } } int mwifiex_process_sta_event(struct mwifiex_private *priv ) { struct mwifiex_adapter *adapter ; int ret ; u32 eventcause ; u16 ctrl ; u16 reason_code ; struct _ddebug descriptor ; long tmp ; bool tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct _ddebug descriptor___1 ; long tmp___3 ; struct _ddebug descriptor___2 ; long tmp___4 ; struct _ddebug descriptor___3 ; long tmp___5 ; struct _ddebug descriptor___4 ; long tmp___6 ; struct _ddebug descriptor___5 ; long tmp___7 ; struct _ddebug descriptor___6 ; long tmp___8 ; struct _ddebug descriptor___7 ; long tmp___9 ; int tmp___10 ; u8 tmp___11 ; struct _ddebug descriptor___8 ; long tmp___12 ; struct _ddebug descriptor___9 ; long tmp___13 ; struct _ddebug descriptor___10 ; long tmp___14 ; struct _ddebug descriptor___11 ; long tmp___15 ; struct _ddebug descriptor___12 ; long tmp___16 ; bool tmp___17 ; struct _ddebug descriptor___13 ; long tmp___18 ; struct _ddebug descriptor___14 ; long tmp___19 ; struct _ddebug descriptor___15 ; long tmp___20 ; struct _ddebug descriptor___16 ; long tmp___21 ; struct _ddebug descriptor___17 ; long tmp___22 ; struct _ddebug descriptor___18 ; long tmp___23 ; struct _ddebug descriptor___19 ; long tmp___24 ; struct _ddebug descriptor___20 ; long tmp___25 ; struct _ddebug descriptor___21 ; long tmp___26 ; struct _ddebug descriptor___22 ; long tmp___27 ; struct _ddebug descriptor___23 ; long tmp___28 ; struct _ddebug descriptor___24 ; long tmp___29 ; struct _ddebug descriptor___25 ; long tmp___30 ; struct _ddebug descriptor___26 ; long tmp___31 ; struct _ddebug descriptor___27 ; long tmp___32 ; struct _ddebug descriptor___28 ; long tmp___33 ; struct _ddebug descriptor___29 ; long tmp___34 ; struct _ddebug descriptor___30 ; long tmp___35 ; struct _ddebug descriptor___31 ; long tmp___36 ; u16 __min1 ; u16 __min2 ; struct _ddebug descriptor___32 ; long tmp___37 ; struct _ddebug descriptor___33 ; long tmp___38 ; struct _ddebug descriptor___34 ; long tmp___39 ; struct _ddebug descriptor___35 ; long tmp___40 ; struct _ddebug descriptor___36 ; long tmp___41 ; struct _ddebug descriptor___37 ; long tmp___42 ; unsigned long tmp___43 ; struct _ddebug descriptor___38 ; long tmp___44 ; { adapter = priv->adapter; ret = 0; eventcause = adapter->event_cause; { if (eventcause == 1U) { goto case_1; } else { } if (eventcause == 4U) { goto case_4; } else { } if (eventcause == 8U) { goto case_8; } else { } if (eventcause == 9U) { goto case_9; } else { } if (eventcause == 3U) { goto case_3; } else { } if (eventcause == 11U) { goto case_11; } else { } if (eventcause == 10U) { goto case_10; } else { } if (eventcause == 16U) { goto case_16; } else { } if (eventcause == 71U) { goto case_71; } else { } if (eventcause == 14U) { goto case_14; } else { } if (eventcause == 13U) { goto case_13; } else { } if (eventcause == 6U) { goto case_6; } else { } if (eventcause == 7U) { goto case_7; } else { } if (eventcause == 17U) { goto case_17; } else { } if (eventcause == 24U) { goto case_24; } else { } if (eventcause == 43U) { goto case_43; } else { } if (eventcause == 23U) { goto case_23; } else { } if (eventcause == 25U) { goto case_25; } else { } if (eventcause == 26U) { goto case_26; } else { } if (eventcause == 27U) { goto case_27; } else { } if (eventcause == 28U) { goto case_28; } else { } if (eventcause == 29U) { goto case_29; } else { } if (eventcause == 36U) { goto case_36; } else { } if (eventcause == 37U) { goto case_37; } else { } if (eventcause == 38U) { goto case_38; } else { } if (eventcause == 39U) { goto case_39; } else { } if (eventcause == 40U) { goto case_40; } else { } if (eventcause == 49U) { goto case_49; } else { } if (eventcause == 30U) { goto case_30; } else { } if (eventcause == 51U) { goto case_51; } else { } if (eventcause == 52U) { goto case_52; } else { } if (eventcause == 55U) { goto case_55; } else { } if (eventcause == 66U) { goto case_66; } else { } if (eventcause == 70U) { goto case_70; } else { } if (eventcause == 72U) { goto case_72; } else { } if (eventcause == 77U) { goto case_77; } else { } if (eventcause == 95U) { goto case_95; } else { } if (eventcause == 80U) { goto case_80; } else { } goto switch_default; case_1: /* CIL Label */ { dev_err((struct device const *)adapter->dev, "invalid EVENT: DUMMY_HOST_WAKEUP_SIGNAL, ignore it\n"); } goto ldv_54556; case_4: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_sta_event"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor.format = "event: LINK_SENSED\n"; descriptor.lineno = 197U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "event: LINK_SENSED\n"); } } else { } { tmp___0 = netif_carrier_ok((struct net_device const *)priv->netdev); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { netif_carrier_on(priv->netdev); } } else { } { mwifiex_wake_up_net_dev_queue(priv->netdev, adapter); } goto ldv_54556; case_8: /* CIL Label */ { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_process_sta_event"; descriptor___0.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___0.format = "event: Deauthenticated\n"; descriptor___0.lineno = 204U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "event: Deauthenticated\n"); } } else { } if ((unsigned int )priv->wps.session_enable != 0U) { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_process_sta_event"; descriptor___1.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___1.format = "info: receive deauth event in wps session\n"; descriptor___1.lineno = 207U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "info: receive deauth event in wps session\n"); } } else { } goto ldv_54556; } else { } adapter->dbg.num_event_deauth = adapter->dbg.num_event_deauth + 1U; if ((unsigned int )priv->media_connected != 0U) { { reason_code = *((__le16 *)(& adapter->event_body)); mwifiex_reset_connect_state(priv, (int )reason_code); } } else { } goto ldv_54556; case_9: /* CIL Label */ { descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_process_sta_event"; descriptor___2.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___2.format = "event: Disassociated\n"; descriptor___2.lineno = 219U; descriptor___2.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "event: Disassociated\n"); } } else { } if ((unsigned int )priv->wps.session_enable != 0U) { { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_process_sta_event"; descriptor___3.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___3.format = "info: receive disassoc event in wps session\n"; descriptor___3.lineno = 222U; descriptor___3.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "info: receive disassoc event in wps session\n"); } } else { } goto ldv_54556; } else { } adapter->dbg.num_event_disassoc = adapter->dbg.num_event_disassoc + 1U; if ((unsigned int )priv->media_connected != 0U) { { reason_code = *((__le16 *)(& adapter->event_body)); mwifiex_reset_connect_state(priv, (int )reason_code); } } else { } goto ldv_54556; case_3: /* CIL Label */ { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_process_sta_event"; descriptor___4.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___4.format = "event: Link lost\n"; descriptor___4.lineno = 234U; descriptor___4.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "event: Link lost\n"); } } else { } adapter->dbg.num_event_link_lost = adapter->dbg.num_event_link_lost + 1U; if ((unsigned int )priv->media_connected != 0U) { { reason_code = *((__le16 *)(& adapter->event_body)); mwifiex_reset_connect_state(priv, (int )reason_code); } } else { } goto ldv_54556; case_11: /* CIL Label */ { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_process_sta_event"; descriptor___5.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___5.format = "info: EVENT: SLEEP\n"; descriptor___5.lineno = 244U; descriptor___5.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___7 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "info: EVENT: SLEEP\n"); } } else { } { adapter->ps_state = 1U; mwifiex_check_ps_cond(adapter); } goto ldv_54556; case_10: /* CIL Label */ { descriptor___6.modname = "mwifiex"; descriptor___6.function = "mwifiex_process_sta_event"; descriptor___6.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___6.format = "info: EVENT: AWAKE\n"; descriptor___6.lineno = 252U; descriptor___6.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); } if (tmp___8 != 0L) { { __dynamic_dev_dbg(& descriptor___6, (struct device const *)adapter->dev, "info: EVENT: AWAKE\n"); } } else { } if (((unsigned int )adapter->pps_uapsd_mode == 0U && (unsigned int )priv->media_connected != 0U) && (unsigned int )adapter->sleep_period.period != 0U) { { adapter->pps_uapsd_mode = 1U; descriptor___7.modname = "mwifiex"; descriptor___7.function = "mwifiex_process_sta_event"; descriptor___7.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___7.format = "event: PPS/UAPSD mode activated\n"; descriptor___7.lineno = 257U; descriptor___7.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); } if (tmp___9 != 0L) { { __dynamic_dev_dbg(& descriptor___7, (struct device const *)adapter->dev, "event: PPS/UAPSD mode activated\n"); } } else { } } else { } adapter->tx_lock_flag = 0U; if ((unsigned int )adapter->pps_uapsd_mode != 0U && (unsigned int )adapter->gen_null_pkt != 0U) { { tmp___11 = mwifiex_check_last_packet_indication(priv); } if ((unsigned int )tmp___11 != 0U) { if ((unsigned int )adapter->data_sent != 0U) { adapter->ps_state = 0U; adapter->pm_wakeup_card_req = 0U; adapter->pm_wakeup_fw_try = 0U; goto ldv_54556; } else { } { tmp___10 = mwifiex_send_null_packet(priv, 9); } if (tmp___10 == 0) { adapter->ps_state = 3U; } else { } return (0); } else { } } else { } adapter->ps_state = 0U; adapter->pm_wakeup_card_req = 0U; adapter->pm_wakeup_fw_try = 0U; goto ldv_54556; case_16: /* CIL Label */ { (*(adapter->if_ops.wakeup_complete))(adapter); descriptor___8.modname = "mwifiex"; descriptor___8.function = "mwifiex_process_sta_event"; descriptor___8.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___8.format = "event: DS_AWAKE\n"; descriptor___8.lineno = 285U; descriptor___8.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); } if (tmp___12 != 0L) { { __dynamic_dev_dbg(& descriptor___8, (struct device const *)adapter->dev, "event: DS_AWAKE\n"); } } else { } if ((unsigned int )adapter->is_deep_sleep != 0U) { adapter->is_deep_sleep = 0U; } else { } goto ldv_54556; case_71: /* CIL Label */ { descriptor___9.modname = "mwifiex"; descriptor___9.function = "mwifiex_process_sta_event"; descriptor___9.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___9.format = "event: HS_ACT_REQ\n"; descriptor___9.lineno = 291U; descriptor___9.flags = 0U; tmp___13 = ldv__builtin_expect((long )descriptor___9.flags & 1L, 0L); } if (tmp___13 != 0L) { { __dynamic_dev_dbg(& descriptor___9, (struct device const *)adapter->dev, "event: HS_ACT_REQ\n"); } } else { } { ret = mwifiex_send_cmd_async(priv, 229, 0, 0U, (void *)0); } goto ldv_54556; case_14: /* CIL Label */ { descriptor___10.modname = "mwifiex"; descriptor___10.function = "mwifiex_process_sta_event"; descriptor___10.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___10.format = "event: UNICAST MIC ERROR\n"; descriptor___10.lineno = 298U; descriptor___10.flags = 0U; tmp___14 = ldv__builtin_expect((long )descriptor___10.flags & 1L, 0L); } if (tmp___14 != 0L) { { __dynamic_dev_dbg(& descriptor___10, (struct device const *)adapter->dev, "event: UNICAST MIC ERROR\n"); } } else { } { cfg80211_michael_mic_failure(priv->netdev, (u8 const *)(& priv->cfg_bssid), 1, -1, (u8 const *)0U, 208U); } goto ldv_54556; case_13: /* CIL Label */ { descriptor___11.modname = "mwifiex"; descriptor___11.function = "mwifiex_process_sta_event"; descriptor___11.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___11.format = "event: MULTICAST MIC ERROR\n"; descriptor___11.lineno = 305U; descriptor___11.flags = 0U; tmp___15 = ldv__builtin_expect((long )descriptor___11.flags & 1L, 0L); } if (tmp___15 != 0L) { { __dynamic_dev_dbg(& descriptor___11, (struct device const *)adapter->dev, "event: MULTICAST MIC ERROR\n"); } } else { } { cfg80211_michael_mic_failure(priv->netdev, (u8 const *)(& priv->cfg_bssid), 0, -1, (u8 const *)0U, 208U); } goto ldv_54556; case_6: /* CIL Label */ ; case_7: /* CIL Label */ ; goto ldv_54556; case_17: /* CIL Label */ { descriptor___12.modname = "mwifiex"; descriptor___12.function = "mwifiex_process_sta_event"; descriptor___12.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___12.format = "event: ADHOC_BCN_LOST\n"; descriptor___12.lineno = 315U; descriptor___12.flags = 0U; tmp___16 = ldv__builtin_expect((long )descriptor___12.flags & 1L, 0L); } if (tmp___16 != 0L) { { __dynamic_dev_dbg(& descriptor___12, (struct device const *)adapter->dev, "event: ADHOC_BCN_LOST\n"); } } else { } { priv->adhoc_is_link_sensed = 0U; mwifiex_clean_txrx(priv); mwifiex_stop_net_dev_queue(priv->netdev, adapter); tmp___17 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___17) { { netif_carrier_off(priv->netdev); } } else { } goto ldv_54556; case_24: /* CIL Label */ { descriptor___13.modname = "mwifiex"; descriptor___13.function = "mwifiex_process_sta_event"; descriptor___13.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___13.format = "event: BGS_REPORT\n"; descriptor___13.lineno = 324U; descriptor___13.flags = 0U; tmp___18 = ldv__builtin_expect((long )descriptor___13.flags & 1L, 0L); } if (tmp___18 != 0L) { { __dynamic_dev_dbg(& descriptor___13, (struct device const *)adapter->dev, "event: BGS_REPORT\n"); } } else { } { ret = mwifiex_send_cmd_async(priv, 108, 0, 0U, (void *)0); } goto ldv_54556; case_43: /* CIL Label */ { descriptor___14.modname = "mwifiex"; descriptor___14.function = "mwifiex_process_sta_event"; descriptor___14.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___14.format = "event: PORT RELEASE\n"; descriptor___14.lineno = 331U; descriptor___14.flags = 0U; tmp___19 = ldv__builtin_expect((long )descriptor___14.flags & 1L, 0L); } if (tmp___19 != 0L) { { __dynamic_dev_dbg(& descriptor___14, (struct device const *)adapter->dev, "event: PORT RELEASE\n"); } } else { } goto ldv_54556; case_23: /* CIL Label */ { descriptor___15.modname = "mwifiex"; descriptor___15.function = "mwifiex_process_sta_event"; descriptor___15.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___15.format = "event: WMM status changed\n"; descriptor___15.lineno = 335U; descriptor___15.flags = 0U; tmp___20 = ldv__builtin_expect((long )descriptor___15.flags & 1L, 0L); } if (tmp___20 != 0L) { { __dynamic_dev_dbg(& descriptor___15, (struct device const *)adapter->dev, "event: WMM status changed\n"); } } else { } { ret = mwifiex_send_cmd_async(priv, 113, 0, 0U, (void *)0); } goto ldv_54556; case_25: /* CIL Label */ { cfg80211_cqm_rssi_notify(priv->netdev, 0, 208U); mwifiex_send_cmd_async(priv, 164, 0, 0U, (void *)0); priv->subsc_evt_rssi_state = 1U; descriptor___16.modname = "mwifiex"; descriptor___16.function = "mwifiex_process_sta_event"; descriptor___16.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___16.format = "event: Beacon RSSI_LOW\n"; descriptor___16.lineno = 347U; descriptor___16.flags = 0U; tmp___21 = ldv__builtin_expect((long )descriptor___16.flags & 1L, 0L); } if (tmp___21 != 0L) { { __dynamic_dev_dbg(& descriptor___16, (struct device const *)adapter->dev, "event: Beacon RSSI_LOW\n"); } } else { } goto ldv_54556; case_26: /* CIL Label */ { descriptor___17.modname = "mwifiex"; descriptor___17.function = "mwifiex_process_sta_event"; descriptor___17.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___17.format = "event: Beacon SNR_LOW\n"; descriptor___17.lineno = 350U; descriptor___17.flags = 0U; tmp___22 = ldv__builtin_expect((long )descriptor___17.flags & 1L, 0L); } if (tmp___22 != 0L) { { __dynamic_dev_dbg(& descriptor___17, (struct device const *)adapter->dev, "event: Beacon SNR_LOW\n"); } } else { } goto ldv_54556; case_27: /* CIL Label */ { descriptor___18.modname = "mwifiex"; descriptor___18.function = "mwifiex_process_sta_event"; descriptor___18.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___18.format = "event: MAX_FAIL\n"; descriptor___18.lineno = 353U; descriptor___18.flags = 0U; tmp___23 = ldv__builtin_expect((long )descriptor___18.flags & 1L, 0L); } if (tmp___23 != 0L) { { __dynamic_dev_dbg(& descriptor___18, (struct device const *)adapter->dev, "event: MAX_FAIL\n"); } } else { } goto ldv_54556; case_28: /* CIL Label */ { cfg80211_cqm_rssi_notify(priv->netdev, 1, 208U); mwifiex_send_cmd_async(priv, 164, 0, 0U, (void *)0); priv->subsc_evt_rssi_state = 2U; descriptor___19.modname = "mwifiex"; descriptor___19.function = "mwifiex_process_sta_event"; descriptor___19.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___19.format = "event: Beacon RSSI_HIGH\n"; descriptor___19.lineno = 362U; descriptor___19.flags = 0U; tmp___24 = ldv__builtin_expect((long )descriptor___19.flags & 1L, 0L); } if (tmp___24 != 0L) { { __dynamic_dev_dbg(& descriptor___19, (struct device const *)adapter->dev, "event: Beacon RSSI_HIGH\n"); } } else { } goto ldv_54556; case_29: /* CIL Label */ { descriptor___20.modname = "mwifiex"; descriptor___20.function = "mwifiex_process_sta_event"; descriptor___20.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___20.format = "event: Beacon SNR_HIGH\n"; descriptor___20.lineno = 365U; descriptor___20.flags = 0U; tmp___25 = ldv__builtin_expect((long )descriptor___20.flags & 1L, 0L); } if (tmp___25 != 0L) { { __dynamic_dev_dbg(& descriptor___20, (struct device const *)adapter->dev, "event: Beacon SNR_HIGH\n"); } } else { } goto ldv_54556; case_36: /* CIL Label */ { descriptor___21.modname = "mwifiex"; descriptor___21.function = "mwifiex_process_sta_event"; descriptor___21.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___21.format = "event: Data RSSI_LOW\n"; descriptor___21.lineno = 368U; descriptor___21.flags = 0U; tmp___26 = ldv__builtin_expect((long )descriptor___21.flags & 1L, 0L); } if (tmp___26 != 0L) { { __dynamic_dev_dbg(& descriptor___21, (struct device const *)adapter->dev, "event: Data RSSI_LOW\n"); } } else { } goto ldv_54556; case_37: /* CIL Label */ { descriptor___22.modname = "mwifiex"; descriptor___22.function = "mwifiex_process_sta_event"; descriptor___22.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___22.format = "event: Data SNR_LOW\n"; descriptor___22.lineno = 371U; descriptor___22.flags = 0U; tmp___27 = ldv__builtin_expect((long )descriptor___22.flags & 1L, 0L); } if (tmp___27 != 0L) { { __dynamic_dev_dbg(& descriptor___22, (struct device const *)adapter->dev, "event: Data SNR_LOW\n"); } } else { } goto ldv_54556; case_38: /* CIL Label */ { descriptor___23.modname = "mwifiex"; descriptor___23.function = "mwifiex_process_sta_event"; descriptor___23.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___23.format = "event: Data RSSI_HIGH\n"; descriptor___23.lineno = 374U; descriptor___23.flags = 0U; tmp___28 = ldv__builtin_expect((long )descriptor___23.flags & 1L, 0L); } if (tmp___28 != 0L) { { __dynamic_dev_dbg(& descriptor___23, (struct device const *)adapter->dev, "event: Data RSSI_HIGH\n"); } } else { } goto ldv_54556; case_39: /* CIL Label */ { descriptor___24.modname = "mwifiex"; descriptor___24.function = "mwifiex_process_sta_event"; descriptor___24.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___24.format = "event: Data SNR_HIGH\n"; descriptor___24.lineno = 377U; descriptor___24.flags = 0U; tmp___29 = ldv__builtin_expect((long )descriptor___24.flags & 1L, 0L); } if (tmp___29 != 0L) { { __dynamic_dev_dbg(& descriptor___24, (struct device const *)adapter->dev, "event: Data SNR_HIGH\n"); } } else { } goto ldv_54556; case_40: /* CIL Label */ { descriptor___25.modname = "mwifiex"; descriptor___25.function = "mwifiex_process_sta_event"; descriptor___25.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___25.format = "event: Link Quality\n"; descriptor___25.lineno = 380U; descriptor___25.flags = 0U; tmp___30 = ldv__builtin_expect((long )descriptor___25.flags & 1L, 0L); } if (tmp___30 != 0L) { { __dynamic_dev_dbg(& descriptor___25, (struct device const *)adapter->dev, "event: Link Quality\n"); } } else { } goto ldv_54556; case_49: /* CIL Label */ { descriptor___26.modname = "mwifiex"; descriptor___26.function = "mwifiex_process_sta_event"; descriptor___26.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___26.format = "event: Pre-Beacon Lost\n"; descriptor___26.lineno = 383U; descriptor___26.flags = 0U; tmp___31 = ldv__builtin_expect((long )descriptor___26.flags & 1L, 0L); } if (tmp___31 != 0L) { { __dynamic_dev_dbg(& descriptor___26, (struct device const *)adapter->dev, "event: Pre-Beacon Lost\n"); } } else { } goto ldv_54556; case_30: /* CIL Label */ { descriptor___27.modname = "mwifiex"; descriptor___27.function = "mwifiex_process_sta_event"; descriptor___27.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___27.format = "event: IBSS_COALESCED\n"; descriptor___27.lineno = 386U; descriptor___27.flags = 0U; tmp___32 = ldv__builtin_expect((long )descriptor___27.flags & 1L, 0L); } if (tmp___32 != 0L) { { __dynamic_dev_dbg(& descriptor___27, (struct device const *)adapter->dev, "event: IBSS_COALESCED\n"); } } else { } { ret = mwifiex_send_cmd_async(priv, 131, 0, 0U, (void *)0); } goto ldv_54556; case_51: /* CIL Label */ { descriptor___28.modname = "mwifiex"; descriptor___28.function = "mwifiex_process_sta_event"; descriptor___28.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___28.format = "event: ADDBA Request\n"; descriptor___28.lineno = 392U; descriptor___28.flags = 0U; tmp___33 = ldv__builtin_expect((long )descriptor___28.flags & 1L, 0L); } if (tmp___33 != 0L) { { __dynamic_dev_dbg(& descriptor___28, (struct device const *)adapter->dev, "event: ADDBA Request\n"); } } else { } { mwifiex_send_cmd_async(priv, 207, 1, 0U, (void *)(& adapter->event_body)); } goto ldv_54556; case_52: /* CIL Label */ { descriptor___29.modname = "mwifiex"; descriptor___29.function = "mwifiex_process_sta_event"; descriptor___29.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___29.format = "event: DELBA Request\n"; descriptor___29.lineno = 398U; descriptor___29.flags = 0U; tmp___34 = ldv__builtin_expect((long )descriptor___29.flags & 1L, 0L); } if (tmp___34 != 0L) { { __dynamic_dev_dbg(& descriptor___29, (struct device const *)adapter->dev, "event: DELBA Request\n"); } } else { } { mwifiex_11n_delete_ba_stream(priv, (u8 *)(& adapter->event_body)); } goto ldv_54556; case_55: /* CIL Label */ { descriptor___30.modname = "mwifiex"; descriptor___30.function = "mwifiex_process_sta_event"; descriptor___30.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___30.format = "event: BA Stream timeout\n"; descriptor___30.lineno = 402U; descriptor___30.flags = 0U; tmp___35 = ldv__builtin_expect((long )descriptor___30.flags & 1L, 0L); } if (tmp___35 != 0L) { { __dynamic_dev_dbg(& descriptor___30, (struct device const *)adapter->dev, "event: BA Stream timeout\n"); } } else { } { mwifiex_11n_ba_stream_timeout(priv, (struct host_cmd_ds_11n_batimeout *)(& adapter->event_body)); } goto ldv_54556; case_66: /* CIL Label */ { ctrl = *((__le16 *)(& adapter->event_body)); descriptor___31.modname = "mwifiex"; descriptor___31.function = "mwifiex_process_sta_event"; descriptor___31.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___31.format = "event: AMSDU_AGGR_CTRL %d\n"; descriptor___31.lineno = 410U; descriptor___31.flags = 0U; tmp___36 = ldv__builtin_expect((long )descriptor___31.flags & 1L, 0L); } if (tmp___36 != 0L) { { __dynamic_dev_dbg(& descriptor___31, (struct device const *)adapter->dev, "event: AMSDU_AGGR_CTRL %d\n", (int )ctrl); } } else { } { __min1 = adapter->curr_tx_buf_size; __min2 = ctrl; adapter->tx_buf_size = (u16 )((int )__min1 < (int )__min2 ? __min1 : __min2); descriptor___32.modname = "mwifiex"; descriptor___32.function = "mwifiex_process_sta_event"; descriptor___32.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___32.format = "event: tx_buf_size %d\n"; descriptor___32.lineno = 415U; descriptor___32.flags = 0U; tmp___37 = ldv__builtin_expect((long )descriptor___32.flags & 1L, 0L); } if (tmp___37 != 0L) { { __dynamic_dev_dbg(& descriptor___32, (struct device const *)adapter->dev, "event: tx_buf_size %d\n", (int )adapter->tx_buf_size); } } else { } goto ldv_54556; case_70: /* CIL Label */ { descriptor___33.modname = "mwifiex"; descriptor___33.function = "mwifiex_process_sta_event"; descriptor___33.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___33.format = "event: WEP ICV error\n"; descriptor___33.lineno = 419U; descriptor___33.flags = 0U; tmp___38 = ldv__builtin_expect((long )descriptor___33.flags & 1L, 0L); } if (tmp___38 != 0L) { { __dynamic_dev_dbg(& descriptor___33, (struct device const *)adapter->dev, "event: WEP ICV error\n"); } } else { } goto ldv_54556; case_72: /* CIL Label */ { descriptor___34.modname = "mwifiex"; descriptor___34.function = "mwifiex_process_sta_event"; descriptor___34.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___34.format = "event: BW Change\n"; descriptor___34.lineno = 423U; descriptor___34.flags = 0U; tmp___39 = ldv__builtin_expect((long )descriptor___34.flags & 1L, 0L); } if (tmp___39 != 0L) { { __dynamic_dev_dbg(& descriptor___34, (struct device const *)adapter->dev, "event: BW Change\n"); } } else { } goto ldv_54556; case_77: /* CIL Label */ { descriptor___35.modname = "mwifiex"; descriptor___35.function = "mwifiex_process_sta_event"; descriptor___35.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___35.format = "event: HOSTWAKE_STAIE %d\n"; descriptor___35.lineno = 427U; descriptor___35.flags = 0U; tmp___40 = ldv__builtin_expect((long )descriptor___35.flags & 1L, 0L); } if (tmp___40 != 0L) { { __dynamic_dev_dbg(& descriptor___35, (struct device const *)adapter->dev, "event: HOSTWAKE_STAIE %d\n", eventcause); } } else { } goto ldv_54556; case_95: /* CIL Label */ { descriptor___36.modname = "mwifiex"; descriptor___36.function = "mwifiex_process_sta_event"; descriptor___36.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___36.format = "event: Remain on channel expired\n"; descriptor___36.lineno = 431U; descriptor___36.flags = 0U; tmp___41 = ldv__builtin_expect((long )descriptor___36.flags & 1L, 0L); } if (tmp___41 != 0L) { { __dynamic_dev_dbg(& descriptor___36, (struct device const *)adapter->dev, "event: Remain on channel expired\n"); } } else { } { cfg80211_remain_on_channel_expired(priv->wdev, priv->roc_cfg.cookie, & priv->roc_cfg.chan, 32U); memset((void *)(& priv->roc_cfg), 0, 64UL); } goto ldv_54556; case_80: /* CIL Label */ { descriptor___37.modname = "mwifiex"; descriptor___37.function = "mwifiex_process_sta_event"; descriptor___37.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___37.format = "event: Channel Switch Announcement\n"; descriptor___37.lineno = 442U; descriptor___37.flags = 0U; tmp___42 = ldv__builtin_expect((long )descriptor___37.flags & 1L, 0L); } if (tmp___42 != 0L) { { __dynamic_dev_dbg(& descriptor___37, (struct device const *)adapter->dev, "event: Channel Switch Announcement\n"); } } else { } { tmp___43 = msecs_to_jiffies(10000U); priv->csa_expire_time = (unsigned long )jiffies + tmp___43; priv->csa_chan = (u8 )priv->curr_bss_params.bss_descriptor.channel; ret = mwifiex_send_cmd_async(priv, 36, 1, 0U, (void *)(& priv->curr_bss_params.bss_descriptor.mac_address)); } goto ldv_54556; switch_default: /* CIL Label */ { descriptor___38.modname = "mwifiex"; descriptor___38.function = "mwifiex_process_sta_event"; descriptor___38.filename = "drivers/net/wireless/mwifiex/sta_event.c"; descriptor___38.format = "event: unknown event id: %#x\n"; descriptor___38.lineno = 454U; descriptor___38.flags = 0U; tmp___44 = ldv__builtin_expect((long )descriptor___38.flags & 1L, 0L); } if (tmp___44 != 0L) { { __dynamic_dev_dbg(& descriptor___38, (struct device const *)adapter->dev, "event: unknown event id: %#x\n", eventcause); } } else { } goto ldv_54556; switch_break: /* CIL Label */ ; } ldv_54556: ; return (ret); } } __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static int ieee80211_is_assoc_req(__le16 fc ) { { return (((int )fc & 252) == 0); } } __inline static int ieee80211_is_reassoc_req(__le16 fc ) { { return (((int )fc & 252) == 32); } } extern void cfg80211_new_sta(struct net_device * , u8 const * , struct station_info * , gfp_t ) ; extern void cfg80211_del_sta(struct net_device * , u8 const * , gfp_t ) ; void mwifiex_uap_del_sta_data(struct mwifiex_private *priv , struct mwifiex_sta_node *node ) ; struct mwifiex_sta_node *mwifiex_get_sta_entry(struct mwifiex_private *priv , u8 *mac ) { struct mwifiex_sta_node *node ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; { if ((unsigned long )mac == (unsigned long )((u8 *)0U)) { return ((struct mwifiex_sta_node *)0); } else { } __mptr = (struct list_head const *)priv->sta_list.next; node = (struct mwifiex_sta_node *)__mptr; goto ldv_54547; ldv_54546: { tmp = memcmp((void const *)(& node->mac_addr), (void const *)mac, 6UL); } if (tmp == 0) { return (node); } else { } __mptr___0 = (struct list_head const *)node->list.next; node = (struct mwifiex_sta_node *)__mptr___0; ldv_54547: ; if ((unsigned long )(& node->list) != (unsigned long )(& priv->sta_list)) { goto ldv_54546; } else { } return ((struct mwifiex_sta_node *)0); } } static struct mwifiex_sta_node *mwifiex_add_sta_entry(struct mwifiex_private *priv , u8 *mac ) { struct mwifiex_sta_node *node ; unsigned long flags ; raw_spinlock_t *tmp ; void *tmp___0 ; { if ((unsigned long )mac == (unsigned long )((u8 *)0U)) { return ((struct mwifiex_sta_node *)0); } else { } { tmp = spinlock_check(& priv->sta_list_spinlock); flags = _raw_spin_lock_irqsave(tmp); node = mwifiex_get_sta_entry(priv, mac); } if ((unsigned long )node != (unsigned long )((struct mwifiex_sta_node *)0)) { goto done; } else { } { tmp___0 = kzalloc(56UL, 32U); node = (struct mwifiex_sta_node *)tmp___0; } if ((unsigned long )node == (unsigned long )((struct mwifiex_sta_node *)0)) { goto done; } else { } { memcpy((void *)(& node->mac_addr), (void const *)mac, 6UL); list_add_tail(& node->list, & priv->sta_list); } done: { spin_unlock_irqrestore(& priv->sta_list_spinlock, flags); } return (node); } } static void mwifiex_set_sta_ht_cap(struct mwifiex_private *priv , u8 const *ies , int ies_len , struct mwifiex_sta_node *node ) { struct ieee80211_ht_cap const *ht_cap ; u8 const *tmp ; { if ((unsigned long )ies == (unsigned long )((u8 const *)0U)) { return; } else { } { tmp = cfg80211_find_ie(45, ies, ies_len); ht_cap = (struct ieee80211_ht_cap const *)tmp; } if ((unsigned long )ht_cap != (unsigned long )((struct ieee80211_ht_cap const *)0)) { node->is_11n_enabled = 1U; node->max_amsdu = ((int )ht_cap->cap_info & 2048) != 0 ? 8192U : 4096U; } else { node->is_11n_enabled = 0U; } return; } } static void mwifiex_del_sta_entry(struct mwifiex_private *priv , u8 *mac ) { struct mwifiex_sta_node *node ; unsigned long flags ; raw_spinlock_t *tmp ; { { tmp = spinlock_check(& priv->sta_list_spinlock); flags = _raw_spin_lock_irqsave(tmp); node = mwifiex_get_sta_entry(priv, mac); } if ((unsigned long )node != (unsigned long )((struct mwifiex_sta_node *)0)) { { list_del(& node->list); kfree((void const *)node); } } else { } { spin_unlock_irqrestore(& priv->sta_list_spinlock, flags); } return; } } static void mwifiex_del_all_sta_list(struct mwifiex_private *priv ) { struct mwifiex_sta_node *node ; struct mwifiex_sta_node *tmp ; unsigned long flags ; raw_spinlock_t *tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { { tmp___0 = spinlock_check(& priv->sta_list_spinlock); flags = _raw_spin_lock_irqsave(tmp___0); __mptr = (struct list_head const *)priv->sta_list.next; node = (struct mwifiex_sta_node *)__mptr; __mptr___0 = (struct list_head const *)node->list.next; tmp = (struct mwifiex_sta_node *)__mptr___0; } goto ldv_54591; ldv_54590: { list_del(& node->list); kfree((void const *)node); node = tmp; __mptr___1 = (struct list_head const *)tmp->list.next; tmp = (struct mwifiex_sta_node *)__mptr___1; } ldv_54591: ; if ((unsigned long )(& node->list) != (unsigned long )(& priv->sta_list)) { goto ldv_54590; } else { } { INIT_LIST_HEAD(& priv->sta_list); spin_unlock_irqrestore(& priv->sta_list_spinlock, flags); } return; } } int mwifiex_process_uap_event(struct mwifiex_private *priv ) { struct mwifiex_adapter *adapter ; int len ; int i ; u32 eventcause ; struct station_info sinfo ; struct mwifiex_assoc_event *event ; struct mwifiex_sta_node *node ; u8 *deauth_mac ; struct host_cmd_ds_11n_batimeout *ba_timeout ; u16 ctrl ; int tmp ; int tmp___0 ; bool tmp___1 ; bool tmp___2 ; int tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; struct _ddebug descriptor___1 ; long tmp___6 ; u16 __min1 ; u16 __min2 ; struct _ddebug descriptor___2 ; long tmp___7 ; struct _ddebug descriptor___3 ; long tmp___8 ; struct _ddebug descriptor___4 ; long tmp___9 ; struct _ddebug descriptor___5 ; long tmp___10 ; struct _ddebug descriptor___6 ; long tmp___11 ; { adapter = priv->adapter; eventcause = adapter->event_cause; { if (eventcause == 45U) { goto case_45; } else { } if (eventcause == 44U) { goto case_44; } else { } if (eventcause == 67U) { goto case_67; } else { } if (eventcause == 68U) { goto case_68; } else { } if (eventcause == 46U) { goto case_46; } else { } if (eventcause == 76U) { goto case_76; } else { } if (eventcause == 66U) { goto case_66; } else { } if (eventcause == 51U) { goto case_51; } else { } if (eventcause == 52U) { goto case_52; } else { } if (eventcause == 55U) { goto case_55; } else { } goto switch_default; case_45: /* CIL Label */ { memset((void *)(& sinfo), 0, 144UL); event = (struct mwifiex_assoc_event *)(& adapter->event_body) + 2U; } if ((unsigned int )event->type == 360U) { { len = -1; tmp___0 = ieee80211_is_assoc_req((int )event->frame_control); } if (tmp___0 != 0) { len = 0; } else { { tmp = ieee80211_is_reassoc_req((int )event->frame_control); } if (tmp != 0) { len = 6; } else { } } if (len != -1) { sinfo.filled = 131072U; sinfo.assoc_req_ies = (u8 const *)(& event->data) + (unsigned long )len; len = (int )((unsigned int )((long )sinfo.assoc_req_ies) - (unsigned int )((long )(& event->frame_control))); sinfo.assoc_req_ies_len = (size_t )((int )event->len - (int )((unsigned short )len)); } else { } } else { } { cfg80211_new_sta(priv->netdev, (u8 const *)(& event->sta_addr), & sinfo, 208U); node = mwifiex_add_sta_entry(priv, (u8 *)(& event->sta_addr)); } if ((unsigned long )node == (unsigned long )((struct mwifiex_sta_node *)0)) { { dev_warn((struct device const *)adapter->dev, "could not create station entry!\n"); } return (-1); } else { } if ((unsigned int )priv->ap_11n_enabled == 0U) { goto ldv_54607; } else { } { mwifiex_set_sta_ht_cap(priv, sinfo.assoc_req_ies, (int )sinfo.assoc_req_ies_len, node); i = 0; } goto ldv_54609; ldv_54608: ; if ((unsigned int )node->is_11n_enabled != 0U) { node->ampdu_sta[i] = priv->aggr_prio_tbl[i].ampdu_user; } else { node->ampdu_sta[i] = 255U; } i = i + 1; ldv_54609: ; if (i <= 7) { goto ldv_54608; } else { } { memset((void *)(& node->rx_seq), 255, 16UL); } goto ldv_54607; case_44: /* CIL Label */ { deauth_mac = (u8 *)(& adapter->event_body) + 2UL; cfg80211_del_sta(priv->netdev, (u8 const *)deauth_mac, 208U); } if ((unsigned int )priv->ap_11n_enabled != 0U) { { mwifiex_11n_del_rx_reorder_tbl_by_ta(priv, deauth_mac); mwifiex_del_tx_ba_stream_tbl_by_ra(priv, deauth_mac); } } else { } { mwifiex_del_sta_entry(priv, deauth_mac); } goto ldv_54607; case_67: /* CIL Label */ { priv->media_connected = 0U; tmp___1 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___1) { { netif_carrier_off(priv->netdev); } } else { } { mwifiex_stop_net_dev_queue(priv->netdev, adapter); mwifiex_clean_txrx(priv); mwifiex_del_all_sta_list(priv); } goto ldv_54607; case_68: /* CIL Label */ { priv->media_connected = 1U; tmp___2 = netif_carrier_ok((struct net_device const *)priv->netdev); } if (tmp___2) { tmp___3 = 0; } else { tmp___3 = 1; } if (tmp___3) { { netif_carrier_on(priv->netdev); } } else { } { mwifiex_wake_up_net_dev_queue(priv->netdev, adapter); } goto ldv_54607; case_46: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_uap_event"; descriptor.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor.format = "AP EVENT: event id: %#x\n"; descriptor.lineno = 249U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___4 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "AP EVENT: event id: %#x\n", eventcause); } } else { } { memcpy((void *)(priv->netdev)->dev_addr, (void const *)(& adapter->event_body) + 2U, 6UL); } goto ldv_54607; case_76: /* CIL Label */ { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_process_uap_event"; descriptor___0.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___0.format = "AP EVENT: event id: %#x\n"; descriptor___0.lineno = 255U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___5 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)adapter->dev, "AP EVENT: event id: %#x\n", eventcause); } } else { } goto ldv_54607; case_66: /* CIL Label */ { ctrl = *((__le16 *)(& adapter->event_body)); descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_process_uap_event"; descriptor___1.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___1.format = "event: AMSDU_AGGR_CTRL %d\n"; descriptor___1.lineno = 259U; descriptor___1.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___6 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)adapter->dev, "event: AMSDU_AGGR_CTRL %d\n", (int )ctrl); } } else { } if ((unsigned int )priv->media_connected != 0U) { { __min1 = adapter->curr_tx_buf_size; __min2 = ctrl; adapter->tx_buf_size = (u16 )((int )__min1 < (int )__min2 ? __min1 : __min2); descriptor___2.modname = "mwifiex"; descriptor___2.function = "mwifiex_process_uap_event"; descriptor___2.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___2.format = "event: tx_buf_size %d\n"; descriptor___2.lineno = 265U; descriptor___2.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); } if (tmp___7 != 0L) { { __dynamic_dev_dbg(& descriptor___2, (struct device const *)adapter->dev, "event: tx_buf_size %d\n", (int )adapter->tx_buf_size); } } else { } } else { } goto ldv_54607; case_51: /* CIL Label */ { descriptor___3.modname = "mwifiex"; descriptor___3.function = "mwifiex_process_uap_event"; descriptor___3.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___3.format = "event: ADDBA Request\n"; descriptor___3.lineno = 269U; descriptor___3.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); } if (tmp___8 != 0L) { { __dynamic_dev_dbg(& descriptor___3, (struct device const *)adapter->dev, "event: ADDBA Request\n"); } } else { } if ((unsigned int )priv->media_connected != 0U) { { mwifiex_send_cmd_async(priv, 207, 1, 0U, (void *)(& adapter->event_body)); } } else { } goto ldv_54607; case_52: /* CIL Label */ { descriptor___4.modname = "mwifiex"; descriptor___4.function = "mwifiex_process_uap_event"; descriptor___4.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___4.format = "event: DELBA Request\n"; descriptor___4.lineno = 276U; descriptor___4.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); } if (tmp___9 != 0L) { { __dynamic_dev_dbg(& descriptor___4, (struct device const *)adapter->dev, "event: DELBA Request\n"); } } else { } if ((unsigned int )priv->media_connected != 0U) { { mwifiex_11n_delete_ba_stream(priv, (u8 *)(& adapter->event_body)); } } else { } goto ldv_54607; case_55: /* CIL Label */ { descriptor___5.modname = "mwifiex"; descriptor___5.function = "mwifiex_process_uap_event"; descriptor___5.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___5.format = "event: BA Stream timeout\n"; descriptor___5.lineno = 281U; descriptor___5.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); } if (tmp___10 != 0L) { { __dynamic_dev_dbg(& descriptor___5, (struct device const *)adapter->dev, "event: BA Stream timeout\n"); } } else { } if ((unsigned int )priv->media_connected != 0U) { { ba_timeout = (struct host_cmd_ds_11n_batimeout *)(& adapter->event_body); mwifiex_11n_ba_stream_timeout(priv, ba_timeout); } } else { } goto ldv_54607; switch_default: /* CIL Label */ { descriptor___6.modname = "mwifiex"; descriptor___6.function = "mwifiex_process_uap_event"; descriptor___6.filename = "drivers/net/wireless/mwifiex/uap_event.c"; descriptor___6.format = "event: unknown event id: %#x\n"; descriptor___6.lineno = 289U; descriptor___6.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); } if (tmp___11 != 0L) { { __dynamic_dev_dbg(& descriptor___6, (struct device const *)adapter->dev, "event: unknown event id: %#x\n", eventcause); } } else { } goto ldv_54607; switch_break: /* CIL Label */ ; } ldv_54607: ; return (0); } } void mwifiex_uap_del_sta_data(struct mwifiex_private *priv , struct mwifiex_sta_node *node ) { { if ((unsigned int )priv->ap_11n_enabled != 0U && (unsigned int )node->is_11n_enabled != 0U) { { mwifiex_11n_del_rx_reorder_tbl_by_ta(priv, (u8 *)(& node->mac_addr)); mwifiex_del_tx_ba_stream_tbl_by_ra(priv, (u8 *)(& node->mac_addr)); } } else { } { mwifiex_del_sta_entry(priv, (u8 *)(& node->mac_addr)); } return; } } void *mwifiex_process_sta_txpd(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; struct txpd *local_tx_pd ; struct mwifiex_txinfo *tx_info ; struct mwifiex_txinfo *tmp ; u8 pad ; u16 pkt_type ; u16 pkt_offset ; bool tmp___0 ; unsigned int tmp___1 ; long tmp___2 ; u8 tmp___3 ; { { adapter = priv->adapter; tmp = MWIFIEX_SKB_TXCB(skb); tx_info = tmp; } if (skb->len == 0U) { { dev_err((struct device const *)adapter->dev, "Tx: bad packet length: %d\n", skb->len); tx_info->status_code = 4294967295U; } return ((void *)skb->data); } else { } { tmp___0 = mwifiex_is_skb_mgmt_frame(skb); pkt_type = (int )tmp___0 ? 229U : 0U; pad = (u8 )((4L - ((long )skb->data & 3L)) % 4L); tmp___1 = skb_headroom((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect((unsigned long )tmp___1 < (unsigned long )pad + 20UL, 0L); } if (tmp___2 != 0L) { { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"drivers/net/wireless/mwifiex/sta_tx.c"), "i" (65), "i" (12UL)); __builtin_unreachable(); } } else { } { skb_push(skb, (unsigned int )pad + 16U); local_tx_pd = (struct txpd *)skb->data; memset((void *)local_tx_pd, 0, 16UL); local_tx_pd->bss_num = priv->bss_num; local_tx_pd->bss_type = priv->bss_type; local_tx_pd->tx_pkt_length = (unsigned int )((int )((unsigned short )skb->len) - (int )((unsigned short )pad)) - 16U; local_tx_pd->priority = (unsigned char )skb->priority; local_tx_pd->pkt_delay_2ms = mwifiex_wmm_compute_drv_pkt_delay(priv, (struct sk_buff const *)skb); } if ((unsigned int )local_tx_pd->priority <= 7U) { local_tx_pd->tx_control = priv->wmm.user_pri_pkt_tx_ctrl[(int )local_tx_pd->priority]; } else { } if ((unsigned int )adapter->pps_uapsd_mode != 0U) { { tmp___3 = mwifiex_check_last_packet_indication(priv); } if ((unsigned int )tmp___3 != 0U) { adapter->tx_lock_flag = 1U; local_tx_pd->flags = 8U; } else { } } else { } pkt_offset = (unsigned int )((u16 )pad) + 16U; if ((unsigned int )pkt_type == 229U) { local_tx_pd->tx_pkt_type = pkt_type; pkt_offset = (unsigned int )pkt_offset + 8U; } else { } { local_tx_pd->tx_pkt_offset = pkt_offset; skb_push(skb, 4U); } if (local_tx_pd->tx_control == 0U) { local_tx_pd->tx_control = priv->pkt_tx_ctrl; } else { } return ((void *)skb->data); } } int mwifiex_send_null_packet(struct mwifiex_private *priv , u8 flags ) { struct mwifiex_adapter *adapter ; struct txpd *local_tx_pd ; u32 data_len ; struct sk_buff *skb ; int ret ; struct mwifiex_txinfo *tx_info ; struct _ddebug descriptor ; long tmp ; { adapter = priv->adapter; data_len = 64U; tx_info = (struct mwifiex_txinfo *)0; if ((int )adapter->surprise_removed) { return (-1); } else { } if ((unsigned int )priv->media_connected == 0U) { return (-1); } else { } if ((unsigned int )adapter->data_sent != 0U) { return (-1); } else { } { skb = dev_alloc_skb(data_len); } if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { return (-1); } else { } { tx_info = MWIFIEX_SKB_TXCB(skb); tx_info->bss_num = priv->bss_num; tx_info->bss_type = priv->bss_type; tx_info->pkt_len = data_len - 20U; skb_reserve(skb, 20); skb_push(skb, 16U); local_tx_pd = (struct txpd *)skb->data; local_tx_pd->tx_control = priv->pkt_tx_ctrl; local_tx_pd->flags = flags; local_tx_pd->priority = 7U; local_tx_pd->tx_pkt_offset = 16U; local_tx_pd->bss_num = priv->bss_num; local_tx_pd->bss_type = priv->bss_type; } if ((unsigned int )adapter->iface_type == 2U) { { ret = (*(adapter->if_ops.host_to_card))(adapter, 2, skb, (struct mwifiex_tx_param *)0); } } else { { skb_push(skb, 4U); ret = (*(adapter->if_ops.host_to_card))(adapter, 0, skb, (struct mwifiex_tx_param *)0); } } { if (ret == -16) { goto case_neg_16; } else { } if (ret == -1) { goto case_neg_1; } else { } if (ret == 0) { goto case_0; } else { } if (ret == -115) { goto case_neg_115; } else { } goto switch_default; case_neg_16: /* CIL Label */ adapter->data_sent = 1U; case_neg_1: /* CIL Label */ { dev_kfree_skb_any(skb); dev_err((struct device const *)adapter->dev, "%s: host_to_card failed: ret=%d\n", "mwifiex_send_null_packet", ret); adapter->dbg.num_tx_host_to_card_failure = adapter->dbg.num_tx_host_to_card_failure + 1U; } goto ldv_54390; case_0: /* CIL Label */ { dev_kfree_skb_any(skb); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_send_null_packet"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_tx.c"; descriptor.format = "data: %s: host_to_card succeeded\n"; descriptor.lineno = 184U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "data: %s: host_to_card succeeded\n", "mwifiex_send_null_packet"); } } else { } adapter->tx_lock_flag = 1U; goto ldv_54390; case_neg_115: /* CIL Label */ ; goto ldv_54390; switch_default: /* CIL Label */ ; goto ldv_54390; switch_break: /* CIL Label */ ; } ldv_54390: ; return (ret); } } u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv ) { struct mwifiex_adapter *adapter ; u8 ret ; int tmp ; int tmp___0 ; { adapter = priv->adapter; ret = 0U; if ((unsigned int )adapter->sleep_period.period == 0U) { return (ret); } else { } { tmp = mwifiex_wmm_lists_empty(adapter); } if (tmp != 0) { ret = 1U; } else { } if (((unsigned int )ret != 0U && (unsigned int )adapter->cmd_sent == 0U) && (unsigned long )adapter->curr_cmd == (unsigned long )((struct cmd_ctrl_node *)0)) { { tmp___0 = is_command_pending(adapter); } if (tmp___0 == 0) { adapter->delay_null_pkt = 0U; ret = 1U; } else { ret = 0U; adapter->delay_null_pkt = 1U; } } else { ret = 0U; adapter->delay_null_pkt = 1U; } return (ret); } } __inline static void __skb_unlink(struct sk_buff *skb , struct sk_buff_head *list ) { struct sk_buff *next ; struct sk_buff *prev ; struct sk_buff *tmp ; { list->qlen = list->qlen - 1U; next = skb->next; prev = skb->prev; tmp = (struct sk_buff *)0; skb->prev = tmp; skb->next = tmp; next->prev = prev; prev->next = next; return; } } __inline static struct sk_buff *__skb_dequeue(struct sk_buff_head *list ) { struct sk_buff *skb ; struct sk_buff *tmp ; { { tmp = skb_peek((struct sk_buff_head const *)list); skb = tmp; } if ((unsigned long )skb != (unsigned long )((struct sk_buff *)0)) { { __skb_unlink(skb, list); } } else { } return (skb); } } extern unsigned char const rfc1042_header[6U] ; extern unsigned char const bridge_tunnel_header[6U] ; extern void ieee80211_amsdu_to_8023s(struct sk_buff * , struct sk_buff_head * , u8 const * , enum nl80211_iftype , unsigned int const , bool ) ; static bool mwifiex_discard_gratuitous_arp(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_arp_eth_header const *arp ; struct ethhdr *eth ; struct ipv6hdr *ipv6 ; struct icmp6hdr *icmpv6 ; __u16 tmp ; int tmp___0 ; int tmp___1 ; { { eth = (struct ethhdr *)skb->data; tmp = __fswab16((int )eth->h_proto); } { if ((int )tmp == 2054) { goto case_2054; } else { } if ((int )tmp == 34525) { goto case_34525; } else { } goto switch_default; case_2054: /* CIL Label */ arp = (struct mwifiex_arp_eth_header const *)skb->data + 14U; if ((unsigned int )arp->hdr.ar_op == 512U || (unsigned int )arp->hdr.ar_op == 256U) { { tmp___0 = memcmp((void const *)(& arp->ar_sip), (void const *)(& arp->ar_tip), 4UL); } if (tmp___0 == 0) { return (1); } else { } } else { } goto ldv_54692; case_34525: /* CIL Label */ ipv6 = (struct ipv6hdr *)skb->data + 14U; icmpv6 = (struct icmp6hdr *)skb->data + 54U; if ((unsigned int )icmpv6->icmp6_type == 136U) { { tmp___1 = memcmp((void const *)(& ipv6->saddr), (void const *)(& ipv6->daddr), 16UL); } if (tmp___1 == 0) { return (1); } else { } } else { } goto ldv_54692; switch_default: /* CIL Label */ ; goto ldv_54692; switch_break: /* CIL Label */ ; } ldv_54692: ; return (0); } } int mwifiex_process_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) { int ret ; struct rx_packet_hdr *rx_pkt_hdr ; struct rxpd *local_rx_pd ; int hdr_chop ; struct ethhdr *eth ; int tmp ; int tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; struct _ddebug descriptor ; long tmp___3 ; bool tmp___4 ; { { local_rx_pd = (struct rxpd *)skb->data; rx_pkt_hdr = (struct rx_packet_hdr *)local_rx_pd + (unsigned long )local_rx_pd->rx_pkt_offset; tmp = memcmp((void const *)(& rx_pkt_hdr->rfc1042_hdr), (void const *)(& bridge_tunnel_header), 6UL); } if (tmp == 0) { { eth = & rx_pkt_hdr->eth803_hdr + 8U; memcpy((void *)(& eth->h_source), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); memcpy((void *)(& eth->h_dest), (void const *)(& rx_pkt_hdr->eth803_hdr.h_dest), 6UL); hdr_chop = (int )((unsigned int )((long )eth) - (unsigned int )((long )local_rx_pd)); } } else { { tmp___0 = memcmp((void const *)(& rx_pkt_hdr->rfc1042_hdr), (void const *)(& rfc1042_header), 6UL); } if (tmp___0 == 0) { { tmp___1 = __fswab16((int )rx_pkt_hdr->rfc1042_hdr.snap_type); } if ((unsigned int )tmp___1 != 33011U) { { tmp___2 = __fswab16((int )rx_pkt_hdr->rfc1042_hdr.snap_type); } if ((unsigned int )tmp___2 != 33079U) { { eth = & rx_pkt_hdr->eth803_hdr + 8U; memcpy((void *)(& eth->h_source), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); memcpy((void *)(& eth->h_dest), (void const *)(& rx_pkt_hdr->eth803_hdr.h_dest), 6UL); hdr_chop = (int )((unsigned int )((long )eth) - (unsigned int )((long )local_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )local_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )local_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )local_rx_pd)); } } { skb_pull(skb, (unsigned int )hdr_chop); } if ((int )priv->hs2_enabled) { { tmp___4 = mwifiex_discard_gratuitous_arp(priv, skb); } if ((int )tmp___4) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_process_rx_packet"; descriptor.filename = "drivers/net/wireless/mwifiex/sta_rx.c"; descriptor.format = "Bypassed Gratuitous ARP\n"; descriptor.lineno = 140U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "Bypassed Gratuitous ARP\n"); } } else { } { dev_kfree_skb_any(skb); } return (0); } else { } } else { } { priv->rxpd_rate = local_rx_pd->rx_rate; priv->rxpd_htinfo = local_rx_pd->ht_info; ret = mwifiex_recv_packet(priv, skb); } if (ret == -1) { { dev_err((struct device const *)(priv->adapter)->dev, "recv packet failed\n"); } } else { } return (ret); } } int mwifiex_process_sta_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; int ret ; struct rxpd *local_rx_pd ; struct rx_packet_hdr *rx_pkt_hdr ; u8 ta[6U] ; u16 rx_pkt_type ; u16 rx_pkt_offset ; u16 rx_pkt_length ; u16 seq_num ; struct sk_buff_head list ; struct sk_buff *rx_skb ; int tmp ; bool tmp___0 ; int tmp___1 ; u8 tmp___2 ; { adapter = priv->adapter; ret = 0; local_rx_pd = (struct rxpd *)skb->data; rx_pkt_type = local_rx_pd->rx_pkt_type; rx_pkt_offset = local_rx_pd->rx_pkt_offset; rx_pkt_length = local_rx_pd->rx_pkt_length; seq_num = local_rx_pd->seq_num; rx_pkt_hdr = (struct rx_packet_hdr *)local_rx_pd + (unsigned long )rx_pkt_offset; if ((int )rx_pkt_offset + (int )rx_pkt_length > (int )((unsigned short )skb->len)) { { dev_err((struct device const *)adapter->dev, "wrong rx packet: len=%d, rx_pkt_offset=%d, rx_pkt_length=%d\n", skb->len, (int )rx_pkt_offset, (int )rx_pkt_length); priv->stats.rx_dropped = priv->stats.rx_dropped + 1UL; dev_kfree_skb_any(skb); } return (ret); } else { } if ((unsigned int )rx_pkt_type == 230U) { { __skb_queue_head_init(& list); skb_pull(skb, (unsigned int )rx_pkt_offset); skb_trim(skb, (unsigned int )rx_pkt_length); ieee80211_amsdu_to_8023s(skb, & list, (u8 const *)(& priv->curr_addr), (priv->wdev)->iftype, 0U, 0); } goto ldv_54722; ldv_54721: { rx_skb = __skb_dequeue(& list); ret = mwifiex_recv_packet(priv, rx_skb); } if (ret == -1) { { dev_err((struct device const *)adapter->dev, "Rx of A-MSDU failed"); } } else { } ldv_54722: { tmp = skb_queue_empty((struct sk_buff_head const *)(& list)); } if (tmp == 0) { goto ldv_54721; } else { } return (0); } else if ((unsigned int )rx_pkt_type == 229U) { { ret = mwifiex_process_mgmt_packet(priv, skb); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "Rx of mgmt packet failed"); } } else { } { dev_kfree_skb_any(skb); } return (ret); } else { } if (((unsigned int )(priv->adapter)->config_bands & 24U) == 0U || (unsigned long )priv->curr_bss_params.bss_descriptor.bcn_ht_cap == (unsigned long )((struct ieee80211_ht_cap *)0)) { { mwifiex_process_rx_packet(priv, skb); } return (ret); } else { { tmp___0 = ether_addr_equal_unaligned((u8 const *)(& priv->curr_addr), (u8 const *)(& rx_pkt_hdr->eth803_hdr.h_dest)); } if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { { mwifiex_process_rx_packet(priv, skb); } return (ret); } else { } } { tmp___2 = mwifiex_queuing_ra_based(priv); } if ((unsigned int )tmp___2 != 0U) { { memcpy((void *)(& ta), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); } } else { if ((unsigned int )rx_pkt_type != 231U) { priv->rx_seq[(int )local_rx_pd->priority] = seq_num; } else { } { memcpy((void *)(& ta), (void const *)(& priv->curr_bss_params.bss_descriptor.mac_address), 6UL); } } { ret = mwifiex_11n_rx_reorder_pkt(priv, (int )seq_num, (int )local_rx_pd->priority, (u8 *)(& ta), (int )((unsigned char )rx_pkt_type), (void *)skb); } if (ret != 0 || (unsigned int )rx_pkt_type == 231U) { { dev_kfree_skb_any(skb); } } else { } if (ret != 0) { priv->stats.rx_dropped = priv->stats.rx_dropped + 1UL; } else { } return (ret); } } __inline static void atomic_inc(atomic_t *v ) ; __inline static void atomic_dec(atomic_t *v ) ; extern struct sk_buff *skb_copy(struct sk_buff const * , gfp_t ) ; __inline static bool is_multicast_ether_addr(u8 const *addr ) { { return (((int )*addr & 1) != 0); } } __inline static bool is_unicast_ether_addr(u8 const *addr ) { bool tmp ; int tmp___0 ; { { tmp = is_multicast_ether_addr(addr); } if ((int )tmp != 0) { tmp___0 = 0; } else { tmp___0 = 1; } return ((bool )tmp___0); } } static bool mwifiex_uap_del_tx_pkts_in_ralist(struct mwifiex_private *priv , struct list_head *ra_list_head ) { struct mwifiex_ra_list_tbl *ra_list ; struct sk_buff *skb ; struct sk_buff *tmp ; bool pkt_deleted ; struct mwifiex_txinfo *tx_info ; struct mwifiex_adapter *adapter ; struct list_head const *__mptr ; int tmp___0 ; int tmp___1 ; struct list_head const *__mptr___0 ; { pkt_deleted = 0; adapter = priv->adapter; __mptr = (struct list_head const *)ra_list_head->next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr; goto ldv_54442; ldv_54441: { tmp___0 = skb_queue_empty((struct sk_buff_head const *)(& ra_list->skb_head)); } if (tmp___0 != 0) { goto ldv_54437; } else { } skb = ra_list->skb_head.next; tmp = skb->next; goto ldv_54440; ldv_54439: { tx_info = MWIFIEX_SKB_TXCB(skb); } if (((unsigned long )tx_info->flags & 2UL) != 0UL) { { __skb_unlink(skb, & ra_list->skb_head); mwifiex_write_data_complete(adapter, skb, 0, -1); atomic_dec(& priv->wmm.tx_pkts_queued); pkt_deleted = 1; } } else { } { tmp___1 = atomic_read((atomic_t const *)(& adapter->pending_bridged_pkts)); } if (tmp___1 <= 128) { goto ldv_54438; } else { } skb = tmp; tmp = skb->next; ldv_54440: ; if ((unsigned long )skb != (unsigned long )((struct sk_buff *)(& ra_list->skb_head))) { goto ldv_54439; } else { } ldv_54438: ; ldv_54437: __mptr___0 = (struct list_head const *)ra_list->list.next; ra_list = (struct mwifiex_ra_list_tbl *)__mptr___0; ldv_54442: ; if ((unsigned long )(& ra_list->list) != (unsigned long )ra_list_head) { goto ldv_54441; } else { } return (pkt_deleted); } } static void mwifiex_uap_cleanup_tx_queues(struct mwifiex_private *priv ) { unsigned long flags ; struct list_head *ra_list ; int i ; raw_spinlock_t *tmp ; bool tmp___0 ; { { tmp = spinlock_check(& priv->wmm.ra_list_spinlock); flags = _raw_spin_lock_irqsave(tmp); i = 0; } goto ldv_54455; ldv_54454: ; if ((unsigned int )priv->del_list_idx == 8U) { priv->del_list_idx = 0U; } else { } { ra_list = & priv->wmm.tid_tbl_ptr[(int )priv->del_list_idx].ra_list; tmp___0 = mwifiex_uap_del_tx_pkts_in_ralist(priv, ra_list); } if ((int )tmp___0) { priv->del_list_idx = (u8 )((int )priv->del_list_idx + 1); goto ldv_54453; } else { } i = i + 1; priv->del_list_idx = (u8 )((int )priv->del_list_idx + 1); ldv_54455: ; if (i <= 7) { goto ldv_54454; } else { } ldv_54453: { spin_unlock_irqrestore(& priv->wmm.ra_list_spinlock, flags); } return; } } static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; struct uap_rxpd *uap_rx_pd ; struct rx_packet_hdr *rx_pkt_hdr ; struct sk_buff *new_skb ; struct mwifiex_txinfo *tx_info ; int hdr_chop ; struct timeval tv ; struct ethhdr *p_ethhdr ; int tmp ; int tmp___0 ; int tmp___1 ; __u16 tmp___2 ; __u16 tmp___3 ; struct _ddebug descriptor ; unsigned int tmp___4 ; long tmp___5 ; long tmp___6 ; struct _ddebug descriptor___0 ; unsigned int tmp___7 ; long tmp___8 ; unsigned int tmp___9 ; bool tmp___10 ; { { adapter = priv->adapter; uap_rx_pd = (struct uap_rxpd *)skb->data; rx_pkt_hdr = (struct rx_packet_hdr *)uap_rx_pd + (unsigned long )uap_rx_pd->rx_pkt_offset; tmp = atomic_read((atomic_t const *)(& adapter->pending_bridged_pkts)); } if (tmp > 1023) { { dev_err((struct device const *)(priv->adapter)->dev, "Tx: Bridge packet limit reached. Drop packet!\n"); kfree_skb(skb); mwifiex_uap_cleanup_tx_queues(priv); } return; } else { } { tmp___0 = memcmp((void const *)(& rx_pkt_hdr->rfc1042_hdr), (void const *)(& bridge_tunnel_header), 6UL); } if (tmp___0 == 0) { { p_ethhdr = & rx_pkt_hdr->eth803_hdr + 8U; memcpy((void *)(& p_ethhdr->h_source), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); memcpy((void *)(& p_ethhdr->h_dest), (void const *)(& rx_pkt_hdr->eth803_hdr.h_dest), 6UL); hdr_chop = (int )((unsigned int )((long )p_ethhdr) - (unsigned int )((long )uap_rx_pd)); } } else { { tmp___1 = memcmp((void const *)(& rx_pkt_hdr->rfc1042_hdr), (void const *)(& rfc1042_header), 6UL); } if (tmp___1 == 0) { { tmp___2 = __fswab16((int )rx_pkt_hdr->rfc1042_hdr.snap_type); } if ((unsigned int )tmp___2 != 33011U) { { tmp___3 = __fswab16((int )rx_pkt_hdr->rfc1042_hdr.snap_type); } if ((unsigned int )tmp___3 != 33079U) { { p_ethhdr = & rx_pkt_hdr->eth803_hdr + 8U; memcpy((void *)(& p_ethhdr->h_source), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); memcpy((void *)(& p_ethhdr->h_dest), (void const *)(& rx_pkt_hdr->eth803_hdr.h_dest), 6UL); hdr_chop = (int )((unsigned int )((long )p_ethhdr) - (unsigned int )((long )uap_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )uap_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )uap_rx_pd)); } } else { hdr_chop = (int )((unsigned int )((long )(& rx_pkt_hdr->eth803_hdr)) - (unsigned int )((long )uap_rx_pd)); } } { skb_pull(skb, (unsigned int )hdr_chop); tmp___9 = skb_headroom((struct sk_buff const *)skb); } if (tmp___9 <= 35U) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_uap_queue_bridged_pkt"; descriptor.filename = "drivers/net/wireless/mwifiex/uap_txrx.c"; descriptor.format = "data: Tx: insufficient skb headroom %d\n"; descriptor.lineno = 159U; descriptor.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___5 != 0L) { { tmp___4 = skb_headroom((struct sk_buff const *)skb); __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "data: Tx: insufficient skb headroom %d\n", tmp___4); } } else { } { new_skb = skb_realloc_headroom(skb, 36U); tmp___6 = ldv__builtin_expect((unsigned long )new_skb == (unsigned long )((struct sk_buff *)0), 0L); } if (tmp___6 != 0L) { { dev_err((struct device const *)(priv->adapter)->dev, "Tx: cannot allocate new_skb\n"); kfree_skb(skb); priv->stats.tx_dropped = priv->stats.tx_dropped + 1UL; } return; } else { } { kfree_skb(skb); skb = new_skb; descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_uap_queue_bridged_pkt"; descriptor___0.filename = "drivers/net/wireless/mwifiex/uap_txrx.c"; descriptor___0.format = "info: new skb headroom %d\n"; descriptor___0.lineno = 174U; descriptor___0.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___8 != 0L) { { tmp___7 = skb_headroom((struct sk_buff const *)skb); __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: new skb headroom %d\n", tmp___7); } } else { } } else { } { tx_info = MWIFIEX_SKB_TXCB(skb); tx_info->bss_num = priv->bss_num; tx_info->bss_type = priv->bss_type; tx_info->flags = (u8 )((unsigned int )tx_info->flags | 2U); tmp___10 = is_unicast_ether_addr((u8 const *)(& rx_pkt_hdr->eth803_hdr.h_dest)); } if ((int )tmp___10) { priv->stats.rx_bytes = priv->stats.rx_bytes + (unsigned long )skb->len; priv->stats.rx_packets = priv->stats.rx_packets + 1UL; tx_info->pkt_len = skb->len; } else { } { do_gettimeofday(& tv); skb->tstamp = timeval_to_ktime(tv); mwifiex_wmm_add_buf_txqueue(priv, skb); atomic_inc(& adapter->tx_pending); atomic_inc(& adapter->pending_bridged_pkts); } return; } } int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; struct uap_rxpd *uap_rx_pd ; struct rx_packet_hdr *rx_pkt_hdr ; u8 ra[6U] ; struct sk_buff *skb_uap ; struct mwifiex_sta_node *tmp ; bool tmp___0 ; int tmp___1 ; { adapter = priv->adapter; uap_rx_pd = (struct uap_rxpd *)skb->data; rx_pkt_hdr = (struct rx_packet_hdr *)uap_rx_pd + (unsigned long )uap_rx_pd->rx_pkt_offset; if ((unsigned int )priv->media_connected == 0U) { { dev_err((struct device const *)adapter->dev, "drop packet in disconnected state.\n"); dev_kfree_skb_any(skb); } return (0); } else { } { memcpy((void *)(& ra), (void const *)(& rx_pkt_hdr->eth803_hdr.h_dest), 6UL); tmp___0 = is_multicast_ether_addr((u8 const *)(& ra)); } if ((int )tmp___0) { { skb_uap = skb_copy((struct sk_buff const *)skb, 32U); mwifiex_uap_queue_bridged_pkt(priv, skb_uap); } } else { { tmp = mwifiex_get_sta_entry(priv, (u8 *)(& ra)); } if ((unsigned long )tmp != (unsigned long )((struct mwifiex_sta_node *)0)) { { mwifiex_uap_queue_bridged_pkt(priv, skb); } return (0); } else { } } { tmp___1 = mwifiex_process_rx_packet(priv, skb); } return (tmp___1); } } int mwifiex_process_uap_rx_packet(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; int ret ; struct uap_rxpd *uap_rx_pd ; struct rx_packet_hdr *rx_pkt_hdr ; u16 rx_pkt_type ; u8 ta[6U] ; u8 pkt_type ; struct mwifiex_sta_node *node ; struct sk_buff_head list ; struct sk_buff *rx_skb ; int tmp ; struct mwifiex_rx_reorder_tbl *tmp___0 ; { adapter = priv->adapter; uap_rx_pd = (struct uap_rxpd *)skb->data; rx_pkt_type = uap_rx_pd->rx_pkt_type; rx_pkt_hdr = (struct rx_packet_hdr *)uap_rx_pd + (unsigned long )uap_rx_pd->rx_pkt_offset; if ((int )uap_rx_pd->rx_pkt_offset + (int )uap_rx_pd->rx_pkt_length > (int )((unsigned short )skb->len)) { { dev_err((struct device const *)adapter->dev, "wrong rx packet: len=%d, offset=%d, length=%d\n", skb->len, (int )uap_rx_pd->rx_pkt_offset, (int )uap_rx_pd->rx_pkt_length); priv->stats.rx_dropped = priv->stats.rx_dropped + 1UL; dev_kfree_skb_any(skb); } return (0); } else { } if ((unsigned int )uap_rx_pd->rx_pkt_type == 230U) { { __skb_queue_head_init(& list); skb_pull(skb, (unsigned int )uap_rx_pd->rx_pkt_offset); skb_trim(skb, (unsigned int )uap_rx_pd->rx_pkt_length); ieee80211_amsdu_to_8023s(skb, & list, (u8 const *)(& priv->curr_addr), (priv->wdev)->iftype, 0U, 0); } goto ldv_54495; ldv_54494: { rx_skb = __skb_dequeue(& list); ret = mwifiex_recv_packet(priv, rx_skb); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "AP:Rx A-MSDU failed"); } } else { } ldv_54495: { tmp = skb_queue_empty((struct sk_buff_head const *)(& list)); } if (tmp == 0) { goto ldv_54494; } else { } return (0); } else if ((unsigned int )rx_pkt_type == 229U) { { ret = mwifiex_process_mgmt_packet(priv, skb); } if (ret != 0) { { dev_err((struct device const *)adapter->dev, "Rx of mgmt packet failed"); } } else { } { dev_kfree_skb_any(skb); } return (ret); } else { } { memcpy((void *)(& ta), (void const *)(& rx_pkt_hdr->eth803_hdr.h_source), 6UL); } if ((unsigned int )rx_pkt_type != 231U && (unsigned int )uap_rx_pd->priority <= 7U) { { node = mwifiex_get_sta_entry(priv, (u8 *)(& ta)); } if ((unsigned long )node != (unsigned long )((struct mwifiex_sta_node *)0)) { node->rx_seq[(int )uap_rx_pd->priority] = uap_rx_pd->seq_num; } else { } } else { } if ((unsigned int )priv->ap_11n_enabled == 0U) { { ret = mwifiex_handle_uap_rx_forward(priv, skb); } return (ret); } else { { tmp___0 = mwifiex_11n_get_rx_reorder_tbl(priv, (int )uap_rx_pd->priority, (u8 *)(& ta)); } if ((unsigned long )tmp___0 == (unsigned long )((struct mwifiex_rx_reorder_tbl *)0) && (unsigned int )uap_rx_pd->rx_pkt_type != 230U) { { ret = mwifiex_handle_uap_rx_forward(priv, skb); } return (ret); } else { } } { pkt_type = (unsigned char )uap_rx_pd->rx_pkt_type; ret = mwifiex_11n_rx_reorder_pkt(priv, (int )uap_rx_pd->seq_num, (int )uap_rx_pd->priority, (u8 *)(& ta), (int )pkt_type, (void *)skb); } if (ret != 0 || (unsigned int )rx_pkt_type == 231U) { { dev_kfree_skb_any(skb); } } else { } if (ret != 0) { priv->stats.rx_dropped = priv->stats.rx_dropped + 1UL; } else { } return (ret); } } void *mwifiex_process_uap_txpd(struct mwifiex_private *priv , struct sk_buff *skb ) { struct mwifiex_adapter *adapter ; struct uap_txpd *txpd ; struct mwifiex_txinfo *tx_info ; struct mwifiex_txinfo *tmp ; int pad ; int len ; u16 pkt_type ; bool tmp___0 ; unsigned int tmp___1 ; long tmp___2 ; { { adapter = priv->adapter; tmp = MWIFIEX_SKB_TXCB(skb); tx_info = tmp; } if (skb->len == 0U) { { dev_err((struct device const *)adapter->dev, "Tx: bad packet length: %d\n", skb->len); tx_info->status_code = 4294967295U; } return ((void *)skb->data); } else { } { tmp___0 = mwifiex_is_skb_mgmt_frame(skb); pkt_type = (int )tmp___0 ? 229U : 0U; pad = (int )((4L - ((long )skb->data & 3L)) % 4L); len = (int )((unsigned int )pad + 20U); tmp___1 = skb_headroom((struct sk_buff const *)skb); tmp___2 = ldv__builtin_expect(tmp___1 < (unsigned int )(len + 4), 0L); } if (tmp___2 != 0L) { { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"drivers/net/wireless/mwifiex/uap_txrx.c"), "i" (385), "i" (12UL)); __builtin_unreachable(); } } else { } { skb_push(skb, (unsigned int )len); txpd = (struct uap_txpd *)skb->data; memset((void *)txpd, 0, 20UL); txpd->bss_num = priv->bss_num; txpd->bss_type = priv->bss_type; txpd->tx_pkt_length = (int )((unsigned short )skb->len) - (int )((unsigned short )len); txpd->priority = (unsigned char )skb->priority; txpd->pkt_delay_2ms = mwifiex_wmm_compute_drv_pkt_delay(priv, (struct sk_buff const *)skb); } if ((unsigned int )txpd->priority <= 7U) { txpd->tx_control = priv->wmm.user_pri_pkt_tx_ctrl[(int )txpd->priority]; } else { } if ((unsigned int )pkt_type == 229U) { txpd->tx_pkt_type = pkt_type; len = len + 8; } else { } { txpd->tx_pkt_offset = (unsigned short )len; skb_push(skb, 4U); } if (txpd->tx_control == 0U) { txpd->tx_control = priv->pkt_tx_ctrl; } else { } return ((void *)skb->data); } } void *ldv_err_ptr(long error ) ; int ldv_filter_err_code(int ret_val ) ; __inline static void *ERR_PTR(long error ) ; __inline static long IS_ERR(void const *ptr ) ; extern int device_set_wakeup_enable(struct device * , bool ) ; extern int _dev_info(struct device const * , char const * , ...) ; __inline static void sema_init(struct semaphore *sem , int val ) { struct lock_class_key __key ; struct semaphore __constr_expr_0 ; { { __constr_expr_0.lock.raw_lock.__annonCompField7.head_tail = 0U; __constr_expr_0.lock.magic = 3735899821U; __constr_expr_0.lock.owner_cpu = 4294967295U; __constr_expr_0.lock.owner = (void *)-1; __constr_expr_0.lock.dep_map.key = 0; __constr_expr_0.lock.dep_map.class_cache[0] = 0; __constr_expr_0.lock.dep_map.class_cache[1] = 0; __constr_expr_0.lock.dep_map.name = "(*sem).lock"; __constr_expr_0.lock.dep_map.cpu = 0; __constr_expr_0.lock.dep_map.ip = 0UL; __constr_expr_0.count = (unsigned int )val; __constr_expr_0.wait_list.next = & sem->wait_list; __constr_expr_0.wait_list.prev = & sem->wait_list; *sem = __constr_expr_0; lockdep_init_map(& sem->lock.dep_map, "semaphore->lock", & __key, 0); } return; } } extern u32 prandom_u32(void) ; __inline static void *kzalloc(size_t size , gfp_t flags ) ; __inline static struct net *hold_net(struct net *net ) { { return (net); } } __inline static void release_net(struct net *net ) { { return; } } __inline static struct net *read_pnet(struct net * const *pnet ) { { return ((struct net *)*pnet); } } __inline static void dev_net_set(struct net_device *dev , struct net *net ) { { { release_net(dev->nd_net); dev->nd_net = hold_net(net); } return; } } extern int register_netdevice(struct net_device * ) ; static int ldv_register_netdevice_20(struct net_device *ldv_func_arg1 ) ; extern void unregister_netdevice_queue(struct net_device * , struct list_head * ) ; __inline static void unregister_netdevice(struct net_device *dev ) { { { unregister_netdevice_queue(dev, (struct list_head *)0); } return; } } __inline static void ldv_unregister_netdevice_22(struct net_device *dev ) ; static void ldv_free_netdev_21(struct net_device *ldv_func_arg1 ) ; extern void ether_setup(struct net_device * ) ; extern struct net_device *alloc_netdev_mqs(int , char const * , void (*)(struct net_device * ) , unsigned int , unsigned int ) ; static struct net_device *ldv_alloc_netdev_mqs_19(int ldv_func_arg1 , char const *ldv_func_arg2 , void (*ldv_func_arg3)(struct net_device * ) , unsigned int ldv_func_arg4 , unsigned int ldv_func_arg5 ) ; __inline static int ieee80211_is_probe_resp(__le16 fc ) { { return (((int )fc & 252) == 80); } } __inline static enum nl80211_channel_type cfg80211_get_chandef_type(struct cfg80211_chan_def const *chandef ) { int __ret_warn_on ; long tmp ; { { if ((unsigned int )chandef->width == 0U) { goto case_0; } else { } if ((unsigned int )chandef->width == 1U) { goto case_1; } else { } if ((unsigned int )chandef->width == 2U) { goto case_2; } else { } goto switch_default; case_0: /* CIL Label */ ; return (0); case_1: /* CIL Label */ ; return (1); case_2: /* CIL Label */ ; if ((unsigned int )chandef->center_freq1 > (unsigned int )(chandef->chan)->center_freq) { return (3); } else { } return (2); switch_default: /* CIL Label */ { __ret_warn_on = 1; tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); } if (tmp != 0L) { { warn_slowpath_null("include/net/cfg80211.h", 373); } } else { } { ldv__builtin_expect(__ret_warn_on != 0, 0L); } return (0); switch_break: /* CIL Label */ ; } } } __inline static struct net *wiphy_net(struct wiphy *wiphy ) { struct net *tmp ; { { tmp = read_pnet((struct net * const *)(& wiphy->_net)); } return (tmp); } } __inline static void *wiphy_priv(struct wiphy *wiphy ) { long tmp ; { { tmp = ldv__builtin_expect((unsigned long )wiphy == (unsigned long )((struct wiphy *)0), 0L); } if (tmp != 0L) { { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/net/cfg80211.h"), "i" (3014), "i" (12UL)); __builtin_unreachable(); } } else { } return ((void *)(& wiphy->priv)); } } __inline static void set_wiphy_dev(struct wiphy *wiphy , struct device *dev ) { { wiphy->dev.parent = dev; return; } } __inline static struct device *wiphy_dev(struct wiphy *wiphy ) { { return (wiphy->dev.parent); } } extern struct wiphy *wiphy_new(struct cfg80211_ops const * , int ) ; extern int wiphy_register(struct wiphy * ) ; extern int ieee80211_channel_to_frequency(int , enum ieee80211_band ) ; extern int regulatory_hint(struct wiphy * , char const * ) ; extern void wiphy_apply_custom_regulatory(struct wiphy * , struct ieee80211_regdomain const * ) ; extern struct cfg80211_bss *cfg80211_get_bss(struct wiphy * , struct ieee80211_channel * , u8 const * , u8 const * , size_t , u16 , u16 ) ; extern void cfg80211_ibss_joined(struct net_device * , u8 const * , gfp_t ) ; extern void cfg80211_connect_result(struct net_device * , u8 const * , u8 const * , size_t , u8 const * , size_t , u16 , gfp_t ) ; extern void cfg80211_ready_on_channel(struct wireless_dev * , u64 , struct ieee80211_channel * , unsigned int , gfp_t ) ; extern void cfg80211_mgmt_tx_status(struct wireless_dev * , u64 , u8 const * , size_t , bool , gfp_t ) ; __inline static struct mwifiex_private *mwifiex_get_priv___3(struct mwifiex_adapter *adapter , enum mwifiex_bss_role bss_role ) { int i ; { i = 0; goto ldv_54141; ldv_54140: ; if ((unsigned long )adapter->priv[i] != (unsigned long )((struct mwifiex_private *)0)) { if ((unsigned int )bss_role == 255U || ((unsigned long )(adapter->priv[i])->bss_role & 1UL) == (unsigned long )bss_role) { goto ldv_54139; } else { } } else { } i = i + 1; ldv_54141: ; if (i < (int )adapter->priv_num) { goto ldv_54140; } else { } ldv_54139: ; return (i < (int )adapter->priv_num ? adapter->priv[i] : (struct mwifiex_private *)0); } } struct ethtool_ops const mwifiex_ethtool_ops ; void mwifiex_dev_debugfs_init(struct mwifiex_private *priv ) ; void mwifiex_dev_debugfs_remove(struct mwifiex_private *priv ) ; static char *reg_alpha2 ; static struct ieee80211_iface_limit const mwifiex_ap_sta_limits[2U] = { {2U, 772U}, {1U, 8U}}; static struct ieee80211_iface_combination const mwifiex_iface_comb_ap_sta = {(struct ieee80211_iface_limit const *)(& mwifiex_ap_sta_limits), 1U, 3U, 2U, 1, (unsigned char)0}; static struct ieee80211_regdomain const mwifiex_world_regdom_custom = {{0, 0}, 7U, {'9', '9'}, 0, {{{2402000U, 2472000U, 40000U}, {300U, 2000U}, 0U}, {{2457000U, 2482000U, 20000U}, {300U, 2000U}, 128U}, {{2474000U, 2494000U, 20000U}, {300U, 2000U}, 129U}, {{5170000U, 5250000U, 40000U}, {300U, 2000U}, 128U}, {{5735000U, 5835000U, 40000U}, {300U, 2000U}, 128U}, {{5250000U, 5330000U, 40000U}, {300U, 3000U}, 144U}, {{5490000U, 5710000U, 40000U}, {300U, 3000U}, 144U}}}; u8 mwifiex_chan_type_to_sec_chan_offset(enum nl80211_channel_type chan_type ) { { { if ((unsigned int )chan_type == 0U) { goto case_0; } else { } if ((unsigned int )chan_type == 1U) { goto case_1; } else { } if ((unsigned int )chan_type == 3U) { goto case_3; } else { } if ((unsigned int )chan_type == 2U) { goto case_2; } else { } goto switch_default; case_0: /* CIL Label */ ; case_1: /* CIL Label */ ; return (0U); case_3: /* CIL Label */ ; return (1U); case_2: /* CIL Label */ ; return (3U); switch_default: /* CIL Label */ ; return (0U); switch_break: /* CIL Label */ ; } } } static int mwifiex_is_alg_wep(u32 cipher ) { { { if (cipher == 1027073U) { goto case_1027073; } else { } if (cipher == 1027077U) { goto case_1027077; } else { } goto switch_default; case_1027073: /* CIL Label */ ; case_1027077: /* CIL Label */ ; return (1); switch_default: /* CIL Label */ ; goto ldv_54357; switch_break: /* CIL Label */ ; } ldv_54357: ; return (0); } } static void *mwifiex_cfg80211_get_adapter(struct wiphy *wiphy ) { void *tmp ; { { tmp = wiphy_priv(wiphy); } return ((void *)*((unsigned long *)tmp)); } } static int mwifiex_cfg80211_del_key(struct wiphy *wiphy , struct net_device *netdev , u8 key_index , bool pairwise , u8 const *mac_addr ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u8 bc_mac[6U] ; u8 const *peer_mac ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { { tmp = mwifiex_netdev_get_priv(netdev); priv = tmp; bc_mac[0] = 255U; bc_mac[1] = 255U; bc_mac[2] = 255U; bc_mac[3] = 255U; bc_mac[4] = 255U; bc_mac[5] = 255U; peer_mac = (int )pairwise ? mac_addr : (u8 const *)(& bc_mac); tmp___0 = mwifiex_set_encode(priv, (struct key_params *)0, (u8 const *)0U, 0, (int )key_index, peer_mac, 1); } if (tmp___0 != 0) { { dev_err((struct device const *)(& wiphy->dev), "deleting the crypto keys\n"); } return (-14); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_del_key"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: crypto keys deleted\n"; descriptor.lineno = 141U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: crypto keys deleted\n"); } } else { } return (0); } } static int mwifiex_form_mgmt_frame(struct sk_buff *skb , u8 const *buf , size_t len ) { u8 addr[6U] ; u16 pkt_len ; u32 tx_control ; u32 pkt_type ; struct timeval tv ; unsigned char *tmp ; unsigned char *tmp___0 ; unsigned char *tmp___1 ; unsigned char *tmp___2 ; unsigned char *tmp___3 ; unsigned char *tmp___4 ; { { addr[0] = 255U; addr[1] = 255U; addr[2] = 255U; addr[3] = 255U; addr[4] = 255U; addr[5] = 255U; tx_control = 0U; pkt_type = 229U; pkt_len = (unsigned int )((u16 )len) + 6U; skb_reserve(skb, 46); tmp = skb_push(skb, 2U); memcpy((void *)tmp, (void const *)(& pkt_len), 2UL); tmp___0 = skb_push(skb, 4U); memcpy((void *)tmp___0, (void const *)(& tx_control), 4UL); tmp___1 = skb_push(skb, 4U); memcpy((void *)tmp___1, (void const *)(& pkt_type), 4UL); tmp___2 = skb_put(skb, 24U); memcpy((void *)tmp___2, (void const *)buf, 24UL); tmp___3 = skb_put(skb, 6U); memcpy((void *)tmp___3, (void const *)(& addr), 6UL); tmp___4 = skb_put(skb, (unsigned int )len - 24U); memcpy((void *)tmp___4, (void const *)buf + 24U, len - 24UL); skb->priority = 0U; do_gettimeofday(& tv); skb->tstamp = timeval_to_ktime(tv); } return (0); } } static int mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy , struct wireless_dev *wdev , struct cfg80211_mgmt_tx_params *params , u64 *cookie ) { u8 const *buf ; size_t len ; struct sk_buff *skb ; u16 pkt_len ; struct ieee80211_mgmt const *mgmt ; struct mwifiex_txinfo *tx_info ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; u32 tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; { { buf = params->buf; len = params->len; tmp = mwifiex_netdev_get_priv(wdev->netdev); priv = tmp; } if ((unsigned long )buf == (unsigned long )((u8 const *)0U) || len == 0UL) { { dev_err((struct device const *)(& wiphy->dev), "invalid buffer and length\n"); } return (-14); } else { } mgmt = (struct ieee80211_mgmt const *)buf; if ((int )priv->bss_role & 1) { { tmp___1 = ieee80211_is_probe_resp((int )mgmt->frame_control); } if (tmp___1 != 0) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_mgmt_tx"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: skip to send probe resp in AP or GO mode\n"; descriptor.lineno = 208U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: skip to send probe resp in AP or GO mode\n"); } } else { } return (0); } else { } } else { } { pkt_len = (unsigned int )((u16 )len) + 6U; skb = dev_alloc_skb((unsigned int )pkt_len + 46U); } if ((unsigned long )skb == (unsigned long )((struct sk_buff *)0)) { { dev_err((struct device const *)(& wiphy->dev), "allocate skb failed for management frame\n"); } return (-12); } else { } { tx_info = MWIFIEX_SKB_TXCB(skb); tx_info->bss_num = priv->bss_num; tx_info->bss_type = priv->bss_type; tx_info->pkt_len = (u32 )pkt_len; mwifiex_form_mgmt_frame(skb, buf, len); mwifiex_queue_tx_pkt(priv, skb); tmp___2 = prandom_u32(); *cookie = (u64 )(tmp___2 | 1U); cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, 1, 32U); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_mgmt_tx"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "info: management frame transmitted\n"; descriptor___0.lineno = 233U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(& wiphy->dev), "info: management frame transmitted\n"); } } else { } return (0); } } static void mwifiex_cfg80211_mgmt_frame_register(struct wiphy *wiphy , struct wireless_dev *wdev , u16 frame_type , bool reg ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u32 mask ; struct _ddebug descriptor ; long tmp___0 ; { { tmp = mwifiex_netdev_get_priv(wdev->netdev); priv = tmp; } if ((int )reg) { mask = priv->mgmt_frame_mask | (u32 )(1UL << ((int )frame_type >> 4)); } else { mask = priv->mgmt_frame_mask & ~ ((u32 )(1UL << ((int )frame_type >> 4))); } if (mask != priv->mgmt_frame_mask) { { priv->mgmt_frame_mask = mask; mwifiex_send_cmd_async(priv, 268, 1, 0U, (void *)(& priv->mgmt_frame_mask)); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_mgmt_frame_register"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: mgmt frame registered\n"; descriptor.lineno = 258U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: mgmt frame registered\n"); } } else { } } else { } return; } } static int mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy , struct wireless_dev *wdev , struct ieee80211_channel *chan , unsigned int duration , u64 *cookie ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int ret ; struct _ddebug descriptor ; long tmp___0 ; u32 tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; { { tmp = mwifiex_netdev_get_priv(wdev->netdev); priv = tmp; } if ((unsigned long )chan == (unsigned long )((struct ieee80211_channel *)0) || (unsigned long )cookie == (unsigned long )((u64 *)0ULL)) { { dev_err((struct device const *)(& wiphy->dev), "Invalid parameter for ROC\n"); } return (-22); } else { } if (priv->roc_cfg.cookie != 0ULL) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_remain_on_channel"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: ongoing ROC, cookie = 0x%llu\n"; descriptor.lineno = 281U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: ongoing ROC, cookie = 0x%llu\n", priv->roc_cfg.cookie); } } else { } return (-16); } else { } { ret = mwifiex_remain_on_chan_cfg(priv, 1, chan, duration); } if (ret == 0) { { tmp___1 = prandom_u32(); *cookie = (u64 )(tmp___1 | 1U); priv->roc_cfg.cookie = *cookie; priv->roc_cfg.chan = *chan; cfg80211_ready_on_channel(wdev, *cookie, chan, duration, 32U); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_remain_on_channel"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "info: ROC, cookie = 0x%llx\n"; descriptor___0.lineno = 296U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(& wiphy->dev), "info: ROC, cookie = 0x%llx\n", *cookie); } } else { } } else { } return (ret); } } static int mwifiex_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy , struct wireless_dev *wdev , u64 cookie ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int ret ; struct _ddebug descriptor ; long tmp___0 ; { { tmp = mwifiex_netdev_get_priv(wdev->netdev); priv = tmp; } if (cookie != priv->roc_cfg.cookie) { return (-2); } else { } { ret = mwifiex_remain_on_chan_cfg(priv, 4, & priv->roc_cfg.chan, 0U); } if (ret == 0) { { cfg80211_remain_on_channel_expired(wdev, cookie, & priv->roc_cfg.chan, 32U); memset((void *)(& priv->roc_cfg), 0, 64UL); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_cancel_remain_on_channel"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: cancel ROC, cookie = 0x%llx\n"; descriptor.lineno = 325U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: cancel ROC, cookie = 0x%llx\n", cookie); } } else { } } else { } return (ret); } } static int mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy , struct wireless_dev *wdev , enum nl80211_tx_power_setting type , int mbm ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct mwifiex_power_cfg power_cfg ; int dbm ; int tmp___0 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; dbm = mbm / 100; } if ((unsigned int )type == 2U) { power_cfg.is_power_auto = 0U; power_cfg.power_level = (u32 )dbm; } else { power_cfg.is_power_auto = 1U; } { priv = mwifiex_get_priv___3(adapter, 255); tmp___0 = mwifiex_set_tx_power(priv, & power_cfg); } return (tmp___0); } } static int mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy , struct net_device *dev , bool enabled , int timeout ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u32 ps_mode ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if (timeout != 0) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_set_power_mgmt"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: ignore timeout value for IEEE Power Save\n"; descriptor.lineno = 372U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: ignore timeout value for IEEE Power Save\n"); } } else { } } else { } { ps_mode = (u32 )enabled; tmp___1 = mwifiex_drv_set_power(priv, & ps_mode); } return (tmp___1); } } static int mwifiex_cfg80211_set_default_key(struct wiphy *wiphy , struct net_device *netdev , u8 key_index , bool unicast , bool multicast ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; { { tmp = mwifiex_netdev_get_priv(netdev); priv = tmp; } if ((unsigned int )priv->sec_info.wep_enabled == 0U) { return (0); } else { } if ((unsigned int )priv->bss_type == 1U) { priv->wep_key_curr_index = (u16 )key_index; } else { { tmp___0 = mwifiex_set_encode(priv, (struct key_params *)0, (u8 const *)0U, 0, (int )key_index, (u8 const *)0U, 0); } if (tmp___0 != 0) { { dev_err((struct device const *)(& wiphy->dev), "set default Tx key index\n"); } return (-14); } else { } } return (0); } } static int mwifiex_cfg80211_add_key(struct wiphy *wiphy , struct net_device *netdev , u8 key_index , bool pairwise , u8 const *mac_addr , struct key_params *params ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct mwifiex_wep_key *wep_key ; u8 bc_mac[6U] ; u8 const *peer_mac ; int tmp___0 ; { { tmp = mwifiex_netdev_get_priv(netdev); priv = tmp; bc_mac[0] = 255U; bc_mac[1] = 255U; bc_mac[2] = 255U; bc_mac[3] = 255U; bc_mac[4] = 255U; bc_mac[5] = 255U; peer_mac = (int )pairwise ? mac_addr : (u8 const *)(& bc_mac); } if ((int )priv->bss_role & 1 && (params->cipher == 1027073U || params->cipher == 1027077U)) { if ((unsigned long )params->key != (unsigned long )((u8 *)0U) && params->key_len != 0) { { wep_key = (struct mwifiex_wep_key *)(& priv->wep_key) + (unsigned long )key_index; memset((void *)wep_key, 0, 28UL); memcpy((void *)(& wep_key->key_material), (void const *)params->key, (size_t )params->key_len); wep_key->key_index = (u32 )key_index; wep_key->key_length = (u32 )params->key_len; priv->sec_info.wep_enabled = 1U; } } else { } return (0); } else { } { tmp___0 = mwifiex_set_encode(priv, params, (u8 const *)params->key, params->key_len, (int )key_index, peer_mac, 0); } if (tmp___0 != 0) { { dev_err((struct device const *)(& wiphy->dev), "crypto keys added\n"); } return (-14); } else { } return (0); } } static int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy ) { u8 no_of_triplet ; struct ieee80211_country_ie_triplet *t ; u8 no_of_parsed_chan ; u8 first_chan ; u8 next_chan ; u8 max_pwr ; u8 i ; u8 flag ; enum ieee80211_band band ; struct ieee80211_supported_band *sband ; struct ieee80211_channel *ch ; struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct mwifiex_802_11d_domain_reg *domain_info ; u8 tmp___0 ; int tmp___1 ; { { no_of_triplet = 0U; no_of_parsed_chan = 0U; first_chan = 0U; next_chan = 0U; max_pwr = 0U; flag = 0U; tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; domain_info = & adapter->domain_reg; domain_info->country_code[0] = adapter->country_code[0]; domain_info->country_code[1] = adapter->country_code[1]; domain_info->country_code[2] = 32U; tmp___0 = mwifiex_band_to_radio_type((int )adapter->config_bands); band = (enum ieee80211_band )tmp___0; } if ((unsigned long )wiphy->bands[(unsigned int )band] == (unsigned long )((struct ieee80211_supported_band *)0)) { { dev_err((struct device const *)(& wiphy->dev), "11D: setting domain info in FW\n"); } return (-1); } else { } sband = wiphy->bands[(unsigned int )band]; i = 0U; goto ldv_54489; ldv_54488: ch = sband->channels + (unsigned long )i; if ((int )ch->flags & 1) { goto ldv_54487; } else { } if ((unsigned int )flag == 0U) { flag = 1U; first_chan = (u8 )ch->hw_value; next_chan = first_chan; max_pwr = (u8 )ch->max_power; no_of_parsed_chan = 1U; goto ldv_54487; } else { } if ((int )ch->hw_value == (int )next_chan + 1 && ch->max_power == (int )max_pwr) { next_chan = (u8 )((int )next_chan + 1); no_of_parsed_chan = (u8 )((int )no_of_parsed_chan + 1); } else { t = (struct ieee80211_country_ie_triplet *)(& domain_info->triplet) + (unsigned long )no_of_triplet; t->__annonCompField85.chans.first_channel = first_chan; t->__annonCompField85.chans.num_channels = no_of_parsed_chan; t->__annonCompField85.chans.max_power = (s8 )max_pwr; no_of_triplet = (u8 )((int )no_of_triplet + 1); first_chan = (u8 )ch->hw_value; next_chan = first_chan; max_pwr = (u8 )ch->max_power; no_of_parsed_chan = 1U; } ldv_54487: i = (u8 )((int )i + 1); ldv_54489: ; if ((int )i < sband->n_channels) { goto ldv_54488; } else { } if ((unsigned int )flag != 0U) { t = (struct ieee80211_country_ie_triplet *)(& domain_info->triplet) + (unsigned long )no_of_triplet; t->__annonCompField85.chans.first_channel = first_chan; t->__annonCompField85.chans.num_channels = no_of_parsed_chan; t->__annonCompField85.chans.max_power = (s8 )max_pwr; no_of_triplet = (u8 )((int )no_of_triplet + 1); } else { } { domain_info->no_of_triplet = no_of_triplet; priv = mwifiex_get_priv___3(adapter, 255); tmp___1 = mwifiex_send_cmd_async(priv, 91, 1, 0U, (void *)0); } if (tmp___1 != 0) { { dev_err((struct device const *)(& wiphy->dev), "11D: setting domain info in FW\n"); } return (-1); } else { } return (0); } } static void mwifiex_reg_notifier(struct wiphy *wiphy , struct regulatory_request *request ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct mwifiex_private *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; int tmp___3 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; tmp___0 = mwifiex_get_priv___3(adapter, 255); priv = tmp___0; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_reg_notifier"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: cfg80211 regulatory domain callback for %c%c\n"; descriptor.lineno = 545U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: cfg80211 regulatory domain callback for %c%c\n", (int )request->alpha2[0], (int )request->alpha2[1]); } } else { } { if ((unsigned int )request->initiator == 2U) { goto case_2; } else { } if ((unsigned int )request->initiator == 0U) { goto case_0; } else { } if ((unsigned int )request->initiator == 1U) { goto case_1; } else { } if ((unsigned int )request->initiator == 3U) { goto case_3; } else { } goto switch_default; case_2: /* CIL Label */ ; case_0: /* CIL Label */ ; case_1: /* CIL Label */ ; case_3: /* CIL Label */ ; goto ldv_54503; switch_default: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "unknown regdom initiator: %d\n", (unsigned int )request->initiator); } return; switch_break: /* CIL Label */ ; } ldv_54503: { tmp___2 = strncmp((char const *)(& request->alpha2), "00", 2UL); } if (tmp___2 != 0) { { tmp___3 = strncmp((char const *)(& request->alpha2), (char const *)(& adapter->country_code), 2UL); } if (tmp___3 != 0) { { memcpy((void *)(& adapter->country_code), (void const *)(& request->alpha2), 2UL); mwifiex_send_domain_info_cmd_fw(wiphy); mwifiex_dnld_txpwr_table(priv); } } else { } } else { } return; } } static int mwifiex_set_frag(struct mwifiex_private *priv , u32 frag_thr ) { int tmp ; { if (frag_thr - 256U > 2090U) { frag_thr = 2346U; } else { } { tmp = mwifiex_send_cmd_sync(priv, 22, 1, 8U, (void *)(& frag_thr)); } return (tmp); } } static int mwifiex_set_rts(struct mwifiex_private *priv , u32 rts_thr ) { int tmp ; { if (rts_thr > 2347U) { rts_thr = 2347U; } else { } { tmp = mwifiex_send_cmd_sync(priv, 22, 1, 5U, (void *)(& rts_thr)); } return (tmp); } } static int mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy , u32 changed ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct mwifiex_uap_bss_param *bss_cfg ; int ret ; int bss_started ; int i ; void *tmp___0 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; i = 0; } goto ldv_54527; ldv_54526: priv = adapter->priv[i]; { if ((int )priv->bss_role == 1) { goto case_1; } else { } if ((int )priv->bss_role == 0) { goto case_0; } else { } goto switch_break; case_1: /* CIL Label */ { tmp___0 = kzalloc(292UL, 208U); bss_cfg = (struct mwifiex_uap_bss_param *)tmp___0; } if ((unsigned long )bss_cfg == (unsigned long )((struct mwifiex_uap_bss_param *)0)) { return (-12); } else { } { mwifiex_set_sys_config_invalid_data(bss_cfg); } if ((changed & 8U) != 0U) { bss_cfg->rts_threshold = (u16 )wiphy->rts_threshold; } else { } if ((changed & 4U) != 0U) { bss_cfg->frag_threshold = (u16 )wiphy->frag_threshold; } else { } if ((changed & 2U) != 0U) { bss_cfg->retry_limit = wiphy->retry_long; } else { } { bss_started = (int )priv->bss_started; ret = mwifiex_send_cmd_sync(priv, 178, 1, 0U, (void *)0); } if (ret != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to stop the BSS\n"); kfree((void const *)bss_cfg); } return (ret); } else { } { ret = mwifiex_send_cmd_async(priv, 176, 1, 0U, (void *)bss_cfg); kfree((void const *)bss_cfg); } if (ret != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to set bss config\n"); } return (ret); } else { } if (bss_started == 0) { goto ldv_54524; } else { } { ret = mwifiex_send_cmd_async(priv, 177, 1, 0U, (void *)0); } if (ret != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to start BSS\n"); } return (ret); } else { } goto ldv_54524; case_0: /* CIL Label */ ; if ((changed & 8U) != 0U) { { ret = mwifiex_set_rts(priv, wiphy->rts_threshold); } if (ret != 0) { return (ret); } else { } } else { } if ((changed & 4U) != 0U) { { ret = mwifiex_set_frag(priv, wiphy->frag_threshold); } if (ret != 0) { return (ret); } else { } } else { } goto ldv_54524; switch_break: /* CIL Label */ ; } ldv_54524: i = i + 1; ldv_54527: ; if (i < (int )adapter->priv_num) { goto ldv_54526; } else { } return (0); } } static int mwifiex_cfg80211_deinit_p2p(struct mwifiex_private *priv ) { u16 mode ; int tmp ; { mode = 0U; if ((int )priv->bss_role & 1) { { mwifiex_set_bss_role(priv, 0); } } else { } { tmp = mwifiex_send_cmd_sync(priv, 235, 1, 0U, (void *)(& mode)); } if (tmp != 0) { return (-1); } else { } return (0); } } static int mwifiex_cfg80211_init_p2p_client(struct mwifiex_private *priv ) { u16 mode ; int tmp ; int tmp___0 ; int tmp___1 ; { { tmp = mwifiex_cfg80211_deinit_p2p(priv); } if (tmp != 0) { return (-1); } else { } { mode = 1U; tmp___0 = mwifiex_send_cmd_sync(priv, 235, 1, 0U, (void *)(& mode)); } if (tmp___0 != 0) { return (-1); } else { } { mode = 3U; tmp___1 = mwifiex_send_cmd_sync(priv, 235, 1, 0U, (void *)(& mode)); } if (tmp___1 != 0) { return (-1); } else { } return (0); } } static int mwifiex_cfg80211_init_p2p_go(struct mwifiex_private *priv ) { u16 mode ; int tmp ; int tmp___0 ; int tmp___1 ; { { tmp = mwifiex_cfg80211_deinit_p2p(priv); } if (tmp != 0) { return (-1); } else { } { mode = 1U; tmp___0 = mwifiex_send_cmd_sync(priv, 235, 1, 0U, (void *)(& mode)); } if (tmp___0 != 0) { return (-1); } else { } { mode = 2U; tmp___1 = mwifiex_send_cmd_sync(priv, 235, 1, 0U, (void *)(& mode)); } if (tmp___1 != 0) { return (-1); } else { } if (((unsigned long )priv->bss_role & 1UL) == 0UL) { { mwifiex_set_bss_role(priv, 1); } } else { } return (0); } } static int mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy , struct net_device *dev , enum nl80211_iftype type , u32 *flags , struct vif_params *params ) { int ret ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } { if ((unsigned int )(dev->ieee80211_ptr)->iftype == 1U) { goto case_1; } else { } if ((unsigned int )(dev->ieee80211_ptr)->iftype == 2U) { goto case_2___0; } else { } if ((unsigned int )(dev->ieee80211_ptr)->iftype == 3U) { goto case_3___1; } else { } if ((unsigned int )(dev->ieee80211_ptr)->iftype == 8U) { goto case_8___0; } else { } if ((unsigned int )(dev->ieee80211_ptr)->iftype == 9U) { goto case_9___0; } else { } goto switch_default___3; case_1: /* CIL Label */ ; { if ((unsigned int )type == 2U) { goto case_2; } else { } if ((unsigned int )type == 0U) { goto case_0; } else { } if ((unsigned int )type == 1U) { goto case_1___0; } else { } if ((unsigned int )type == 3U) { goto case_3; } else { } goto switch_default; case_2: /* CIL Label */ ; goto ldv_54552; case_0: /* CIL Label */ { dev_warn((struct device const *)(& wiphy->dev), "%s: kept type as IBSS\n", (char *)(& dev->name)); } case_1___0: /* CIL Label */ ; return (0); case_3: /* CIL Label */ ; switch_default: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "%s: changing to %d not supported\n", (char *)(& dev->name), (unsigned int )type); } return (-95); switch_break___0: /* CIL Label */ ; } ldv_54552: ; goto ldv_54557; case_2___0: /* CIL Label */ ; { if ((unsigned int )type == 1U) { goto case_1___1; } else { } if ((unsigned int )type == 8U) { goto case_8; } else { } if ((unsigned int )type == 9U) { goto case_9; } else { } if ((unsigned int )type == 0U) { goto case_0___0; } else { } if ((unsigned int )type == 2U) { goto case_2___1; } else { } if ((unsigned int )type == 3U) { goto case_3___0; } else { } goto switch_default___0; case_1___1: /* CIL Label */ ; goto ldv_54560; case_8: /* CIL Label */ { tmp___0 = mwifiex_cfg80211_init_p2p_client(priv); } if (tmp___0 != 0) { return (-14); } else { } (dev->ieee80211_ptr)->iftype = type; return (0); case_9: /* CIL Label */ { tmp___1 = mwifiex_cfg80211_init_p2p_go(priv); } if (tmp___1 != 0) { return (-14); } else { } (dev->ieee80211_ptr)->iftype = type; return (0); case_0___0: /* CIL Label */ { dev_warn((struct device const *)(& wiphy->dev), "%s: kept type as STA\n", (char *)(& dev->name)); } case_2___1: /* CIL Label */ ; return (0); case_3___0: /* CIL Label */ ; switch_default___0: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "%s: changing to %d not supported\n", (char *)(& dev->name), (unsigned int )type); } return (-95); switch_break___1: /* CIL Label */ ; } ldv_54560: ; goto ldv_54557; case_3___1: /* CIL Label */ ; { if ((unsigned int )type == 0U) { goto case_0___1; } else { } if ((unsigned int )type == 3U) { goto case_3___2; } else { } if ((unsigned int )type == 1U) { goto case_1___2; } else { } if ((unsigned int )type == 2U) { goto case_2___2; } else { } goto switch_default___1; case_0___1: /* CIL Label */ { dev_warn((struct device const *)(& wiphy->dev), "%s: kept type as AP\n", (char *)(& dev->name)); } case_3___2: /* CIL Label */ ; return (0); case_1___2: /* CIL Label */ ; case_2___2: /* CIL Label */ ; switch_default___1: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "%s: changing to %d not supported\n", (char *)(& dev->name), (unsigned int )type); } return (-95); switch_break___2: /* CIL Label */ ; } goto ldv_54557; case_8___0: /* CIL Label */ ; case_9___0: /* CIL Label */ ; { if ((unsigned int )type == 2U) { goto case_2___3; } else { } goto switch_default___2; case_2___3: /* CIL Label */ { tmp___2 = mwifiex_cfg80211_deinit_p2p(priv); } if (tmp___2 != 0) { return (-14); } else { } (dev->ieee80211_ptr)->iftype = type; return (0); switch_default___2: /* CIL Label */ ; return (-95); switch_break___3: /* CIL Label */ ; } goto ldv_54557; switch_default___3: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "%s: unknown iftype: %d\n", (char *)(& dev->name), (unsigned int )(dev->ieee80211_ptr)->iftype); } return (-95); switch_break: /* CIL Label */ ; } ldv_54557: { (dev->ieee80211_ptr)->iftype = type; priv->bss_mode = (u32 )type; mwifiex_deauthenticate(priv, (u8 *)0U); priv->sec_info.authentication_mode = 0U; ret = mwifiex_send_cmd_sync(priv, 247, 1, 0U, (void *)0); } return (ret); } } static void mwifiex_parse_htinfo(struct mwifiex_private *priv , u8 tx_htinfo , struct rate_info *rate ) { struct mwifiex_adapter *adapter ; { adapter = priv->adapter; if (adapter->is_hw_11ac_capable != 0U) { if ((int )tx_htinfo & 1) { rate->mcs = priv->tx_rate; rate->flags = (u8 )((unsigned int )rate->flags | 1U); } else { } if (((unsigned long )tx_htinfo & 2UL) != 0UL) { rate->mcs = (unsigned int )priv->tx_rate & 15U; rate->flags = (u8 )((unsigned int )rate->flags | 2U); } else { } if (((unsigned long )tx_htinfo & 3UL) != 0UL) { { if (((unsigned long )tx_htinfo & 12UL) == 0UL) { goto case_0; } else { } if (((unsigned long )tx_htinfo & 12UL) == 4UL) { goto case_4; } else { } if (((unsigned long )tx_htinfo & 12UL) == 8UL) { goto case_8; } else { } if (((unsigned long )tx_htinfo & 12UL) == 12UL) { goto case_12; } else { } goto switch_break; case_0: /* CIL Label */ ; goto ldv_54585; case_4: /* CIL Label */ rate->flags = (u8 )((unsigned int )rate->flags | 4U); goto ldv_54585; case_8: /* CIL Label */ rate->flags = (u8 )((unsigned int )rate->flags | 8U); goto ldv_54585; case_12: /* CIL Label */ rate->flags = (u8 )((unsigned int )rate->flags | 32U); goto ldv_54585; switch_break: /* CIL Label */ ; } ldv_54585: ; if (((unsigned long )tx_htinfo & 16UL) != 0UL) { rate->flags = (u8 )((unsigned int )rate->flags | 64U); } else { } if ((unsigned int )((int )priv->tx_rate >> 4) == 1U) { rate->nss = 2U; } else { rate->nss = 1U; } } else { } } else if ((int )tx_htinfo & 1 && (unsigned int )priv->tx_rate <= 15U) { rate->mcs = priv->tx_rate; rate->flags = (u8 )((unsigned int )rate->flags | 1U); if (((unsigned long )tx_htinfo & 2UL) != 0UL) { rate->flags = (u8 )((unsigned int )rate->flags | 4U); } else { } if (((unsigned long )tx_htinfo & 4UL) != 0UL) { rate->flags = (u8 )((unsigned int )rate->flags | 64U); } else { } } else { } return; } } static int mwifiex_dump_station_info(struct mwifiex_private *priv , struct station_info *sinfo ) { u32 rate ; int tmp ; int tmp___0 ; { { sinfo->filled = 9158U; tmp = mwifiex_send_cmd_sync(priv, 164, 0, 0U, (void *)0); } if (tmp != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "failed to get signal information\n"); } return (-14); } else { } { tmp___0 = mwifiex_drv_get_data_rate(priv, & rate); } if (tmp___0 != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "getting data rate\n"); } return (-14); } else { } { mwifiex_send_cmd_sync(priv, 22, 0, 3U, (void *)(& priv->dtim_period)); mwifiex_parse_htinfo(priv, (int )priv->tx_htinfo, & sinfo->txrate); sinfo->signal_avg = (s8 )priv->bcn_rssi_avg; sinfo->rx_bytes = (u64 )priv->stats.rx_bytes; sinfo->tx_bytes = (u64 )priv->stats.tx_bytes; sinfo->rx_packets = (u32 )priv->stats.rx_packets; sinfo->tx_packets = (u32 )priv->stats.tx_packets; sinfo->signal = (s8 )priv->bcn_rssi_avg; sinfo->txrate.legacy = (unsigned int )((u16 )rate) * 5U; } if (priv->bss_mode == 2U) { sinfo->filled = sinfo->filled | 32768U; sinfo->bss_param.flags = 0U; if (((int )priv->curr_bss_params.bss_descriptor.cap_info_bitmap & 32) != 0) { sinfo->bss_param.flags = (u8 )((unsigned int )sinfo->bss_param.flags | 2U); } else { } if (((int )priv->curr_bss_params.bss_descriptor.cap_info_bitmap & 1024) != 0) { sinfo->bss_param.flags = (u8 )((unsigned int )sinfo->bss_param.flags | 4U); } else { } sinfo->bss_param.dtim_period = priv->dtim_period; sinfo->bss_param.beacon_interval = priv->curr_bss_params.bss_descriptor.beacon_period; } else { } return (0); } } static int mwifiex_cfg80211_get_station(struct wiphy *wiphy , struct net_device *dev , u8 *mac , struct station_info *sinfo ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((unsigned int )priv->media_connected == 0U) { return (-2); } else { } { tmp___0 = memcmp((void const *)mac, (void const *)(& priv->cfg_bssid), 6UL); } if (tmp___0 != 0) { return (-2); } else { } { tmp___1 = mwifiex_dump_station_info(priv, sinfo); } return (tmp___1); } } static int mwifiex_cfg80211_dump_station(struct wiphy *wiphy , struct net_device *dev , int idx , u8 *mac , struct station_info *sinfo ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((unsigned int )priv->media_connected == 0U || idx != 0) { return (-2); } else { } { memcpy((void *)mac, (void const *)(& priv->cfg_bssid), 6UL); tmp___0 = mwifiex_dump_station_info(priv, sinfo); } return (tmp___0); } } static struct ieee80211_rate mwifiex_rates[12U] = { {0U, 10U, 2U, (unsigned short)0}, {0U, 20U, 4U, (unsigned short)0}, {0U, 55U, 11U, (unsigned short)0}, {0U, 110U, 22U, (unsigned short)0}, {0U, 60U, 12U, (unsigned short)0}, {0U, 90U, 18U, (unsigned short)0}, {0U, 120U, 24U, (unsigned short)0}, {0U, 180U, 36U, (unsigned short)0}, {0U, 240U, 48U, (unsigned short)0}, {0U, 360U, 72U, (unsigned short)0}, {0U, 480U, 96U, (unsigned short)0}, {0U, 540U, 108U, (unsigned short)0}}; static struct ieee80211_channel mwifiex_channels_2ghz[14U] = { {0, 2412U, 1U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2417U, 2U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2422U, 3U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2427U, 4U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2432U, 5U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2437U, 6U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2442U, 7U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2447U, 8U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2452U, 9U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2457U, 10U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2462U, 11U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2467U, 12U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2472U, 13U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 2484U, 14U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}}; static struct ieee80211_supported_band mwifiex_band_2ghz = {(struct ieee80211_channel *)(& mwifiex_channels_2ghz), (struct ieee80211_rate *)(& mwifiex_rates), 0, 14, 12, {(unsigned short)0, (_Bool)0, (unsigned char)0, (unsigned char)0, {{(unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0}, (unsigned short)0, (unsigned char)0, {(unsigned char)0, (unsigned char)0, (unsigned char)0}}}, {(_Bool)0, 0U, {(unsigned short)0, (unsigned short)0, (unsigned short)0, (unsigned short)0}}}; static struct ieee80211_channel mwifiex_channels_5ghz[31U] = { {0, 5040U, 8U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5060U, 12U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5080U, 16U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5170U, 34U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5190U, 38U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5210U, 42U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5230U, 46U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5180U, 36U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5200U, 40U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5220U, 44U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5240U, 48U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5260U, 52U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5280U, 56U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5300U, 60U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5320U, 64U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5500U, 100U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5520U, 104U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5540U, 108U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5560U, 112U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5580U, 116U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5600U, 120U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5620U, 124U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5640U, 128U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5660U, 132U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5680U, 136U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5700U, 140U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5745U, 149U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5765U, 153U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5785U, 157U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5805U, 161U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}, {0, 5825U, 165U, 0U, 0, 0, 0, (_Bool)0, 0U, 0, 0, 0, 0UL}}; static struct ieee80211_supported_band mwifiex_band_5ghz = {(struct ieee80211_channel *)(& mwifiex_channels_5ghz), (struct ieee80211_rate *)(& mwifiex_rates) + 4UL, 0, 31, 8, {(unsigned short)0, (_Bool)0, (unsigned char)0, (unsigned char)0, {{(unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0, (unsigned char)0}, (unsigned short)0, (unsigned char)0, {(unsigned char)0, (unsigned char)0, (unsigned char)0}}}, {(_Bool)0, 0U, {(unsigned short)0, (unsigned short)0, (unsigned short)0, (unsigned short)0}}}; static u32 const mwifiex_cipher_suites[5U] = { 1027073U, 1027077U, 1027074U, 1027076U, 1027078U}; static struct ieee80211_txrx_stypes const mwifiex_mgmt_stypes[11U] = { {(unsigned short)0, (unsigned short)0}, {(unsigned short)0, (unsigned short)0}, {8224U, 8208U}, {8224U, 8208U}, {(unsigned short)0, (unsigned short)0}, {(unsigned short)0, (unsigned short)0}, {(unsigned short)0, (unsigned short)0}, {(unsigned short)0, (unsigned short)0}, {8224U, 8208U}, {8224U, 8208U}}; static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy , struct net_device *dev , u8 const *peer , struct cfg80211_bitrate_mask const *mask ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u16 bitmap_rates[10U] ; enum ieee80211_band band ; u8 tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((unsigned int )priv->media_connected == 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "Can not set Tx data rate in disconnected state\n"); } return (-22); } else { } { tmp___0 = mwifiex_band_to_radio_type((int )priv->curr_bss_params.band); band = (enum ieee80211_band )tmp___0; memset((void *)(& bitmap_rates), 0, 20UL); } if ((unsigned int )band == 0U) { bitmap_rates[0] = (unsigned int )((u16 )mask->control[(unsigned int )band].legacy) & 15U; } else { } if ((unsigned int )band == 0U) { bitmap_rates[1] = (u16 )(((unsigned int )mask->control[(unsigned int )band].legacy & 4080U) >> 4); } else { bitmap_rates[1] = (u16 )mask->control[(unsigned int )band].legacy; } bitmap_rates[2] = (u16 )mask->control[(unsigned int )band].ht_mcs[0]; if ((unsigned int )(priv->adapter)->hw_dev_mcs_support == 34U) { bitmap_rates[2] = (u16 )((int )((short )bitmap_rates[2]) | (int )((short )((int )mask->control[(unsigned int )band].ht_mcs[1] << 8))); } else { } { tmp___1 = mwifiex_send_cmd_sync(priv, 214, 1, 0U, (void *)(& bitmap_rates)); } return (tmp___1); } } static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy , struct net_device *dev , s32 rssi_thold , u32 rssi_hyst ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct mwifiex_ds_misc_subsc_evt subsc_evt ; long ret ; int __x___0 ; long ret___0 ; int __x___2 ; int tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; priv->cqm_rssi_thold = rssi_thold; priv->cqm_rssi_hyst = rssi_hyst; memset((void *)(& subsc_evt), 0, 8UL); subsc_evt.events = 17U; } if (rssi_thold != 0 && rssi_hyst != 0U) { { subsc_evt.action = 2U; __x___0 = rssi_thold; ret = (long )(__x___0 < 0 ? - __x___0 : __x___0); subsc_evt.bcn_l_rssi_cfg.abs_value = (u8 )ret; __x___2 = rssi_thold; ret___0 = (long )(__x___2 < 0 ? - __x___2 : __x___2); subsc_evt.bcn_h_rssi_cfg.abs_value = (u8 )ret___0; subsc_evt.bcn_l_rssi_cfg.evt_freq = 1U; subsc_evt.bcn_h_rssi_cfg.evt_freq = 1U; tmp___0 = mwifiex_send_cmd_sync(priv, 117, 0, 0U, (void *)(& subsc_evt)); } return (tmp___0); } else { { subsc_evt.action = 3U; tmp___1 = mwifiex_send_cmd_sync(priv, 117, 0, 0U, (void *)(& subsc_evt)); } return (tmp___1); } return (0); } } static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy , struct net_device *dev , struct cfg80211_beacon_data *data ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if (((unsigned long )priv->bss_role & 1UL) == 0UL) { { dev_err((struct device const *)(& wiphy->dev), "%s: bss_type mismatched\n", "mwifiex_cfg80211_change_beacon"); } return (-22); } else { } if ((unsigned int )priv->bss_started == 0U) { { dev_err((struct device const *)(& wiphy->dev), "%s: bss not started\n", "mwifiex_cfg80211_change_beacon"); } return (-22); } else { } { tmp___0 = mwifiex_set_mgmt_ies(priv, data); } if (tmp___0 != 0) { { dev_err((struct device const *)(& wiphy->dev), "%s: setting mgmt ies failed\n", "mwifiex_cfg80211_change_beacon"); } return (-14); } else { } return (0); } } static int mwifiex_cfg80211_del_station(struct wiphy *wiphy , struct net_device *dev , u8 *mac ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct mwifiex_sta_node *sta_node ; unsigned long flags ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; struct list_head const *__mptr ; int tmp___2 ; struct list_head const *__mptr___0 ; struct _ddebug descriptor___0 ; long tmp___3 ; raw_spinlock_t *tmp___4 ; int tmp___5 ; bool tmp___6 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; tmp___0 = list_empty((struct list_head const *)(& priv->sta_list)); } if (tmp___0 != 0 || (unsigned int )priv->bss_started == 0U) { return (0); } else { } if ((unsigned long )mac == (unsigned long )((u8 *)0U)) { goto _L; } else { { tmp___6 = is_broadcast_ether_addr((u8 const *)mac); } if ((int )tmp___6) { _L: /* CIL Label */ { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_del_station"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "%s: NULL/broadcast mac address\n"; descriptor.lineno = 1277U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "%s: NULL/broadcast mac address\n", "mwifiex_cfg80211_del_station"); } } else { } __mptr = (struct list_head const *)priv->sta_list.next; sta_node = (struct mwifiex_sta_node *)__mptr; goto ldv_54671; ldv_54670: { tmp___2 = mwifiex_send_cmd_sync(priv, 181, 1, 0U, (void *)(& sta_node->mac_addr)); } if (tmp___2 != 0) { return (-1); } else { } { mwifiex_uap_del_sta_data(priv, sta_node); __mptr___0 = (struct list_head const *)sta_node->list.next; sta_node = (struct mwifiex_sta_node *)__mptr___0; } ldv_54671: ; if ((unsigned long )(& sta_node->list) != (unsigned long )(& priv->sta_list)) { goto ldv_54670; } else { } } else { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_del_station"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "%s: mac address %pM\n"; descriptor___0.lineno = 1287U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(& wiphy->dev), "%s: mac address %pM\n", "mwifiex_cfg80211_del_station", mac); } } else { } { tmp___4 = spinlock_check(& priv->sta_list_spinlock); flags = _raw_spin_lock_irqsave(tmp___4); sta_node = mwifiex_get_sta_entry(priv, mac); spin_unlock_irqrestore(& priv->sta_list_spinlock, flags); } if ((unsigned long )sta_node != (unsigned long )((struct mwifiex_sta_node *)0)) { { tmp___5 = mwifiex_send_cmd_sync(priv, 181, 1, 0U, (void *)(& sta_node->mac_addr)); } if (tmp___5 != 0) { return (-1); } else { } { mwifiex_uap_del_sta_data(priv, sta_node); } } else { } } } return (0); } } static int mwifiex_cfg80211_set_antenna(struct wiphy *wiphy , u32 tx_ant , u32 rx_ant ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct mwifiex_private *tmp___0 ; struct mwifiex_ds_ant_cfg ant_cfg ; int tmp___1 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; tmp___0 = mwifiex_get_priv___3(adapter, 255); priv = tmp___0; } if (tx_ant == 0U || rx_ant == 0U) { return (-95); } else { } if ((unsigned int )adapter->hw_dev_mcs_support != 34U) { if (tx_ant != rx_ant) { return (-95); } else { } if ((tx_ant & (tx_ant - 1U)) != 0U && (unsigned long )tx_ant != (1UL << (int )adapter->number_of_antenna) - 1UL) { return (-95); } else { } if ((unsigned long )tx_ant == (1UL << (int )adapter->number_of_antenna) - 1UL && (unsigned int )(priv->adapter)->number_of_antenna > 1U) { tx_ant = 65535U; rx_ant = 65535U; } else { } } else { } { ant_cfg.tx_ant = tx_ant; ant_cfg.rx_ant = rx_ant; tmp___1 = mwifiex_send_cmd_sync(priv, 32, 1, 0U, (void *)(& ant_cfg)); } return (tmp___1); } } static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy , struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; tmp___0 = mwifiex_del_mgmt_ies(priv); } if (tmp___0 != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to delete mgmt IEs!\n"); } } else { } { priv->ap_11n_enabled = 0U; tmp___1 = mwifiex_send_cmd_sync(priv, 178, 1, 0U, (void *)0); } if (tmp___1 != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to stop the BSS\n"); } return (-1); } else { } return (0); } } static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy , struct net_device *dev , struct cfg80211_ap_settings *params ) { struct mwifiex_uap_bss_param *bss_cfg ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u8 config_bands ; int tmp___0 ; void *tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; config_bands = 0U; } if (((unsigned long )priv->bss_role & 1UL) == 0UL) { return (-1); } else { } { tmp___0 = mwifiex_set_mgmt_ies(priv, & params->beacon); } if (tmp___0 != 0) { return (-1); } else { } { tmp___1 = kzalloc(292UL, 208U); bss_cfg = (struct mwifiex_uap_bss_param *)tmp___1; } if ((unsigned long )bss_cfg == (unsigned long )((struct mwifiex_uap_bss_param *)0)) { return (-12); } else { } { mwifiex_set_sys_config_invalid_data(bss_cfg); } if (params->beacon_interval != 0) { bss_cfg->beacon_period = (u16 )params->beacon_interval; } else { } if (params->dtim_period != 0) { bss_cfg->dtim_period = (u8 )params->dtim_period; } else { } if ((unsigned long )params->ssid != (unsigned long )((u8 const *)0U) && params->ssid_len != 0UL) { { memcpy((void *)(& bss_cfg->ssid.ssid), (void const *)params->ssid, params->ssid_len); bss_cfg->ssid.ssid_len = (u32 )params->ssid_len; } } else { } { if ((unsigned int )params->hidden_ssid == 0U) { goto case_0; } else { } if ((unsigned int )params->hidden_ssid == 1U) { goto case_1; } else { } if ((unsigned int )params->hidden_ssid == 2U) { goto case_2; } else { } goto switch_default; case_0: /* CIL Label */ bss_cfg->bcast_ssid_ctl = 1U; goto ldv_54699; case_1: /* CIL Label */ bss_cfg->bcast_ssid_ctl = 0U; goto ldv_54699; case_2: /* CIL Label */ ; switch_default: /* CIL Label */ { kfree((void const *)bss_cfg); } return (-22); switch_break: /* CIL Label */ ; } ldv_54699: { tmp___2 = ieee80211_frequency_to_channel((int )(params->chandef.chan)->center_freq); bss_cfg->channel = (u8 )tmp___2; } if ((unsigned int )(params->chandef.chan)->band == 0U) { bss_cfg->band_cfg = 0U; config_bands = 3U; if ((unsigned int )params->chandef.width != 0U) { config_bands = (u8 )((unsigned int )config_bands | 8U); } else { } if ((unsigned int )params->chandef.width > 2U) { config_bands = (u8 )((unsigned int )config_bands | 32U); } else { } } else { bss_cfg->band_cfg = 1U; config_bands = 4U; if ((unsigned int )params->chandef.width != 0U) { config_bands = (u8 )((unsigned int )config_bands | 16U); } else { } if ((unsigned int )params->chandef.width > 2U) { config_bands = (u8 )((unsigned int )config_bands | 64U); } else { } } if ((((int )config_bands | (int )(priv->adapter)->fw_bands) & ~ ((int )(priv->adapter)->fw_bands)) == 0) { (priv->adapter)->config_bands = config_bands; } else { } { mwifiex_set_uap_rates(bss_cfg, params); mwifiex_send_domain_info_cmd_fw(wiphy); tmp___3 = mwifiex_set_secure_params(priv, bss_cfg, params); } if (tmp___3 != 0) { { kfree((void const *)bss_cfg); dev_err((struct device const *)(& wiphy->dev), "Failed to parse secuirty parameters!\n"); } return (-1); } else { } { mwifiex_set_ht_params(priv, bss_cfg, params); } if ((priv->adapter)->is_hw_11ac_capable != 0U) { { mwifiex_set_vht_params(priv, bss_cfg, params); mwifiex_set_vht_width(priv, params->chandef.width, (unsigned int )priv->ap_11ac_enabled != 0U); } } else { } if ((unsigned int )priv->ap_11ac_enabled != 0U) { { mwifiex_set_11ac_ba_params(priv); } } else { { mwifiex_set_ba_params(priv); } } { mwifiex_set_wmm_params(priv, bss_cfg, params); } if (params->inactivity_timeout > 0) { bss_cfg->sta_ao_timer = (u32 )(params->inactivity_timeout * 10); bss_cfg->ps_sta_ao_timer = (u32 )(params->inactivity_timeout * 10); } else { } { tmp___4 = mwifiex_send_cmd_sync(priv, 178, 1, 0U, (void *)0); } if (tmp___4 != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to stop the BSS\n"); kfree((void const *)bss_cfg); } return (-1); } else { } { tmp___5 = mwifiex_send_cmd_async(priv, 176, 1, 0U, (void *)bss_cfg); } if (tmp___5 != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to set the SSID\n"); kfree((void const *)bss_cfg); } return (-1); } else { } { kfree((void const *)bss_cfg); tmp___6 = mwifiex_send_cmd_async(priv, 177, 1, 0U, (void *)0); } if (tmp___6 != 0) { { dev_err((struct device const *)(& wiphy->dev), "Failed to start the BSS\n"); } return (-1); } else { } if ((unsigned int )priv->sec_info.wep_enabled != 0U) { priv->curr_pkt_filter = (u16 )((unsigned int )priv->curr_pkt_filter | 8U); } else { priv->curr_pkt_filter = (unsigned int )priv->curr_pkt_filter & 65527U; } { tmp___7 = mwifiex_send_cmd_sync(priv, 40, 1, 0U, (void *)(& priv->curr_pkt_filter)); } if (tmp___7 != 0) { return (-1); } else { } return (0); } } static int mwifiex_cfg80211_disconnect(struct wiphy *wiphy , struct net_device *dev , u16 reason_code ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; tmp___0 = mwifiex_deauthenticate(priv, (u8 *)0U); } if (tmp___0 != 0) { return (-14); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_disconnect"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: successfully disconnected from %pM: reason code %d\n"; descriptor.lineno = 1519U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: successfully disconnected from %pM: reason code %d\n", (u8 *)(& priv->cfg_bssid), (int )reason_code); } } else { } { memset((void *)(& priv->cfg_bssid), 0, 6UL); priv->hs2_enabled = 0; } return (0); } } static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv ) { struct ieee80211_channel *chan ; struct mwifiex_bss_info bss_info ; struct cfg80211_bss *bss ; int ie_len ; u8 ie_buf[34U] ; enum ieee80211_band band ; int tmp ; u8 tmp___0 ; int tmp___1 ; { { tmp = mwifiex_get_bss_info(priv, & bss_info); } if (tmp != 0) { return (-1); } else { } { ie_buf[0] = 0U; ie_buf[1] = bss_info.ssid.ssid_len; memcpy((void *)(& ie_buf) + 2U, (void const *)(& bss_info.ssid.ssid), (size_t )bss_info.ssid.ssid_len); ie_len = (int )((unsigned int )ie_buf[1] + 2U); tmp___0 = mwifiex_band_to_radio_type((int )priv->curr_bss_params.band); band = (enum ieee80211_band )tmp___0; tmp___1 = ieee80211_channel_to_frequency((int )bss_info.bss_chan, band); chan = __ieee80211_get_channel((priv->wdev)->wiphy, tmp___1); bss = cfg80211_inform_bss((priv->wdev)->wiphy, chan, (u8 const *)(& bss_info.bssid), 0ULL, 2, 0, (u8 const *)(& ie_buf), (size_t )ie_len, 0, 208U); cfg80211_put_bss((priv->wdev)->wiphy, bss); memcpy((void *)(& priv->cfg_bssid), (void const *)(& bss_info.bssid), 6UL); } return (0); } } static int mwifiex_cfg80211_assoc(struct mwifiex_private *priv , size_t ssid_len , u8 *ssid , u8 *bssid , int mode , struct ieee80211_channel *channel , struct cfg80211_connect_params *sme , bool privacy ) { struct cfg80211_ssid req_ssid ; int ret ; int auth_type ; struct cfg80211_bss *bss ; u8 is_scanning_required ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; int tmp___3 ; { { auth_type = 0; bss = (struct cfg80211_bss *)0; is_scanning_required = 0U; memset((void *)(& req_ssid), 0, 33UL); req_ssid.ssid_len = (u8 )ssid_len; } if (ssid_len > 32UL) { { dev_err((struct device const *)(priv->adapter)->dev, "invalid SSID - aborting\n"); } return (-22); } else { } { memcpy((void *)(& req_ssid.ssid), (void const *)ssid, ssid_len); } if ((unsigned int )req_ssid.ssid_len == 0U || (unsigned int )req_ssid.ssid[0] <= 31U) { { dev_err((struct device const *)(priv->adapter)->dev, "invalid SSID - aborting\n"); } return (-22); } else { } { mwifiex_deauthenticate(priv, (u8 *)0U); priv->sec_info.wpa_enabled = 0U; priv->sec_info.wpa2_enabled = 0U; priv->wep_key_curr_index = 0U; priv->sec_info.encryption_mode = 0U; priv->sec_info.is_authtype_auto = 0U; ret = mwifiex_set_encode(priv, (struct key_params *)0, (u8 const *)0U, 0, 0, (u8 const *)0U, 1); } if (mode == 1) { if ((int )privacy) { priv->sec_info.encryption_mode = 1027077U; priv->sec_info.authentication_mode = 0U; } else { } goto done; } else { } if ((unsigned int )sme->auth_type == 5U) { auth_type = 0; priv->sec_info.is_authtype_auto = 1U; } else { auth_type = (int )sme->auth_type; } if (sme->crypto.n_ciphers_pairwise != 0) { priv->sec_info.encryption_mode = sme->crypto.ciphers_pairwise[0]; priv->sec_info.authentication_mode = (u32 )auth_type; } else { } if (sme->crypto.cipher_group != 0U) { priv->sec_info.encryption_mode = sme->crypto.cipher_group; priv->sec_info.authentication_mode = (u32 )auth_type; } else { } if ((unsigned long )sme->ie != (unsigned long )((u8 *)0U)) { { ret = mwifiex_set_gen_ie(priv, sme->ie, (int )sme->ie_len); } } else { } if ((unsigned long )sme->key != (unsigned long )((u8 const *)0U)) { { tmp___0 = mwifiex_is_alg_wep(priv->sec_info.encryption_mode); } if (tmp___0 != 0) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_assoc"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: setting wep encryption with key len %d\n"; descriptor.lineno = 1664U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(priv->adapter)->dev, "info: setting wep encryption with key len %d\n", (int )sme->key_len); } } else { } { priv->wep_key_curr_index = (u16 )sme->key_idx; ret = mwifiex_set_encode(priv, (struct key_params *)0, sme->key, (int )sme->key_len, (int )sme->key_idx, (u8 const *)0U, 0); } } else { } } else { } done: ; ldv_54740: ; if ((unsigned int )is_scanning_required != 0U) { { tmp___1 = mwifiex_request_scan(priv, & req_ssid); } if (tmp___1 != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "scan error\n"); } return (-14); } else { } } else { } if (mode == 1) { { bss = cfg80211_get_bss((priv->wdev)->wiphy, channel, (u8 const *)bssid, (u8 const *)ssid, ssid_len, 2, 2); } } else { { bss = cfg80211_get_bss((priv->wdev)->wiphy, channel, (u8 const *)bssid, (u8 const *)ssid, ssid_len, 1, 1); } } if ((unsigned long )bss == (unsigned long )((struct cfg80211_bss *)0)) { if ((unsigned int )is_scanning_required != 0U) { { dev_warn((struct device const *)(priv->adapter)->dev, "assoc: requested bss not found in scan results\n"); } goto ldv_54738; } else { } is_scanning_required = 1U; } else { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_assoc"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "info: trying to associate to \'%s\' bssid %pM\n"; descriptor___0.lineno = 1708U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: trying to associate to \'%s\' bssid %pM\n", (char *)(& req_ssid.ssid), (u8 *)(& bss->bssid)); } } else { } { memcpy((void *)(& priv->cfg_bssid), (void const *)(& bss->bssid), 6UL); } goto ldv_54738; } goto ldv_54740; ldv_54738: { ret = mwifiex_bss_start(priv, bss, & req_ssid); } if (ret != 0) { return (ret); } else { } if (mode == 1) { { tmp___3 = mwifiex_cfg80211_inform_ibss_bss(priv); } if (tmp___3 != 0) { return (-14); } else { } } else { } return (ret); } } static int mwifiex_cfg80211_connect(struct wiphy *wiphy , struct net_device *dev , struct cfg80211_connect_params *sme ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int ret ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; } if ((int )priv->bss_role & 1) { { dev_err((struct device const *)(& wiphy->dev), "%s: reject infra assoc request in non-STA role\n", (char *)(& dev->name)); } return (-22); } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_connect"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: Trying to associate to %s and bssid %pM\n"; descriptor.lineno = 1750U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: Trying to associate to %s and bssid %pM\n", (char *)sme->ssid, sme->bssid); } } else { } { ret = mwifiex_cfg80211_assoc(priv, sme->ssid_len, sme->ssid, sme->bssid, (int )priv->bss_mode, sme->channel, sme, 0); } if (ret == 0) { { cfg80211_connect_result(priv->netdev, (u8 const *)(& priv->cfg_bssid), (u8 const *)0U, 0UL, (u8 const *)0U, 0UL, 0, 208U); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_connect"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "info: associated to bssid %pM successfully\n"; descriptor___0.lineno = 1760U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: associated to bssid %pM successfully\n", (u8 *)(& priv->cfg_bssid)); } } else { } } else { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cfg80211_connect"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___1.format = "info: association to bssid %pM failed\n"; descriptor___1.lineno = 1764U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: association to bssid %pM failed\n", (u8 *)(& priv->cfg_bssid)); } } else { } { memset((void *)(& priv->cfg_bssid), 0, 6UL); } if (ret > 0) { { cfg80211_connect_result(priv->netdev, (u8 const *)(& priv->cfg_bssid), (u8 const *)0U, 0UL, (u8 const *)0U, 0UL, (int )((u16 )ret), 208U); } } else { { cfg80211_connect_result(priv->netdev, (u8 const *)(& priv->cfg_bssid), (u8 const *)0U, 0UL, (u8 const *)0U, 0UL, 1, 208U); } } } return (0); } } static int mwifiex_set_ibss_params(struct mwifiex_private *priv , struct cfg80211_ibss_params *params ) { struct wiphy *wiphy ; struct mwifiex_adapter *adapter ; int index ; int i ; u8 config_bands ; enum nl80211_channel_type tmp ; enum nl80211_channel_type tmp___0 ; enum nl80211_channel_type tmp___1 ; int tmp___2 ; struct _ddebug descriptor ; long tmp___3 ; { wiphy = (priv->wdev)->wiphy; adapter = priv->adapter; index = 0; config_bands = 0U; if ((unsigned int )(params->chandef.chan)->band == 0U) { if (params->basic_rates == 0U) { config_bands = 3U; } else { i = 0; goto ldv_54763; ldv_54762: ; if ((unsigned int )mwifiex_rates[i].bitrate == 60U) { index = 1 << i; goto ldv_54761; } else { } i = i + 1; ldv_54763: ; if (i < mwifiex_band_2ghz.n_bitrates) { goto ldv_54762; } else { } ldv_54761: ; if (params->basic_rates < (u32 )index) { config_bands = 1U; } else { config_bands = 2U; if (params->basic_rates % (u32 )index != 0U) { config_bands = (u8 )((unsigned int )config_bands | 1U); } else { } } } { tmp = cfg80211_get_chandef_type((struct cfg80211_chan_def const *)(& params->chandef)); } if ((unsigned int )tmp != 0U) { config_bands = (u8 )((unsigned int )config_bands | 10U); } else { } } else { { tmp___0 = cfg80211_get_chandef_type((struct cfg80211_chan_def const *)(& params->chandef)); } if ((unsigned int )tmp___0 == 0U) { config_bands = 4U; } else { config_bands = 20U; } } if ((((int )config_bands | (int )adapter->fw_bands) & ~ ((int )adapter->fw_bands)) == 0) { adapter->config_bands = config_bands; adapter->adhoc_start_band = config_bands; if (((unsigned int )config_bands & 24U) != 0U) { adapter->adhoc_11n_enabled = 1U; } else { adapter->adhoc_11n_enabled = 0U; } } else { } { tmp___1 = cfg80211_get_chandef_type((struct cfg80211_chan_def const *)(& params->chandef)); adapter->sec_chan_offset = mwifiex_chan_type_to_sec_chan_offset(tmp___1); tmp___2 = ieee80211_frequency_to_channel((int )(params->chandef.chan)->center_freq); priv->adhoc_channel = (u8 )tmp___2; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_set_ibss_params"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: set ibss band %d, chan %d, chan offset %d\n"; descriptor.lineno = 1849U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___3 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: set ibss band %d, chan %d, chan offset %d\n", (int )config_bands, (int )priv->adhoc_channel, (int )adapter->sec_chan_offset); } } else { } return (0); } } static int mwifiex_cfg80211_join_ibss(struct wiphy *wiphy , struct net_device *dev , struct cfg80211_ibss_params *params ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int ret ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; ret = 0; } if (priv->bss_mode != 1U) { { dev_err((struct device const *)(& wiphy->dev), "request to join ibss received when station is not in ibss mode\n"); } goto done; } else { } { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_join_ibss"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: trying to join to %s and bssid %pM\n"; descriptor.lineno = 1874U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: trying to join to %s and bssid %pM\n", (char *)params->ssid, params->bssid); } } else { } { mwifiex_set_ibss_params(priv, params); ret = mwifiex_cfg80211_assoc(priv, (size_t )params->ssid_len, params->ssid, params->bssid, (int )priv->bss_mode, params->chandef.chan, (struct cfg80211_connect_params *)0, (int )params->privacy); } done: ; if (ret == 0) { { cfg80211_ibss_joined(priv->netdev, (u8 const *)(& priv->cfg_bssid), 208U); descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_join_ibss"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "info: joined/created adhoc network with bssid %pM successfully\n"; descriptor___0.lineno = 1887U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "info: joined/created adhoc network with bssid %pM successfully\n", (u8 *)(& priv->cfg_bssid)); } } else { } } else { { descriptor___1.modname = "mwifiex"; descriptor___1.function = "mwifiex_cfg80211_join_ibss"; descriptor___1.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___1.format = "info: failed creating/joining adhoc network\n"; descriptor___1.lineno = 1890U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); } if (tmp___2 != 0L) { { __dynamic_dev_dbg(& descriptor___1, (struct device const *)(priv->adapter)->dev, "info: failed creating/joining adhoc network\n"); } } else { } } return (ret); } } static int mwifiex_cfg80211_leave_ibss(struct wiphy *wiphy , struct net_device *dev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_leave_ibss"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: disconnecting from essid %pM\n"; descriptor.lineno = 1908U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: disconnecting from essid %pM\n", (u8 *)(& priv->cfg_bssid)); } } else { } { tmp___1 = mwifiex_deauthenticate(priv, (u8 *)0U); } if (tmp___1 != 0) { return (-14); } else { } { memset((void *)(& priv->cfg_bssid), 0, 6UL); } return (0); } } static int mwifiex_cfg80211_scan(struct wiphy *wiphy , struct cfg80211_scan_request *request ) { struct net_device *dev ; struct mwifiex_private *priv ; struct mwifiex_private *tmp ; int i ; int offset ; int ret ; struct ieee80211_channel *chan ; struct ieee_types_header *ie ; struct mwifiex_user_scan_cfg *user_scan_cfg ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; int tmp___2 ; void *tmp___3 ; u32 __min1 ; u32 __min2 ; { { dev = (request->wdev)->netdev; tmp = mwifiex_netdev_get_priv(dev); priv = tmp; descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_scan"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: received scan request on %s\n"; descriptor.lineno = 1935U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___0 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)(& wiphy->dev), "info: received scan request on %s\n", (char *)(& dev->name)); } } else { } if ((int )request->flags & 1) { { tmp___2 = atomic_read((atomic_t const *)(& priv->wmm.tx_pkts_queued)); } if (tmp___2 > 1) { { descriptor___0.modname = "mwifiex"; descriptor___0.function = "mwifiex_cfg80211_scan"; descriptor___0.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor___0.format = "scan rejected due to traffic\n"; descriptor___0.lineno = 1940U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor___0, (struct device const *)(priv->adapter)->dev, "scan rejected due to traffic\n"); } } else { } return (-16); } else { } } else { } if ((unsigned long )priv->scan_request != (unsigned long )((struct cfg80211_scan_request *)0) || (int )priv->scan_aborting) { { dev_err((struct device const *)(priv->adapter)->dev, "cmd: Scan already in process..\n"); } return (-16); } else { } { tmp___3 = kzalloc(418UL, 208U); user_scan_cfg = (struct mwifiex_user_scan_cfg *)tmp___3; } if ((unsigned long )user_scan_cfg == (unsigned long )((struct mwifiex_user_scan_cfg *)0)) { return (-12); } else { } priv->scan_request = request; user_scan_cfg->num_ssids = (u8 )request->n_ssids; user_scan_cfg->ssid_list = request->ssids; if ((unsigned long )request->ie != (unsigned long )((u8 const *)0U) && request->ie_len != 0UL) { offset = 0; i = 0; goto ldv_54803; ldv_54802: ; if ((unsigned int )priv->vs_ie[i].mask != 0U) { goto ldv_54800; } else { } { priv->vs_ie[i].mask = 1U; ie = (struct ieee_types_header *)request->ie + (unsigned long )offset; memcpy((void *)(& priv->vs_ie[i].ie), (void const *)ie, (unsigned long )ie->len + 2UL); offset = (int )(((unsigned int )offset + (unsigned int )ie->len) + 2U); } if ((size_t )offset >= request->ie_len) { goto ldv_54801; } else { } ldv_54800: i = i + 1; ldv_54803: ; if (i <= 7) { goto ldv_54802; } else { } ldv_54801: ; } else { } i = 0; goto ldv_54808; ldv_54807: chan = request->channels[i]; user_scan_cfg->chan_list[i].chan_number = (u8 )chan->hw_value; user_scan_cfg->chan_list[i].radio_type = (u8 )chan->band; if ((chan->flags & 2U) != 0U) { user_scan_cfg->chan_list[i].scan_type = 2U; } else { user_scan_cfg->chan_list[i].scan_type = 1U; } user_scan_cfg->chan_list[i].scan_time = 0U; i = i + 1; ldv_54808: __min1 = request->n_channels; __min2 = 50U; if ((u32 )i < (__min1 < __min2 ? __min1 : __min2)) { goto ldv_54807; } else { } { ret = mwifiex_scan_networks(priv, (struct mwifiex_user_scan_cfg const *)user_scan_cfg); kfree((void const *)user_scan_cfg); } if (ret != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "scan failed: %d\n", ret); priv->scan_aborting = 0; priv->scan_request = (struct cfg80211_scan_request *)0; } return (ret); } else { } if ((unsigned long )request->ie != (unsigned long )((u8 const *)0U) && request->ie_len != 0UL) { i = 0; goto ldv_54811; ldv_54810: ; if ((unsigned int )priv->vs_ie[i].mask == 1U) { { priv->vs_ie[i].mask = 0U; memset((void *)(& priv->vs_ie[i].ie), 0, 256UL); } } else { } i = i + 1; ldv_54811: ; if (i <= 7) { goto ldv_54810; } else { } } else { } return (0); } } static void mwifiex_setup_vht_caps(struct ieee80211_sta_vht_cap *vht_info , struct mwifiex_private *priv ) { struct mwifiex_adapter *adapter ; { adapter = priv->adapter; vht_info->vht_supported = 1; vht_info->cap = adapter->hw_dot_11ac_dev_cap; vht_info->vht_mcs.rx_mcs_map = (unsigned short )adapter->hw_dot_11ac_mcs_support; vht_info->vht_mcs.rx_highest = 0U; vht_info->vht_mcs.tx_mcs_map = (unsigned short )(adapter->hw_dot_11ac_mcs_support >> 16); vht_info->vht_mcs.tx_highest = 0U; return; } } static void mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info , struct mwifiex_private *priv ) { int rx_mcs_supp ; struct ieee80211_mcs_info mcs_set ; u8 *mcs ; struct mwifiex_adapter *adapter ; { { mcs = (u8 *)(& mcs_set); adapter = priv->adapter; ht_info->ht_supported = 1; ht_info->ampdu_factor = 3U; ht_info->ampdu_density = 0U; memset((void *)(& ht_info->mcs), 0, 16UL); } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 131072UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 2U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65533U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 8388608UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 32U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65503U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 16777216UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 64U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65471U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 67108864UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 256U); } else { ht_info->cap = (unsigned int )ht_info->cap & 64767U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 33554432UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 128U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65407U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 536870912UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 16U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65519U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 256UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 16384U); } else { ht_info->cap = (unsigned int )ht_info->cap & 49151U; } if (((unsigned long )adapter->hw_dot_11n_dev_cap & 4194304UL) != 0UL) { ht_info->cap = (u16 )((unsigned int )ht_info->cap | 1U); } else { ht_info->cap = (unsigned int )ht_info->cap & 65534U; } { ht_info->cap = (unsigned int )ht_info->cap & 63487U; ht_info->cap = (u16 )((unsigned int )ht_info->cap | 12U); rx_mcs_supp = (int )adapter->hw_dev_mcs_support & 15; memset((void *)mcs, 255, (size_t )rx_mcs_supp); memset((void *)mcs + (unsigned long )rx_mcs_supp, 0, 16UL - (unsigned long )rx_mcs_supp); } if (priv->bss_mode == 2U || ((unsigned long )adapter->hw_dot_11n_dev_cap & 131072UL) != 0UL) { mcs_set.rx_mask[4] = (u8 )((unsigned int )mcs_set.rx_mask[4] | 1U); } else { } { memcpy((void *)(& ht_info->mcs), (void const *)mcs, 16UL); ht_info->mcs.tx_params = 1U; } return; } } struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy , char const *name , enum nl80211_iftype type , u32 *flags , struct vif_params *params ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_private *priv ; struct net_device *dev ; void *mdev_priv ; struct wireless_dev *wdev ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; void *tmp___9 ; void *tmp___10 ; int tmp___11 ; void *tmp___12 ; void *tmp___13 ; struct net *tmp___14 ; void *tmp___15 ; int tmp___16 ; struct _ddebug descriptor ; long tmp___17 ; long tmp___18 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; } if ((unsigned long )adapter == (unsigned long )((struct mwifiex_adapter *)0)) { { tmp___0 = ERR_PTR(-14L); } return ((struct wireless_dev *)tmp___0); } else { } { if ((unsigned int )type == 0U) { goto case_0; } else { } if ((unsigned int )type == 2U) { goto case_2; } else { } if ((unsigned int )type == 1U) { goto case_1; } else { } if ((unsigned int )type == 3U) { goto case_3; } else { } if ((unsigned int )type == 8U) { goto case_8; } else { } goto switch_default; case_0: /* CIL Label */ ; case_2: /* CIL Label */ ; case_1: /* CIL Label */ priv = adapter->priv[0]; if (priv->bss_mode != 0U) { { dev_err((struct device const *)(& wiphy->dev), "cannot create multiple sta/adhoc ifaces\n"); tmp___1 = ERR_PTR(-22L); } return ((struct wireless_dev *)tmp___1); } else { } { tmp___2 = kzalloc(944UL, 208U); wdev = (struct wireless_dev *)tmp___2; } if ((unsigned long )wdev == (unsigned long )((struct wireless_dev *)0)) { { tmp___3 = ERR_PTR(-12L); } return ((struct wireless_dev *)tmp___3); } else { } wdev->wiphy = wiphy; priv->wdev = wdev; wdev->iftype = 2; if ((unsigned int )type == 0U) { priv->bss_mode = 2U; } else { priv->bss_mode = (u32 )type; } priv->bss_type = 0U; priv->frame_type = 0U; priv->bss_priority = 0U; priv->bss_role = 0U; priv->bss_num = 0U; goto ldv_54841; case_3: /* CIL Label */ priv = adapter->priv[1]; if (priv->bss_mode != 0U) { { dev_err((struct device const *)(& wiphy->dev), "Can\'t create multiple AP interfaces"); tmp___4 = ERR_PTR(-22L); } return ((struct wireless_dev *)tmp___4); } else { } { tmp___5 = kzalloc(944UL, 208U); wdev = (struct wireless_dev *)tmp___5; } if ((unsigned long )wdev == (unsigned long )((struct wireless_dev *)0)) { { tmp___6 = ERR_PTR(-12L); } return ((struct wireless_dev *)tmp___6); } else { } priv->wdev = wdev; wdev->wiphy = wiphy; wdev->iftype = 3; priv->bss_type = 1U; priv->frame_type = 0U; priv->bss_priority = 0U; priv->bss_role = 1U; priv->bss_started = 0U; priv->bss_num = 0U; priv->bss_mode = (u32 )type; goto ldv_54841; case_8: /* CIL Label */ priv = adapter->priv[2]; if (priv->bss_mode != 0U) { { dev_err((struct device const *)(& wiphy->dev), "Can\'t create multiple P2P ifaces"); tmp___7 = ERR_PTR(-22L); } return ((struct wireless_dev *)tmp___7); } else { } { tmp___8 = kzalloc(944UL, 208U); wdev = (struct wireless_dev *)tmp___8; } if ((unsigned long )wdev == (unsigned long )((struct wireless_dev *)0)) { { tmp___9 = ERR_PTR(-12L); } return ((struct wireless_dev *)tmp___9); } else { } { priv->wdev = wdev; wdev->wiphy = wiphy; wdev->iftype = 8; priv->bss_mode = 8U; priv->bss_type = 2U; priv->frame_type = 0U; priv->bss_priority = 0U; priv->bss_role = 0U; priv->bss_started = 0U; priv->bss_num = 0U; tmp___11 = mwifiex_cfg80211_init_p2p_client(priv); } if (tmp___11 != 0) { { tmp___10 = ERR_PTR(-14L); wdev = (struct wireless_dev *)tmp___10; } goto done; } else { } goto ldv_54841; switch_default: /* CIL Label */ { dev_err((struct device const *)(& wiphy->dev), "type not supported\n"); tmp___12 = ERR_PTR(-22L); } return ((struct wireless_dev *)tmp___12); switch_break: /* CIL Label */ ; } ldv_54841: { dev = ldv_alloc_netdev_mqs_19(8, name, & ether_setup, 4U, 1U); } if ((unsigned long )dev == (unsigned long )((struct net_device *)0)) { { dev_err((struct device const *)(& wiphy->dev), "no memory available for netdevice\n"); priv->bss_mode = 0U; tmp___13 = ERR_PTR(-12L); wdev = (struct wireless_dev *)tmp___13; } goto done; } else { } { mwifiex_init_priv_params(priv, dev); priv->netdev = dev; mwifiex_setup_ht_caps(& (wiphy->bands[0])->ht_cap, priv); } if (adapter->is_hw_11ac_capable != 0U) { { mwifiex_setup_vht_caps(& (wiphy->bands[0])->vht_cap, priv); } } else { } if (((int )adapter->config_bands & 4) != 0) { { mwifiex_setup_ht_caps(& (wiphy->bands[1])->ht_cap, priv); } } else { } if (((int )adapter->config_bands & 4) != 0 && adapter->is_hw_11ac_capable != 0U) { { mwifiex_setup_vht_caps(& (wiphy->bands[1])->vht_cap, priv); } } else { } { tmp___14 = wiphy_net(wiphy); dev_net_set(dev, tmp___14); dev->ieee80211_ptr = priv->wdev; (dev->ieee80211_ptr)->iftype = (enum nl80211_iftype )priv->bss_mode; memcpy((void *)dev->dev_addr, (void const *)(& wiphy->perm_addr), 6UL); dev->dev.parent = wiphy_dev(wiphy); dev->flags = dev->flags | 4098U; dev->watchdog_timeo = 1250; dev->hard_header_len = (unsigned int )dev->hard_header_len + 36U; dev->ethtool_ops = & mwifiex_ethtool_ops; mdev_priv = netdev_priv((struct net_device const *)dev); *((unsigned long *)mdev_priv) = (unsigned long )priv; dev->dev.parent = adapter->dev; tmp___16 = ldv_register_netdevice_20(dev); } if (tmp___16 != 0) { { dev_err((struct device const *)(& wiphy->dev), "cannot register virtual network device\n"); ldv_free_netdev_21(dev); priv->bss_mode = 0U; priv->netdev = (struct net_device *)0; tmp___15 = ERR_PTR(-14L); wdev = (struct wireless_dev *)tmp___15; } goto done; } else { } { sema_init(& priv->async_sem, 1); descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_add_virtual_intf"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "info: %s: Marvell 802.11 Adapter\n"; descriptor.lineno = 2288U; descriptor.flags = 0U; tmp___17 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___17 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "info: %s: Marvell 802.11 Adapter\n", (char *)(& dev->name)); } } else { } { mwifiex_dev_debugfs_init(priv); } done: { tmp___18 = IS_ERR((void const *)wdev); } if (tmp___18 != 0L) { { kfree((void const *)priv->wdev); priv->wdev = (struct wireless_dev *)0; } } else { } return (wdev); } } static char const __kstrtab_mwifiex_add_virtual_intf[25U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'a', 'd', 'd', '_', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_', 'i', 'n', 't', 'f', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_add_virtual_intf ; struct kernel_symbol const __ksymtab_mwifiex_add_virtual_intf = {(unsigned long )(& mwifiex_add_virtual_intf), (char const *)(& __kstrtab_mwifiex_add_virtual_intf)}; int mwifiex_del_virtual_intf(struct wiphy *wiphy , struct wireless_dev *wdev ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; bool tmp___0 ; { { tmp = mwifiex_netdev_get_priv(wdev->netdev); priv = tmp; mwifiex_dev_debugfs_remove(priv); mwifiex_stop_net_dev_queue(priv->netdev, priv->adapter); tmp___0 = netif_carrier_ok((struct net_device const *)priv->netdev); } if ((int )tmp___0) { { netif_carrier_off(priv->netdev); } } else { } if ((unsigned int )(wdev->netdev)->reg_state == 1U) { { ldv_unregister_netdevice_22(wdev->netdev); } } else { } { (priv->netdev)->ieee80211_ptr = (struct wireless_dev *)0; priv->netdev = (struct net_device *)0; kfree((void const *)wdev); priv->wdev = (struct wireless_dev *)0; priv->media_connected = 0U; priv->bss_mode = 0U; } return (0); } } static char const __kstrtab_mwifiex_del_virtual_intf[25U] = { 'm', 'w', 'i', 'f', 'i', 'e', 'x', '_', 'd', 'e', 'l', '_', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_', 'i', 'n', 't', 'f', '\000'}; struct kernel_symbol const __ksymtab_mwifiex_del_virtual_intf ; struct kernel_symbol const __ksymtab_mwifiex_del_virtual_intf = {(unsigned long )(& mwifiex_del_virtual_intf), (char const *)(& __kstrtab_mwifiex_del_virtual_intf)}; static bool mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat , s8 *byte_seq , u8 max_byte_seq ) { int j ; int k ; int valid_byte_cnt ; bool dont_care_byte ; { valid_byte_cnt = 0; dont_care_byte = 0; j = 0; goto ldv_54885; ldv_54884: k = 0; goto ldv_54882; ldv_54881: ; if (((int )*(pat->mask + (unsigned long )j) >> k) & 1) { { memcpy((void *)byte_seq + (unsigned long )valid_byte_cnt, (void const *)pat->pattern + (unsigned long )(j * 8 + k), 1UL); valid_byte_cnt = valid_byte_cnt + 1; } if ((int )dont_care_byte) { return (0); } else { } } else if (valid_byte_cnt != 0) { dont_care_byte = 1; } else { } if (valid_byte_cnt > (int )max_byte_seq) { return (0); } else { } k = k + 1; ldv_54882: ; if (k <= 7) { goto ldv_54881; } else { } j = j + 1; ldv_54885: ; if (j < (pat->pattern_len + 7) / 8) { goto ldv_54884; } else { } *(byte_seq + (unsigned long )max_byte_seq) = (s8 )valid_byte_cnt; return (1); } } static int mwifiex_cfg80211_suspend(struct wiphy *wiphy , struct cfg80211_wowlan *wowlan ) { struct mwifiex_adapter *adapter ; void *tmp ; struct mwifiex_ds_mef_cfg mef_cfg ; struct mwifiex_mef_entry *mef_entry ; int i ; int filt_num ; int ret ; bool first_pat ; u8 byte_seq[7U] ; u8 ipv4_mc_mac[2U] ; u8 ipv6_mc_mac[3U] ; struct mwifiex_private *priv ; struct mwifiex_private *tmp___0 ; void *tmp___1 ; bool tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; bool tmp___6 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; filt_num = 0; first_pat = 1; ipv4_mc_mac[0] = 51U; ipv4_mc_mac[1] = 51U; ipv6_mc_mac[0] = 1U; ipv6_mc_mac[1] = 0U; ipv6_mc_mac[2] = 94U; tmp___0 = mwifiex_get_priv___3(adapter, 0); priv = tmp___0; } if ((unsigned long )wowlan == (unsigned long )((struct cfg80211_wowlan *)0)) { { dev_warn((struct device const *)adapter->dev, "None of the WOWLAN triggers enabled\n"); } return (0); } else { } if ((unsigned int )priv->media_connected == 0U) { { dev_warn((struct device const *)adapter->dev, "Can not configure WOWLAN in disconnected state\n"); } return (0); } else { } { tmp___1 = kzalloc(142UL, 208U); mef_entry = (struct mwifiex_mef_entry *)tmp___1; } if ((unsigned long )mef_entry == (unsigned long )((struct mwifiex_mef_entry *)0)) { return (-12); } else { } { memset((void *)(& mef_cfg), 0, 16UL); mef_cfg.num_entries = 1U; mef_cfg.mef_entry = mef_entry; mef_entry->mode = 1U; mef_entry->action = 3U; i = 0; } goto ldv_54904; ldv_54903: { memset((void *)(& byte_seq), 0, 7UL); tmp___2 = mwifiex_is_pattern_supported(wowlan->patterns + (unsigned long )i, (s8 *)(& byte_seq), 6); } if (tmp___2) { tmp___3 = 0; } else { tmp___3 = 1; } if (tmp___3) { { dev_err((struct device const *)(& wiphy->dev), "Pattern not supported\n"); kfree((void const *)mef_entry); } return (-95); } else { } if ((wowlan->patterns + (unsigned long )i)->pkt_offset == 0) { if (((int )byte_seq[0] & 1) == 0 && (unsigned int )byte_seq[6] == 1U) { mef_cfg.criteria = mef_cfg.criteria | 2U; goto ldv_54902; } else { { tmp___6 = is_broadcast_ether_addr((u8 const *)(& byte_seq)); } if ((int )tmp___6) { mef_cfg.criteria = mef_cfg.criteria | 1U; goto ldv_54902; } else { { tmp___4 = memcmp((void const *)(& byte_seq), (void const *)(& ipv4_mc_mac), 2UL); } if (tmp___4 == 0 && (unsigned int )byte_seq[6] == 2U) { mef_cfg.criteria = mef_cfg.criteria | 8U; goto ldv_54902; } else { { tmp___5 = memcmp((void const *)(& byte_seq), (void const *)(& ipv6_mc_mac), 3UL); } if (tmp___5 == 0 && (unsigned int )byte_seq[6] == 3U) { mef_cfg.criteria = mef_cfg.criteria | 8U; goto ldv_54902; } else { } } } } } else { } { mef_entry->filter[filt_num].repeat = 1U; mef_entry->filter[filt_num].offset = (u16 )(wowlan->patterns + (unsigned long )i)->pkt_offset; memcpy((void *)(& mef_entry->filter[filt_num].byte_seq), (void const *)(& byte_seq), 7UL); mef_entry->filter[filt_num].filt_type = 65U; } if ((int )first_pat) { first_pat = 0; } else { mef_entry->filter[filt_num].filt_action = 68U; } filt_num = filt_num + 1; ldv_54902: i = i + 1; ldv_54904: ; if (i < wowlan->n_patterns) { goto ldv_54903; } else { } if ((int )wowlan->magic_pkt) { { mef_cfg.criteria = mef_cfg.criteria | 2U; mef_entry->filter[filt_num].repeat = 16U; memcpy((void *)(& mef_entry->filter[filt_num].byte_seq), (void const *)(& priv->curr_addr), 6UL); mef_entry->filter[filt_num].byte_seq[6] = 6; mef_entry->filter[filt_num].offset = 28U; mef_entry->filter[filt_num].filt_type = 65U; } if (filt_num != 0) { mef_entry->filter[filt_num].filt_action = 69U; } else { } } else { } if (mef_cfg.criteria == 0U) { mef_cfg.criteria = 11U; } else { } { ret = mwifiex_send_cmd_sync(priv, 154, 1, 0U, (void *)(& mef_cfg)); kfree((void const *)mef_entry); } return (ret); } } static int mwifiex_cfg80211_resume(struct wiphy *wiphy ) { { return (0); } } static void mwifiex_cfg80211_set_wakeup(struct wiphy *wiphy , bool enabled ) { struct mwifiex_adapter *adapter ; void *tmp ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; device_set_wakeup_enable(adapter->dev, (int )enabled); } return; } } static int mwifiex_get_coalesce_pkt_type(u8 *byte_seq ) { u8 ipv4_mc_mac[2U] ; u8 ipv6_mc_mac[3U] ; u8 bc_mac[4U] ; int tmp ; int tmp___0 ; int tmp___1 ; { ipv4_mc_mac[0] = 51U; ipv4_mc_mac[1] = 51U; ipv6_mc_mac[0] = 1U; ipv6_mc_mac[1] = 0U; ipv6_mc_mac[2] = 94U; bc_mac[0] = 255U; bc_mac[1] = 255U; bc_mac[2] = 255U; bc_mac[3] = 255U; if ((int )*byte_seq & 1 && (unsigned int )*(byte_seq + 4UL) == 1U) { return (1); } else { { tmp___1 = memcmp((void const *)byte_seq, (void const *)(& bc_mac), 4UL); } if (tmp___1 == 0) { return (3); } else { { tmp = memcmp((void const *)byte_seq, (void const *)(& ipv4_mc_mac), 2UL); } if (tmp == 0 && (unsigned int )*(byte_seq + 4UL) == 2U) { return (2); } else { { tmp___0 = memcmp((void const *)byte_seq, (void const *)(& ipv6_mc_mac), 3UL); } if (tmp___0 == 0 && (unsigned int )*(byte_seq + 4UL) == 3U) { return (2); } else { } } } } return (0); } } static int mwifiex_fill_coalesce_rule_info(struct mwifiex_private *priv , struct cfg80211_coalesce_rules *crule , struct mwifiex_coalesce_rule *mrule ) { u8 byte_seq[5U] ; struct filt_field_param *param ; int i ; bool tmp ; int tmp___0 ; u8 pkt_type ; int tmp___1 ; { mrule->max_coalescing_delay = (u16 )crule->delay; param = (struct filt_field_param *)(& mrule->params); i = 0; goto ldv_54931; ldv_54930: { memset((void *)(& byte_seq), 0, 5UL); tmp = mwifiex_is_pattern_supported(crule->patterns + (unsigned long )i, (s8 *)(& byte_seq), 4); } if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { { dev_err((struct device const *)(priv->adapter)->dev, "Pattern not supported\n"); } return (-95); } else { } if ((crule->patterns + (unsigned long )i)->pkt_offset == 0) { { tmp___1 = mwifiex_get_coalesce_pkt_type((u8 *)(& byte_seq)); pkt_type = (u8 )tmp___1; } if ((unsigned int )pkt_type != 0U && (unsigned int )mrule->pkt_type != 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "Multiple packet types not allowed\n"); } return (-95); } else if ((unsigned int )pkt_type != 0U) { mrule->pkt_type = pkt_type; goto ldv_54929; } else { } } else { } if ((unsigned int )crule->condition == 0U) { param->operation = 128U; } else { param->operation = 129U; } { param->operand_len = byte_seq[4]; memcpy((void *)(& param->operand_byte_stream), (void const *)(& byte_seq), (size_t )param->operand_len); param->offset = (u16 )(crule->patterns + (unsigned long )i)->pkt_offset; param = param + 1; mrule->num_of_fields = (u8 )((int )mrule->num_of_fields + 1); } ldv_54929: i = i + 1; ldv_54931: ; if (i < crule->n_patterns) { goto ldv_54930; } else { } if ((unsigned int )mrule->pkt_type == 0U) { { dev_err((struct device const *)(priv->adapter)->dev, "Packet type can not be determined\n"); } return (-95); } else { } return (0); } } static int mwifiex_cfg80211_set_coalesce(struct wiphy *wiphy , struct cfg80211_coalesce *coalesce ) { struct mwifiex_adapter *adapter ; void *tmp ; int i ; int ret ; struct mwifiex_ds_coalesce_cfg coalesce_cfg ; struct mwifiex_private *priv ; struct mwifiex_private *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; int tmp___3 ; { { tmp = mwifiex_cfg80211_get_adapter(wiphy); adapter = (struct mwifiex_adapter *)tmp; tmp___0 = mwifiex_get_priv___3(adapter, 0); priv = tmp___0; memset((void *)(& coalesce_cfg), 0, 290UL); } if ((unsigned long )coalesce == (unsigned long )((struct cfg80211_coalesce *)0)) { { descriptor.modname = "mwifiex"; descriptor.function = "mwifiex_cfg80211_set_coalesce"; descriptor.filename = "drivers/net/wireless/mwifiex/cfg80211.c"; descriptor.format = "Disable coalesce and reset all previous rules\n"; descriptor.lineno = 2576U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); } if (tmp___1 != 0L) { { __dynamic_dev_dbg(& descriptor, (struct device const *)adapter->dev, "Disable coalesce and reset all previous rules\n"); } } else { } { tmp___2 = mwifiex_send_cmd_sync(priv, 266, 1, 0U, (void *)(& coalesce_cfg)); } return (tmp___2); } else { } coalesce_cfg.num_of_rules = (u16 )coalesce->n_rules; i = 0; goto ldv_54945; ldv_54944: { ret = mwifiex_fill_coalesce_rule_info(priv, coalesce->rules + (unsigned long )i, (struct mwifiex_coalesce_rule *)(& coalesce_cfg.rule) + (unsigned long )i); } if (ret != 0) { { dev_err((struct device const *)(priv->adapter)->dev, "Recheck the patterns provided for rule %d\n", i + 1); } return (ret); } else { } i = i + 1; ldv_54945: ; if (i < coalesce->n_rules) { goto ldv_54944; } else { } { tmp___3 = mwifiex_send_cmd_sync(priv, 266, 1, 0U, (void *)(& coalesce_cfg)); } return (tmp___3); } } static struct cfg80211_ops mwifiex_cfg80211_ops = {& mwifiex_cfg80211_suspend, & mwifiex_cfg80211_resume, & mwifiex_cfg80211_set_wakeup, & mwifiex_add_virtual_intf, & mwifiex_del_virtual_intf, & mwifiex_cfg80211_change_virtual_intf, & mwifiex_cfg80211_add_key, 0, & mwifiex_cfg80211_del_key, & mwifiex_cfg80211_set_default_key, 0, & mwifiex_cfg80211_start_ap, & mwifiex_cfg80211_change_beacon, & mwifiex_cfg80211_stop_ap, 0, & mwifiex_cfg80211_del_station, 0, & mwifiex_cfg80211_get_station, & mwifiex_cfg80211_dump_station, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & mwifiex_cfg80211_scan, 0, 0, 0, 0, & mwifiex_cfg80211_connect, & mwifiex_cfg80211_disconnect, & mwifiex_cfg80211_join_ibss, & mwifiex_cfg80211_leave_ibss, 0, & mwifiex_cfg80211_set_wiphy_params, & mwifiex_cfg80211_set_tx_power, 0, 0, 0, 0, 0, & mwifiex_cfg80211_set_bitrate_mask, 0, 0, 0, 0, & mwifiex_cfg80211_remain_on_channel, & mwifiex_cfg80211_cancel_remain_on_channel, & mwifiex_cfg80211_mgmt_tx, 0, & mwifiex_cfg80211_set_power_mgmt, & mwifiex_cfg80211_set_cqm_rssi_config, 0, & mwifiex_cfg80211_mgmt_frame_register, & mwifiex_cfg80211_set_antenna, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & mwifiex_cfg80211_set_coalesce, 0, 0}; static struct wiphy_wowlan_support const mwifiex_wowlan_support = {2U, 10, 20, 1, 100, 0}; static bool mwifiex_is_valid_alpha2(char const *alpha2 ) { size_t tmp ; { if ((unsigned long )alpha2 == (unsigned long )((char const *)0)) { return (0); } else { { tmp = strlen(alpha2); } if (tmp != 2UL) { return (0); } else { } } if (((int )_ctype[(int )((unsigned char )*alpha2)] & 3) != 0 && ((int )_ctype[(int )((unsigned char )*(alpha2 + 1UL))] & 3) != 0) { return (1); } else { } return (0); } } static struct wiphy_coalesce_support const mwifiex_coalesce_support = {8, 100, 4, 20, 1, 100}; int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter ) { int ret ; void *wdev_priv___0 ; struct wiphy *wiphy ; struct mwifiex_private *priv ; u8 *country_code ; u32 thr ; u32 retry ; bool tmp ; { { priv = adapter->priv[0]; wiphy = wiphy_new((struct cfg80211_ops const *)(& mwifiex_cfg80211_ops), 8); } if ((unsigned long )wiphy == (unsigned long )((struct wiphy *)0)) { { dev_err((struct device const *)adapter->dev, "%s: creating new wiphy\n", "mwifiex_register_cfg80211"); } return (-12); } else { } wiphy->max_scan_ssids = 10U; wiphy->max_scan_ie_len = 256U; wiphy->mgmt_stypes = (struct ieee80211_txrx_stypes const *)(& mwifiex_mgmt_stypes); wiphy->max_remain_on_channel_duration = 5000U; wiphy->interface_modes = 782U; wiphy->bands[0] = & mwifiex_band_2ghz; if (((int )adapter->config_bands & 4) != 0) { wiphy->bands[1] = & mwifiex_band_5ghz; } else { wiphy->bands[1] = (struct ieee80211_supported_band *)0; } { wiphy->iface_combinations = & mwifiex_iface_comb_ap_sta; wiphy->n_iface_combinations = 1; wiphy->cipher_suites = (u32 const *)(& mwifiex_cipher_suites); wiphy->n_cipher_suites = 5; memcpy((void *)(& wiphy->perm_addr), (void const *)(& priv->curr_addr), 6UL); wiphy->signal_type = 1; wiphy->flags = wiphy->flags | 2768896U; wiphy->regulatory_flags = wiphy->regulatory_flags | 3U; wiphy_apply_custom_regulatory(wiphy, & mwifiex_world_regdom_custom); wiphy->wowlan = & mwifiex_wowlan_support; wiphy->coalesce = & mwifiex_coalesce_support; wiphy->probe_resp_offload = 7U; wiphy->available_antennas_tx = (u32 )(1UL << (int )adapter->number_of_antenna) - 1U; wiphy->available_antennas_rx = (u32 )(1UL << (int )adapter->number_of_antenna) - 1U; wiphy->features = wiphy->features | 70U; wiphy->bss_priv_size = 16; wiphy->reg_notifier = & mwifiex_reg_notifier; wdev_priv___0 = wiphy_priv(wiphy); *((unsigned long *)wdev_priv___0) = (unsigned long )adapter; set_wiphy_dev(wiphy, (priv->adapter)->dev); ret = wiphy_register(wiphy); } if (ret < 0) { { dev_err((struct device const *)adapter->dev, "%s: wiphy_register failed: %d\n", "mwifiex_register_cfg80211", ret); wiphy_free(wiphy); } return (ret); } else { } if ((unsigned long )reg_alpha2 != (unsigned long )((char *)0)) { { tmp = mwifiex_is_valid_alpha2((char const *)reg_alpha2); } if ((int )tmp) { { _dev_info((struct device const *)(& wiphy->dev), "driver hint alpha2: %2.2s\n", reg_alpha2); regulatory_hint(wiphy, (char const *)reg_alpha2); } } else { goto _L; } } else { _L: /* CIL Label */ { country_code = mwifiex_11d_code_2_region((int )((u8 )adapter->region_code)); } if ((unsigned long )country_code != (unsigned long )((u8 *)0U)) { { _dev_info((struct device const *)(& wiphy->dev), "ignoring F/W country code %2.2s\n", country_code); } } else { } } { mwifiex_send_cmd_sync(priv, 22, 0, 8U, (void *)(& thr)); wiphy->frag_threshold = thr; mwifiex_send_cmd_sync(priv, 22, 0, 5U, (void *)(& thr)); wiphy->rts_threshold = thr; mwifiex_send_cmd_sync(priv, 22, 0, 6U, (void *)(& retry)); wiphy->retry_short = (unsigned char )retry; mwifiex_send_cmd_sync(priv, 22, 0, 7U, (void *)(& retry)); wiphy->retry_long = (unsigned char )retry; adapter->wiphy = wiphy; } return (ret); } } struct net_device *ldv_alloc_netdev_mqs(struct net_device *arg0 , int arg1 , char *arg2 , void (*arg3)(struct net_device * ) , unsigned int arg4 , unsigned int arg5 ) ; void ldv_alloc_netdev_mqs_setup_8_3(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) ; void ldv_base_instance_callback_6_26(struct wireless_dev *(*arg0)(struct wiphy * , char * , enum nl80211_iftype , unsigned int * , struct vif_params * ) , struct wiphy *arg1 , char *arg2 , enum nl80211_iftype arg3 , unsigned int *arg4 , struct vif_params *arg5 ) ; void ldv_base_instance_callback_6_29(int (*arg0)(struct wiphy * , struct wireless_dev * , unsigned long long ) , struct wiphy *arg1 , struct wireless_dev *arg2 , unsigned long long arg3 ) ; void ldv_base_instance_callback_6_32(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_beacon_data * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_beacon_data *arg3 ) ; void ldv_base_instance_callback_6_33(int (*arg0)(struct wiphy * , struct net_device * , enum nl80211_iftype , unsigned int * , struct vif_params * ) , struct wiphy *arg1 , struct net_device *arg2 , enum nl80211_iftype arg3 , unsigned int *arg4 , struct vif_params *arg5 ) ; void ldv_base_instance_callback_6_36(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , unsigned char *arg5 ) ; void ldv_base_instance_callback_6_39(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 ) ; void ldv_base_instance_callback_6_42(int (*arg0)(struct wiphy * , struct wireless_dev * ) , struct wiphy *arg1 , struct wireless_dev *arg2 ) ; void ldv_base_instance_callback_6_43(int (*arg0)(struct wiphy * , struct net_device * , int , unsigned char * , struct station_info * ) , struct wiphy *arg1 , struct net_device *arg2 , int arg3 , unsigned char *arg4 , struct station_info *arg5 ) ; void ldv_base_instance_callback_6_46(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * , struct station_info * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 , struct station_info *arg4 ) ; void ldv_base_instance_callback_6_49(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_ibss_params * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_ibss_params *arg3 ) ; void ldv_base_instance_callback_6_50(int (*arg0)(struct wiphy * , struct net_device * ) , struct wiphy *arg1 , struct net_device *arg2 ) ; void ldv_base_instance_callback_6_51(void (*arg0)(struct wiphy * , struct wireless_dev * , unsigned short , _Bool ) , struct wiphy *arg1 , struct wireless_dev *arg2 , unsigned short arg3 , _Bool arg4 ) ; void ldv_base_instance_callback_6_54(int (*arg0)(struct wiphy * , struct wireless_dev * , struct cfg80211_mgmt_tx_params * , unsigned long long * ) , struct wiphy *arg1 , struct wireless_dev *arg2 , struct cfg80211_mgmt_tx_params *arg3 , unsigned long long *arg4 ) ; void ldv_base_instance_callback_6_57(int (*arg0)(struct wiphy * , struct wireless_dev * , struct ieee80211_channel * , unsigned int , unsigned long long * ) , struct wiphy *arg1 , struct wireless_dev *arg2 , struct ieee80211_channel *arg3 , unsigned int arg4 , unsigned long long *arg5 ) ; void ldv_base_instance_callback_6_60(int (*arg0)(struct wiphy * , struct cfg80211_scan_request * ) , struct wiphy *arg1 , struct cfg80211_scan_request *arg2 ) ; void ldv_base_instance_callback_6_61(int (*arg0)(struct wiphy * , unsigned int , unsigned int ) , struct wiphy *arg1 , unsigned int arg2 , unsigned int arg3 ) ; void ldv_base_instance_callback_6_64(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * , struct cfg80211_bitrate_mask * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 , struct cfg80211_bitrate_mask *arg4 ) ; void ldv_base_instance_callback_6_67(int (*arg0)(struct wiphy * , struct cfg80211_coalesce * ) , struct wiphy *arg1 , struct cfg80211_coalesce *arg2 ) ; void ldv_base_instance_callback_6_68(int (*arg0)(struct wiphy * , struct net_device * , int , unsigned int ) , struct wiphy *arg1 , struct net_device *arg2 , int arg3 , unsigned int arg4 ) ; void ldv_base_instance_callback_6_71(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , _Bool ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , _Bool arg5 ) ; void ldv_base_instance_callback_6_74(int (*arg0)(struct wiphy * , struct net_device * , _Bool , int ) , struct wiphy *arg1 , struct net_device *arg2 , _Bool arg3 , int arg4 ) ; void ldv_base_instance_callback_6_77(int (*arg0)(struct wiphy * , struct wireless_dev * , enum nl80211_tx_power_setting , int ) , struct wiphy *arg1 , struct wireless_dev *arg2 , enum nl80211_tx_power_setting arg3 , int arg4 ) ; void ldv_base_instance_callback_6_80(void (*arg0)(struct wiphy * , _Bool ) , struct wiphy *arg1 , _Bool arg2 ) ; void ldv_base_instance_callback_6_83(int (*arg0)(struct wiphy * , unsigned int ) , struct wiphy *arg1 , unsigned int arg2 ) ; void ldv_base_instance_callback_6_86(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_ap_settings * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_ap_settings *arg3 ) ; void ldv_base_instance_callback_6_87(int (*arg0)(struct wiphy * , struct net_device * ) , struct wiphy *arg1 , struct net_device *arg2 ) ; void ldv_base_instance_callback_6_9(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * , struct key_params * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , unsigned char *arg5 , struct key_params *arg6 ) ; int ldv_base_instance_probe_6_16(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_connect_params * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_connect_params *arg3 ) ; void ldv_base_instance_release_6_2(int (*arg0)(struct wiphy * , struct net_device * , unsigned short ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned short arg3 ) ; void ldv_base_instance_resume_6_5(int (*arg0)(struct wiphy * ) , struct wiphy *arg1 ) ; int ldv_base_instance_suspend_6_7(int (*arg0)(struct wiphy * , struct cfg80211_wowlan * ) , struct wiphy *arg1 , struct cfg80211_wowlan *arg2 ) ; void ldv_dispatch_deregister_13_1(struct net_device *arg0 ) ; void ldv_dispatch_register_14_2(struct net_device *arg0 ) ; void ldv_free_netdev(void *arg0 , struct net_device *arg1 ) ; int ldv_register_netdevice(int arg0 , struct net_device *arg1 ) ; void ldv_unregister_netdevice(void *arg0 , struct net_device *arg1 ) ; struct ldv_thread ldv_thread_6 ; struct net_device *ldv_alloc_netdev_mqs(struct net_device *arg0 , int arg1 , char *arg2 , void (*arg3)(struct net_device * ) , unsigned int arg4 , unsigned int arg5 ) { struct net_device *ldv_8_netdev_net_device ; void (*ldv_8_setup_setup)(struct net_device * ) ; void *tmp ; int tmp___0 ; { { tmp___0 = ldv_undef_int(); } if (tmp___0 != 0) { { tmp = ldv_xmalloc(3200UL); ldv_8_netdev_net_device = (struct net_device *)tmp; ldv_8_setup_setup = arg3; ldv_alloc_netdev_mqs_setup_8_3(ldv_8_setup_setup, ldv_8_netdev_net_device); } return (ldv_8_netdev_net_device); return (arg0); } else { return ((struct net_device *)0); return (arg0); } return (arg0); } } void ldv_alloc_netdev_mqs_setup_8_3(void (*arg0)(struct net_device * ) , struct net_device *arg1 ) { { { ether_setup(arg1); } return; } } void ldv_base_instance_callback_6_26(struct wireless_dev *(*arg0)(struct wiphy * , char * , enum nl80211_iftype , unsigned int * , struct vif_params * ) , struct wiphy *arg1 , char *arg2 , enum nl80211_iftype arg3 , unsigned int *arg4 , struct vif_params *arg5 ) { { { mwifiex_add_virtual_intf(arg1, (char const *)arg2, arg3, arg4, arg5); } return; } } void ldv_base_instance_callback_6_29(int (*arg0)(struct wiphy * , struct wireless_dev * , unsigned long long ) , struct wiphy *arg1 , struct wireless_dev *arg2 , unsigned long long arg3 ) { { { mwifiex_cfg80211_cancel_remain_on_channel(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_32(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_beacon_data * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_beacon_data *arg3 ) { { { mwifiex_cfg80211_change_beacon(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_33(int (*arg0)(struct wiphy * , struct net_device * , enum nl80211_iftype , unsigned int * , struct vif_params * ) , struct wiphy *arg1 , struct net_device *arg2 , enum nl80211_iftype arg3 , unsigned int *arg4 , struct vif_params *arg5 ) { { { mwifiex_cfg80211_change_virtual_intf(arg1, arg2, arg3, arg4, arg5); } return; } } void ldv_base_instance_callback_6_36(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , unsigned char *arg5 ) { { { mwifiex_cfg80211_del_key(arg1, arg2, (int )arg3, (int )arg4, (u8 const *)arg5); } return; } } void ldv_base_instance_callback_6_39(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 ) { { { mwifiex_cfg80211_del_station(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_42(int (*arg0)(struct wiphy * , struct wireless_dev * ) , struct wiphy *arg1 , struct wireless_dev *arg2 ) { { { mwifiex_del_virtual_intf(arg1, arg2); } return; } } void ldv_base_instance_callback_6_43(int (*arg0)(struct wiphy * , struct net_device * , int , unsigned char * , struct station_info * ) , struct wiphy *arg1 , struct net_device *arg2 , int arg3 , unsigned char *arg4 , struct station_info *arg5 ) { { { mwifiex_cfg80211_dump_station(arg1, arg2, arg3, arg4, arg5); } return; } } void ldv_base_instance_callback_6_46(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * , struct station_info * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 , struct station_info *arg4 ) { { { mwifiex_cfg80211_get_station(arg1, arg2, arg3, arg4); } return; } } void ldv_base_instance_callback_6_49(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_ibss_params * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_ibss_params *arg3 ) { { { mwifiex_cfg80211_join_ibss(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_50(int (*arg0)(struct wiphy * , struct net_device * ) , struct wiphy *arg1 , struct net_device *arg2 ) { { { mwifiex_cfg80211_leave_ibss(arg1, arg2); } return; } } void ldv_base_instance_callback_6_51(void (*arg0)(struct wiphy * , struct wireless_dev * , unsigned short , _Bool ) , struct wiphy *arg1 , struct wireless_dev *arg2 , unsigned short arg3 , _Bool arg4 ) { { { mwifiex_cfg80211_mgmt_frame_register(arg1, arg2, (int )arg3, (int )arg4); } return; } } void ldv_base_instance_callback_6_54(int (*arg0)(struct wiphy * , struct wireless_dev * , struct cfg80211_mgmt_tx_params * , unsigned long long * ) , struct wiphy *arg1 , struct wireless_dev *arg2 , struct cfg80211_mgmt_tx_params *arg3 , unsigned long long *arg4 ) { { { mwifiex_cfg80211_mgmt_tx(arg1, arg2, arg3, arg4); } return; } } void ldv_base_instance_callback_6_57(int (*arg0)(struct wiphy * , struct wireless_dev * , struct ieee80211_channel * , unsigned int , unsigned long long * ) , struct wiphy *arg1 , struct wireless_dev *arg2 , struct ieee80211_channel *arg3 , unsigned int arg4 , unsigned long long *arg5 ) { { { mwifiex_cfg80211_remain_on_channel(arg1, arg2, arg3, arg4, arg5); } return; } } void ldv_base_instance_callback_6_60(int (*arg0)(struct wiphy * , struct cfg80211_scan_request * ) , struct wiphy *arg1 , struct cfg80211_scan_request *arg2 ) { { { mwifiex_cfg80211_scan(arg1, arg2); } return; } } void ldv_base_instance_callback_6_61(int (*arg0)(struct wiphy * , unsigned int , unsigned int ) , struct wiphy *arg1 , unsigned int arg2 , unsigned int arg3 ) { { { mwifiex_cfg80211_set_antenna(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_64(int (*arg0)(struct wiphy * , struct net_device * , unsigned char * , struct cfg80211_bitrate_mask * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char *arg3 , struct cfg80211_bitrate_mask *arg4 ) { { { mwifiex_cfg80211_set_bitrate_mask(arg1, arg2, (u8 const *)arg3, (struct cfg80211_bitrate_mask const *)arg4); } return; } } void ldv_base_instance_callback_6_67(int (*arg0)(struct wiphy * , struct cfg80211_coalesce * ) , struct wiphy *arg1 , struct cfg80211_coalesce *arg2 ) { { { mwifiex_cfg80211_set_coalesce(arg1, arg2); } return; } } void ldv_base_instance_callback_6_68(int (*arg0)(struct wiphy * , struct net_device * , int , unsigned int ) , struct wiphy *arg1 , struct net_device *arg2 , int arg3 , unsigned int arg4 ) { { { mwifiex_cfg80211_set_cqm_rssi_config(arg1, arg2, arg3, arg4); } return; } } void ldv_base_instance_callback_6_71(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , _Bool ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , _Bool arg5 ) { { { mwifiex_cfg80211_set_default_key(arg1, arg2, (int )arg3, (int )arg4, (int )arg5); } return; } } void ldv_base_instance_callback_6_74(int (*arg0)(struct wiphy * , struct net_device * , _Bool , int ) , struct wiphy *arg1 , struct net_device *arg2 , _Bool arg3 , int arg4 ) { { { mwifiex_cfg80211_set_power_mgmt(arg1, arg2, (int )arg3, arg4); } return; } } void ldv_base_instance_callback_6_77(int (*arg0)(struct wiphy * , struct wireless_dev * , enum nl80211_tx_power_setting , int ) , struct wiphy *arg1 , struct wireless_dev *arg2 , enum nl80211_tx_power_setting arg3 , int arg4 ) { { { mwifiex_cfg80211_set_tx_power(arg1, arg2, arg3, arg4); } return; } } void ldv_base_instance_callback_6_80(void (*arg0)(struct wiphy * , _Bool ) , struct wiphy *arg1 , _Bool arg2 ) { { { mwifiex_cfg80211_set_wakeup(arg1, (int )arg2); } return; } } void ldv_base_instance_callback_6_83(int (*arg0)(struct wiphy * , unsigned int ) , struct wiphy *arg1 , unsigned int arg2 ) { { { mwifiex_cfg80211_set_wiphy_params(arg1, arg2); } return; } } void ldv_base_instance_callback_6_86(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_ap_settings * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_ap_settings *arg3 ) { { { mwifiex_cfg80211_start_ap(arg1, arg2, arg3); } return; } } void ldv_base_instance_callback_6_87(int (*arg0)(struct wiphy * , struct net_device * ) , struct wiphy *arg1 , struct net_device *arg2 ) { { { mwifiex_cfg80211_stop_ap(arg1, arg2); } return; } } void ldv_base_instance_callback_6_9(int (*arg0)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * , struct key_params * ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned char arg3 , _Bool arg4 , unsigned char *arg5 , struct key_params *arg6 ) { { { mwifiex_cfg80211_add_key(arg1, arg2, (int )arg3, (int )arg4, (u8 const *)arg5, arg6); } return; } } int ldv_base_instance_probe_6_16(int (*arg0)(struct wiphy * , struct net_device * , struct cfg80211_connect_params * ) , struct wiphy *arg1 , struct net_device *arg2 , struct cfg80211_connect_params *arg3 ) { int tmp ; { { tmp = mwifiex_cfg80211_connect(arg1, arg2, arg3); } return (tmp); } } void ldv_base_instance_release_6_2(int (*arg0)(struct wiphy * , struct net_device * , unsigned short ) , struct wiphy *arg1 , struct net_device *arg2 , unsigned short arg3 ) { { { mwifiex_cfg80211_disconnect(arg1, arg2, (int )arg3); } return; } } void ldv_base_instance_resume_6_5(int (*arg0)(struct wiphy * ) , struct wiphy *arg1 ) { { { mwifiex_cfg80211_resume(arg1); } return; } } int ldv_base_instance_suspend_6_7(int (*arg0)(struct wiphy * , struct cfg80211_wowlan * ) , struct wiphy *arg1 , struct cfg80211_wowlan *arg2 ) { int tmp ; { { tmp = mwifiex_cfg80211_suspend(arg1, arg2); } return (tmp); } } void ldv_dispatch_deregister_13_1(struct net_device *arg0 ) { { return; } } void ldv_dispatch_register_14_2(struct net_device *arg0 ) { struct ldv_struct_dummy_resourceless_instance_5 *cf_arg_5 ; void *tmp ; { { tmp = ldv_xmalloc(16UL); cf_arg_5 = (struct ldv_struct_dummy_resourceless_instance_5 *)tmp; cf_arg_5->arg0 = arg0; ldv_net_dummy_resourceless_instance_5((void *)cf_arg_5); } return; } } void ldv_free_netdev(void *arg0 , struct net_device *arg1 ) { struct net_device *ldv_11_netdev_net_device ; { { ldv_11_netdev_net_device = arg1; ldv_free((void *)ldv_11_netdev_net_device); } return; return; } } int ldv_register_netdevice(int arg0 , struct net_device *arg1 ) { struct net_device *ldv_14_net_device_net_device ; int tmp ; { { tmp = ldv_undef_int(); } if (tmp != 0) { { ldv_assume(arg0 == 0); ldv_14_net_device_net_device = arg1; ldv_dispatch_register_14_2(ldv_14_net_device_net_device); } return (arg0); } else { { ldv_assume(arg0 != 0); } return (arg0); } return (arg0); } } void ldv_struct_cfg80211_ops_base_instance_6(void *arg0 ) { int (*ldv_6_callback_add_key)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * , struct key_params * ) ; struct wireless_dev *(*ldv_6_callback_add_virtual_intf)(struct wiphy * , char * , enum nl80211_iftype , unsigned int * , struct vif_params * ) ; int (*ldv_6_callback_cancel_remain_on_channel)(struct wiphy * , struct wireless_dev * , unsigned long long ) ; int (*ldv_6_callback_change_beacon)(struct wiphy * , struct net_device * , struct cfg80211_beacon_data * ) ; int (*ldv_6_callback_change_virtual_intf)(struct wiphy * , struct net_device * , enum nl80211_iftype , unsigned int * , struct vif_params * ) ; int (*ldv_6_callback_del_key)(struct wiphy * , struct net_device * , unsigned char , _Bool , unsigned char * ) ; int (*ldv_6_callback_del_station)(struct wiphy * , struct net_device * , unsigned char * ) ; int (*ldv_6_callback_del_virtual_intf)(struct wiphy * , struct wireless_dev * ) ; int (*ldv_6_callback_dump_station)(struct wiphy * , struct net_device * , int , unsigned char * , struct station_info * ) ; int (*ldv_6_callback_get_station)(struct wiphy * , struct net_device * , unsigned char * , struct station_info * ) ; int (*ldv_6_callback_join_ibss)(struct wiphy * , struct net_device * , struct cfg80211_ibss_params * ) ; int (*ldv_6_callback_leave_ibss)(struct wiphy * , struct net_device * ) ; void (*ldv_6_callback_mgmt_frame_register)(struct wiphy * , struct wireless_dev * , unsigned short , _Bool ) ; int (*ldv_6_callback_mgmt_tx)(struct wiphy * , struct wireless_dev * , struct cfg80211_mgmt_tx_params * , unsigned long long * ) ; int (*ldv_6_callback_remain_on_channel)(struct wiphy * , struct wireless_dev * , struct ieee80211_channel * , unsigned int , unsigned long long * ) ; int (*ldv_6_callback_scan)(struct wiphy * , struct cfg80211_scan_request * ) ; int (*ldv_6_callback_set_antenna)(struct wiphy * , unsigned int , unsigned int ) ; int (*ldv_6_callback_set_bitrate_mask)(struct wiphy * , struct net_device * , unsigned char * , struct cfg80211_bitrate_mask * ) ; int (*ldv_6_callback_set_coalesce)(struct wiphy * , struct cfg80211_coalesce * ) ; int (*ldv_6_callback_set_cqm_rssi_config)(struct wiphy * , struct net_device * , int , unsigned int ) ; int (*ldv_6_callback_set_default_key)(struct wiphy * , struct net_device * , unsigned char , _Bool , _Bool ) ; int (*ldv_6_callback_set_power_mgmt)(struct wiphy * , struct net_device * , _Bool , int ) ; int (*ldv_6_callback_set_tx_power)(struct wiphy * , struct wireless_dev * , enum nl80211_tx_power_setting , int ) ; void (*ldv_6_callback_set_wakeup)(struct wiphy * , _Bool ) ; int (*ldv_6_callback_set_wiphy_params)(struct wiphy * , unsigned int ) ; int (*ldv_6_callback_start_ap)(struct wiphy * , struct net_device * , struct cfg80211_ap_settings * ) ; int (*ldv_6_callback_stop_ap)(struct wiphy * , struct net_device * ) ; struct cfg80211_ops *ldv_6_container_struct_cfg80211_ops ; char *ldv_6_ldv_param_26_1_default ; unsigned int *ldv_6_ldv_param_26_3_default ; unsigned long long ldv_6_ldv_param_29_2_default ; unsigned short ldv_6_ldv_param_2_2_default ; unsigned int *ldv_6_ldv_param_33_3_default ; unsigned char ldv_6_ldv_param_36_2_default ; _Bool ldv_6_ldv_param_36_3_default ; unsigned char *ldv_6_ldv_param_36_4_default ; unsigned char *ldv_6_ldv_param_39_2_default ; int ldv_6_ldv_param_43_2_default ; unsigned char *ldv_6_ldv_param_43_3_default ; unsigned char *ldv_6_ldv_param_46_2_default ; unsigned short ldv_6_ldv_param_51_2_default ; _Bool ldv_6_ldv_param_51_3_default ; unsigned long long *ldv_6_ldv_param_54_3_default ; unsigned int ldv_6_ldv_param_57_3_default ; unsigned long long *ldv_6_ldv_param_57_4_default ; unsigned int ldv_6_ldv_param_61_1_default ; unsigned int ldv_6_ldv_param_61_2_default ; unsigned char *ldv_6_ldv_param_64_2_default ; int ldv_6_ldv_param_68_2_default ; unsigned int ldv_6_ldv_param_68_3_default ; unsigned char ldv_6_ldv_param_71_2_default ; _Bool ldv_6_ldv_param_71_3_default ; _Bool ldv_6_ldv_param_71_4_default ; _Bool ldv_6_ldv_param_74_2_default ; int ldv_6_ldv_param_74_3_default ; int ldv_6_ldv_param_77_3_default ; _Bool ldv_6_ldv_param_80_1_default ; unsigned int ldv_6_ldv_param_83_1_default ; unsigned char ldv_6_ldv_param_9_2_default ; _Bool ldv_6_ldv_param_9_3_default ; unsigned char *ldv_6_ldv_param_9_4_default ; enum nl80211_iftype ldv_6_resource_enum_nl80211_iftype ; enum nl80211_tx_power_setting ldv_6_resource_enum_nl80211_tx_power_setting ; struct cfg80211_ap_settings *ldv_6_resource_struct_cfg80211_ap_settings_ptr ; struct cfg80211_beacon_data *ldv_6_resource_struct_cfg80211_beacon_data_ptr ; struct cfg80211_bitrate_mask *ldv_6_resource_struct_cfg80211_bitrate_mask_ptr ; struct cfg80211_coalesce *ldv_6_resource_struct_cfg80211_coalesce_ptr ; struct cfg80211_connect_params *ldv_6_resource_struct_cfg80211_connect_params_ptr ; struct cfg80211_ibss_params *ldv_6_resource_struct_cfg80211_ibss_params_ptr ; struct cfg80211_mgmt_tx_params *ldv_6_resource_struct_cfg80211_mgmt_tx_params_ptr ; struct cfg80211_scan_request *ldv_6_resource_struct_cfg80211_scan_request_ptr ; struct cfg80211_wowlan *ldv_6_resource_struct_cfg80211_wowlan_ptr ; struct ieee80211_channel *ldv_6_resource_struct_ieee80211_channel_ptr ; struct key_params *ldv_6_resource_struct_key_params_ptr ; struct net_device *ldv_6_resource_struct_net_device_ptr ; struct station_info *ldv_6_resource_struct_station_info_ptr ; struct vif_params *ldv_6_resource_struct_vif_params_ptr ; struct wiphy *ldv_6_resource_struct_wiphy_ptr ; struct wireless_dev *ldv_6_resource_struct_wireless_dev_ptr ; int ldv_6_ret_default ; void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; void *tmp___9 ; void *tmp___10 ; void *tmp___11 ; void *tmp___12 ; void *tmp___13 ; void *tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; void *tmp___19 ; int tmp___20 ; void *tmp___21 ; void *tmp___22 ; void *tmp___23 ; void *tmp___24 ; void *tmp___25 ; void *tmp___26 ; void *tmp___27 ; void *tmp___28 ; void *tmp___29 ; void *tmp___30 ; { { ldv_6_ret_default = 1; tmp = ldv_xmalloc(232UL); ldv_6_resource_struct_cfg80211_ap_settings_ptr = (struct cfg80211_ap_settings *)tmp; tmp___0 = ldv_xmalloc(96UL); ldv_6_resource_struct_cfg80211_beacon_data_ptr = (struct cfg80211_beacon_data *)tmp___0; tmp___1 = ldv_xmalloc(96UL); ldv_6_resource_struct_cfg80211_bitrate_mask_ptr = (struct cfg80211_bitrate_mask *)tmp___1; tmp___2 = ldv_xmalloc(16UL); ldv_6_resource_struct_cfg80211_coalesce_ptr = (struct cfg80211_coalesce *)tmp___2; tmp___3 = ldv_xmalloc(216UL); ldv_6_resource_struct_cfg80211_connect_params_ptr = (struct cfg80211_connect_params *)tmp___3; tmp___4 = ldv_xmalloc(128UL); ldv_6_resource_struct_cfg80211_ibss_params_ptr = (struct cfg80211_ibss_params *)tmp___4; tmp___5 = ldv_xmalloc(40UL); ldv_6_resource_struct_cfg80211_mgmt_tx_params_ptr = (struct cfg80211_mgmt_tx_params *)tmp___5; tmp___6 = ldv_xmalloc(88UL); ldv_6_resource_struct_cfg80211_scan_request_ptr = (struct cfg80211_scan_request *)tmp___6; tmp___7 = ldv_xmalloc(32UL); ldv_6_resource_struct_cfg80211_wowlan_ptr = (struct cfg80211_wowlan *)tmp___7; tmp___8 = ldv_xmalloc(56UL); ldv_6_resource_struct_ieee80211_channel_ptr = (struct ieee80211_channel *)tmp___8; tmp___9 = ldv_xmalloc(32UL); ldv_6_resource_struct_key_params_ptr = (struct key_params *)tmp___9; tmp___10 = ldv_xmalloc(3200UL); ldv_6_resource_struct_net_device_ptr = (struct net_device *)tmp___10; tmp___11 = ldv_xmalloc(144UL); ldv_6_resource_struct_station_info_ptr = (struct station_info *)tmp___11; tmp___12 = ldv_xmalloc(12UL); ldv_6_resource_struct_vif_params_ptr = (struct vif_params *)tmp___12; tmp___13 = ldv_xmalloc(1728UL); ldv_6_resource_struct_wiphy_ptr = (struct wiphy *)tmp___13; tmp___14 = ldv_xmalloc(944UL); ldv_6_resource_struct_wireless_dev_ptr = (struct wireless_dev *)tmp___14; } goto ldv_main_6; return; ldv_main_6: { tmp___16 = ldv_undef_int(); } if (tmp___16 != 0) { { ldv_6_ret_default = ldv_base_instance_probe_6_16(ldv_6_container_struct_cfg80211_ops->connect, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_resource_struct_cfg80211_connect_params_ptr); ldv_6_ret_default = ldv_filter_err_code(ldv_6_ret_default); tmp___15 = ldv_undef_int(); } if (tmp___15 != 0) { { ldv_assume(ldv_6_ret_default == 0); } goto ldv_call_6; } else { { ldv_assume(ldv_6_ret_default != 0); } goto ldv_main_6; } } else { { ldv_free((void *)ldv_6_resource_struct_cfg80211_ap_settings_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_beacon_data_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_bitrate_mask_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_coalesce_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_connect_params_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_ibss_params_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_mgmt_tx_params_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_scan_request_ptr); ldv_free((void *)ldv_6_resource_struct_cfg80211_wowlan_ptr); ldv_free((void *)ldv_6_resource_struct_ieee80211_channel_ptr); ldv_free((void *)ldv_6_resource_struct_key_params_ptr); ldv_free((void *)ldv_6_resource_struct_net_device_ptr); ldv_free((void *)ldv_6_resource_struct_station_info_ptr); ldv_free((void *)ldv_6_resource_struct_vif_params_ptr); ldv_free((void *)ldv_6_resource_struct_wiphy_ptr); ldv_free((void *)ldv_6_resource_struct_wireless_dev_ptr); } return; } return; ldv_call_6: { tmp___17 = ldv_undef_int(); } { if (tmp___17 == 1) { goto case_1; } else { } if (tmp___17 == 2) { goto case_2; } else { } if (tmp___17 == 3) { goto case_3; } else { } goto switch_default___0; case_1: /* CIL Label */ { ldv_base_instance_release_6_2(ldv_6_container_struct_cfg80211_ops->disconnect, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, (int )ldv_6_ldv_param_2_2_default); } goto ldv_main_6; case_2: /* CIL Label */ { ldv_6_ret_default = ldv_base_instance_suspend_6_7(ldv_6_container_struct_cfg80211_ops->suspend, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_cfg80211_wowlan_ptr); ldv_6_ret_default = ldv_filter_err_code(ldv_6_ret_default); tmp___18 = ldv_undef_int(); } if (tmp___18 != 0) { { ldv_assume(ldv_6_ret_default == 0); ldv_base_instance_resume_6_5(ldv_6_container_struct_cfg80211_ops->resume, ldv_6_resource_struct_wiphy_ptr); } goto ldv_call_6; } else { { ldv_assume(ldv_6_ret_default != 0); } goto ldv_call_6; goto ldv_call_6; } case_3: /* CIL Label */ { tmp___19 = ldv_xmalloc(1UL); ldv_6_ldv_param_9_4_default = (unsigned char *)tmp___19; tmp___20 = ldv_undef_int(); } { if (tmp___20 == 1) { goto case_1___0; } else { } if (tmp___20 == 2) { goto case_2___0; } else { } if (tmp___20 == 3) { goto case_3___0; } else { } if (tmp___20 == 4) { goto case_4; } else { } if (tmp___20 == 5) { goto case_5; } else { } if (tmp___20 == 6) { goto case_6; } else { } if (tmp___20 == 7) { goto case_7; } else { } if (tmp___20 == 8) { goto case_8; } else { } if (tmp___20 == 9) { goto case_9; } else { } if (tmp___20 == 10) { goto case_10; } else { } if (tmp___20 == 11) { goto case_11; } else { } if (tmp___20 == 12) { goto case_12; } else { } if (tmp___20 == 13) { goto case_13; } else { } if (tmp___20 == 14) { goto case_14; } else { } if (tmp___20 == 15) { goto case_15; } else { } if (tmp___20 == 16) { goto case_16; } else { } if (tmp___20 == 17) { goto case_17; } else { } if (tmp___20 == 18) { goto case_18; } else { } if (tmp___20 == 19) { goto case_19; } else { } if (tmp___20 == 20) { goto case_20; } else { } if (tmp___20 == 21) { goto case_21; } else { } if (tmp___20 == 22) { goto case_22; } else { } if (tmp___20 == 23) { goto case_23; } else { } if (tmp___20 == 24) { goto case_24; } else { } if (tmp___20 == 25) { goto case_25; } else { } if (tmp___20 == 26) { goto case_26; } else { } if (tmp___20 == 27) { goto case_27; } else { } goto switch_default; case_1___0: /* CIL Label */ { ldv_base_instance_callback_6_87(ldv_6_callback_stop_ap, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr); } goto ldv_55806; case_2___0: /* CIL Label */ { ldv_base_instance_callback_6_86(ldv_6_callback_start_ap, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_resource_struct_cfg80211_ap_settings_ptr); } goto ldv_55806; case_3___0: /* CIL Label */ { ldv_base_instance_callback_6_83(ldv_6_callback_set_wiphy_params, ldv_6_resource_struct_wiphy_ptr, ldv_6_ldv_param_83_1_default); } goto ldv_55806; case_4: /* CIL Label */ { ldv_base_instance_callback_6_80(ldv_6_callback_set_wakeup, ldv_6_resource_struct_wiphy_ptr, (int )ldv_6_ldv_param_80_1_default); } goto ldv_55806; case_5: /* CIL Label */ { ldv_base_instance_callback_6_77(ldv_6_callback_set_tx_power, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr, ldv_6_resource_enum_nl80211_tx_power_setting, ldv_6_ldv_param_77_3_default); } goto ldv_55806; case_6: /* CIL Label */ { ldv_base_instance_callback_6_74(ldv_6_callback_set_power_mgmt, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, (int )ldv_6_ldv_param_74_2_default, ldv_6_ldv_param_74_3_default); } goto ldv_55806; case_7: /* CIL Label */ { ldv_base_instance_callback_6_71(ldv_6_callback_set_default_key, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, (int )ldv_6_ldv_param_71_2_default, (int )ldv_6_ldv_param_71_3_default, (int )ldv_6_ldv_param_71_4_default); } goto ldv_55806; case_8: /* CIL Label */ { ldv_base_instance_callback_6_68(ldv_6_callback_set_cqm_rssi_config, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_ldv_param_68_2_default, ldv_6_ldv_param_68_3_default); } goto ldv_55806; case_9: /* CIL Label */ { ldv_base_instance_callback_6_67(ldv_6_callback_set_coalesce, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_cfg80211_coalesce_ptr); } goto ldv_55806; case_10: /* CIL Label */ { tmp___21 = ldv_xmalloc(1UL); ldv_6_ldv_param_64_2_default = (unsigned char *)tmp___21; ldv_base_instance_callback_6_64(ldv_6_callback_set_bitrate_mask, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_ldv_param_64_2_default, ldv_6_resource_struct_cfg80211_bitrate_mask_ptr); ldv_free((void *)ldv_6_ldv_param_64_2_default); } goto ldv_55806; case_11: /* CIL Label */ { ldv_base_instance_callback_6_61(ldv_6_callback_set_antenna, ldv_6_resource_struct_wiphy_ptr, ldv_6_ldv_param_61_1_default, ldv_6_ldv_param_61_2_default); } goto ldv_55806; case_12: /* CIL Label */ { ldv_base_instance_callback_6_60(ldv_6_callback_scan, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_cfg80211_scan_request_ptr); } goto ldv_55806; case_13: /* CIL Label */ { tmp___22 = ldv_xmalloc(8UL); ldv_6_ldv_param_57_4_default = (unsigned long long *)tmp___22; ldv_base_instance_callback_6_57(ldv_6_callback_remain_on_channel, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr, ldv_6_resource_struct_ieee80211_channel_ptr, ldv_6_ldv_param_57_3_default, ldv_6_ldv_param_57_4_default); ldv_free((void *)ldv_6_ldv_param_57_4_default); } goto ldv_55806; case_14: /* CIL Label */ { tmp___23 = ldv_xmalloc(8UL); ldv_6_ldv_param_54_3_default = (unsigned long long *)tmp___23; ldv_base_instance_callback_6_54(ldv_6_callback_mgmt_tx, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr, ldv_6_resource_struct_cfg80211_mgmt_tx_params_ptr, ldv_6_ldv_param_54_3_default); ldv_free((void *)ldv_6_ldv_param_54_3_default); } goto ldv_55806; case_15: /* CIL Label */ { ldv_base_instance_callback_6_51(ldv_6_callback_mgmt_frame_register, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr, (int )ldv_6_ldv_param_51_2_default, (int )ldv_6_ldv_param_51_3_default); } goto ldv_55806; case_16: /* CIL Label */ { ldv_base_instance_callback_6_50(ldv_6_callback_leave_ibss, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr); } goto ldv_55806; case_17: /* CIL Label */ { ldv_base_instance_callback_6_49(ldv_6_callback_join_ibss, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_resource_struct_cfg80211_ibss_params_ptr); } goto ldv_55806; case_18: /* CIL Label */ { tmp___24 = ldv_xmalloc(1UL); ldv_6_ldv_param_46_2_default = (unsigned char *)tmp___24; ldv_base_instance_callback_6_46(ldv_6_callback_get_station, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_ldv_param_46_2_default, ldv_6_resource_struct_station_info_ptr); ldv_free((void *)ldv_6_ldv_param_46_2_default); } goto ldv_55806; case_19: /* CIL Label */ { tmp___25 = ldv_xmalloc(1UL); ldv_6_ldv_param_43_3_default = (unsigned char *)tmp___25; ldv_base_instance_callback_6_43(ldv_6_callback_dump_station, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_ldv_param_43_2_default, ldv_6_ldv_param_43_3_default, ldv_6_resource_struct_station_info_ptr); ldv_free((void *)ldv_6_ldv_param_43_3_default); } goto ldv_55806; case_20: /* CIL Label */ { ldv_base_instance_callback_6_42(ldv_6_callback_del_virtual_intf, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr); } goto ldv_55806; case_21: /* CIL Label */ { tmp___26 = ldv_xmalloc(1UL); ldv_6_ldv_param_39_2_default = (unsigned char *)tmp___26; ldv_base_instance_callback_6_39(ldv_6_callback_del_station, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_ldv_param_39_2_default); ldv_free((void *)ldv_6_ldv_param_39_2_default); } goto ldv_55806; case_22: /* CIL Label */ { tmp___27 = ldv_xmalloc(1UL); ldv_6_ldv_param_36_4_default = (unsigned char *)tmp___27; ldv_base_instance_callback_6_36(ldv_6_callback_del_key, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, (int )ldv_6_ldv_param_36_2_default, (int )ldv_6_ldv_param_36_3_default, ldv_6_ldv_param_36_4_default); ldv_free((void *)ldv_6_ldv_param_36_4_default); } goto ldv_55806; case_23: /* CIL Label */ { tmp___28 = ldv_xmalloc(4UL); ldv_6_ldv_param_33_3_default = (unsigned int *)tmp___28; ldv_base_instance_callback_6_33(ldv_6_callback_change_virtual_intf, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_resource_enum_nl80211_iftype, ldv_6_ldv_param_33_3_default, ldv_6_resource_struct_vif_params_ptr); ldv_free((void *)ldv_6_ldv_param_33_3_default); } goto ldv_55806; case_24: /* CIL Label */ { ldv_base_instance_callback_6_32(ldv_6_callback_change_beacon, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, ldv_6_resource_struct_cfg80211_beacon_data_ptr); } goto ldv_55806; case_25: /* CIL Label */ { ldv_base_instance_callback_6_29(ldv_6_callback_cancel_remain_on_channel, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_wireless_dev_ptr, ldv_6_ldv_param_29_2_default); } goto ldv_55806; case_26: /* CIL Label */ { tmp___29 = ldv_xmalloc(1UL); ldv_6_ldv_param_26_1_default = (char *)tmp___29; tmp___30 = ldv_xmalloc(4UL); ldv_6_ldv_param_26_3_default = (unsigned int *)tmp___30; ldv_base_instance_callback_6_26(ldv_6_callback_add_virtual_intf, ldv_6_resource_struct_wiphy_ptr, ldv_6_ldv_param_26_1_default, ldv_6_resource_enum_nl80211_iftype, ldv_6_ldv_param_26_3_default, ldv_6_resource_struct_vif_params_ptr); ldv_free((void *)ldv_6_ldv_param_26_1_default); ldv_free((void *)ldv_6_ldv_param_26_3_default); } goto ldv_55806; case_27: /* CIL Label */ { ldv_base_instance_callback_6_9(ldv_6_callback_add_key, ldv_6_resource_struct_wiphy_ptr, ldv_6_resource_struct_net_device_ptr, (int )ldv_6_ldv_param_9_2_default, (int )ldv_6_ldv_param_9_3_default, ldv_6_ldv_param_9_4_default, ldv_6_resource_struct_key_params_ptr); } goto ldv_55806; switch_default: /* CIL Label */ { ldv_stop(); } switch_break___0: /* CIL Label */ ; } ldv_55806: ; goto ldv_55834; switch_default___0: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } ldv_55834: { ldv_free((void *)ldv_6_ldv_param_9_4_default); } goto ldv_call_6; return; } } void ldv_unregister_netdevice(void *arg0 , struct net_device *arg1 ) { struct net_device *ldv_13_net_device_net_device ; { { ldv_13_net_device_net_device = arg1; ldv_dispatch_deregister_13_1(ldv_13_net_device_net_device); } return; return; } } __inline static void *ERR_PTR(long error ) { void *tmp ; { { tmp = ldv_err_ptr(error); } return (tmp); } } static struct net_device *ldv_alloc_netdev_mqs_19(int ldv_func_arg1 , char const *ldv_func_arg2 , void (*ldv_func_arg3)(struct net_device * ) , unsigned int ldv_func_arg4 , unsigned int ldv_func_arg5 ) { ldv_func_ret_type___3 ldv_func_res ; struct net_device *tmp ; struct net_device *tmp___0 ; { { tmp = alloc_netdev_mqs(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4, ldv_func_arg5); ldv_func_res = tmp; tmp___0 = ldv_alloc_netdev_mqs(ldv_func_res, ldv_func_arg1, (char *)ldv_func_arg2, ldv_func_arg3, ldv_func_arg4, ldv_func_arg5); } return (tmp___0); return (ldv_func_res); } } static int ldv_register_netdevice_20(struct net_device *ldv_func_arg1 ) { ldv_func_ret_type___1 ldv_func_res ; int tmp ; int tmp___0 ; { { tmp = register_netdevice(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_register_netdevice(ldv_func_res, ldv_func_arg1); } return (tmp___0); return (ldv_func_res); } } static void ldv_free_netdev_21(struct net_device *ldv_func_arg1 ) { { { free_netdev(ldv_func_arg1); ldv_free_netdev((void *)0, ldv_func_arg1); } return; } } __inline static void ldv_unregister_netdevice_22(struct net_device *dev ) { { { unregister_netdevice(dev); ldv_unregister_netdevice((void *)0, dev); } return; } } static void mwifiex_ethtool_get_wol(struct net_device *dev , struct ethtool_wolinfo *wol ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u32 conditions ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; conditions = (priv->adapter)->hs_cfg.conditions; wol->supported = 15U; } if (conditions == 0U) { return; } else { } if ((conditions & 2U) != 0U) { wol->wolopts = wol->wolopts | 2U; } else { } if ((conditions & 8U) != 0U) { wol->wolopts = wol->wolopts | 4U; } else { } if ((int )conditions & 1) { wol->wolopts = wol->wolopts | 8U; } else { } if ((conditions & 4U) != 0U) { wol->wolopts = wol->wolopts | 1U; } else { } return; } } static int mwifiex_ethtool_set_wol(struct net_device *dev , struct ethtool_wolinfo *wol ) { struct mwifiex_private *priv ; struct mwifiex_private *tmp ; u32 conditions ; { { tmp = mwifiex_netdev_get_priv(dev); priv = tmp; conditions = 0U; } if ((wol->wolopts & 4294967280U) != 0U) { return (-95); } else { } if ((wol->wolopts & 2U) != 0U) { conditions = conditions | 2U; } else { } if ((wol->wolopts & 4U) != 0U) { conditions = conditions | 8U; } else { } if ((wol->wolopts & 8U) != 0U) { conditions = conditions | 1U; } else { } if ((int )wol->wolopts & 1) { conditions = conditions | 4U; } else { } if (wol->wolopts == 0U) { conditions = conditions; } else { } (priv->adapter)->hs_cfg.conditions = conditions; return (0); } } struct ethtool_ops const mwifiex_ethtool_ops = {0, 0, 0, 0, 0, & mwifiex_ethtool_get_wol, & mwifiex_ethtool_set_wol, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void ldv_dummy_resourceless_instance_callback_5_17(int (*arg0)(struct net_device * , struct ethtool_wolinfo * ) , struct net_device *arg1 , struct ethtool_wolinfo *arg2 ) { { { mwifiex_ethtool_set_wol(arg1, arg2); } return; } } void ldv_dummy_resourceless_instance_callback_5_3(void (*arg0)(struct net_device * , struct ethtool_wolinfo * ) , struct net_device *arg1 , struct ethtool_wolinfo *arg2 ) { { { mwifiex_ethtool_get_wol(arg1, arg2); } return; } } static void mwifiex_11h_process_infra_join(struct mwifiex_private *priv , u8 **buffer , struct mwifiex_bssdescriptor *bss_desc ) { struct mwifiex_ie_types_header *ie_header ; struct mwifiex_ie_types_pwr_capability *cap ; struct mwifiex_ie_types_local_pwr_constraint *constraint ; struct ieee80211_supported_band *sband ; u8 radio_type ; int i ; u8 *tmp ; u8 *tmp___0 ; u8 *tmp___1 ; int tmp___2 ; u8 *tmp___3 ; { if ((unsigned long )buffer == (unsigned long )((u8 **)0U) || (unsigned long )*buffer == (unsigned long )((u8 *)0U)) { return; } else { } { radio_type = mwifiex_band_to_radio_type((int )((unsigned char )bss_desc->bss_band)); sband = ((priv->wdev)->wiphy)->bands[(int )radio_type]; cap = (struct mwifiex_ie_types_pwr_capability *)*buffer; cap->header.type = 33U; cap->header.len = 2U; cap->min_pwr = 0; cap->max_pwr = 0; *buffer = *buffer + 6UL; constraint = (struct mwifiex_ie_types_local_pwr_constraint *)*buffer; constraint->header.type = 32U; constraint->header.len = 2U; constraint->chan = (u8 )bss_desc->channel; constraint->constraint = bss_desc->local_constraint; *buffer = *buffer + 6UL; ie_header = (struct mwifiex_ie_types_header *)*buffer; ie_header->type = 266U; ie_header->len = ((unsigned int )((unsigned short )sband->n_channels) + 1U) * 2U; *buffer = *buffer + 4UL; tmp = *buffer; *buffer = *buffer + 1; *tmp = 36U; tmp___0 = *buffer; *buffer = *buffer + 1; *tmp___0 = (unsigned int )((u8 )sband->n_channels) * 2U; i = 0; } goto ldv_54309; ldv_54308: { tmp___1 = *buffer; *buffer = *buffer + 1; tmp___2 = ieee80211_frequency_to_channel((int )(sband->channels + (unsigned long )i)->center_freq); *tmp___1 = (u8 )tmp___2; tmp___3 = *buffer; *buffer = *buffer + 1; *tmp___3 = 1U; i = i + 1; } ldv_54309: ; if (i < sband->n_channels) { goto ldv_54308; } else { } return; } } static int mwifiex_11h_activate(struct mwifiex_private *priv , bool flag ) { u32 enable ; int tmp ; { { enable = (u32 )flag; tmp = mwifiex_send_cmd_sync(priv, 22, 1, 10U, (void *)(& enable)); } return (tmp); } } void mwifiex_11h_process_join(struct mwifiex_private *priv , u8 **buffer , struct mwifiex_bssdescriptor *bss_desc ) { { if ((unsigned int )bss_desc->sensed_11h != 0U) { { mwifiex_11h_activate(priv, 1); bss_desc->cap_info_bitmap = (u16 )((unsigned int )bss_desc->cap_info_bitmap | 256U); mwifiex_11h_process_infra_join(priv, buffer, bss_desc); } } else { { mwifiex_11h_activate(priv, 0); bss_desc->cap_info_bitmap = (unsigned int )bss_desc->cap_info_bitmap & 65279U; } } return; } } extern void might_fault(void) ; extern int sscanf(char const * , char const * , ...) ; extern unsigned long get_zeroed_page(gfp_t ) ; extern void free_pages(unsigned long , unsigned int ) ; extern int simple_open(struct inode * , struct file * ) ; extern ssize_t simple_read_from_buffer(void * , size_t , loff_t * , void const * , size_t ) ; extern unsigned long _copy_from_user(void * , void const * , unsigned int ) ; extern void __copy_from_user_overflow(void) ; __inline static unsigned long copy_from_user(void *to , void const *from , unsigned long n ) { int sz ; long tmp ; long tmp___0 ; { { sz = -1; might_fault(); tmp = ldv__builtin_expect(sz < 0, 1L); } if (tmp != 0L) { { n = _copy_from_user(to, from, (unsigned int )n); } } else { { tmp___0 = ldv__builtin_expect((unsigned long )sz >= n, 1L); } if (tmp___0 != 0L) { { n = _copy_from_user(to, from, (unsigned int )n); } } else { { __copy_from_user_overflow(); } } } return (n); } } extern struct dentry *debugfs_create_file(char const * , umode_t , struct dentry * , void * , struct file_operations const * ) ; extern struct dentry *debugfs_create_dir(char const * , struct dentry * ) ; extern void debugfs_remove(struct dentry * ) ; extern void debugfs_remove_recursive(struct dentry * ) ; static struct dentry *mwifiex_dfs_dir ; static char *bss_modes[11U] = { (char *)"UNSPECIFIED", (char *)"ADHOC", (char *)"STATION", (char *)"AP", (char *)"AP_VLAN", (char *)"WDS", (char *)"MONITOR", (char *)"MESH_POINT", (char *)"P2P_CLIENT", (char *)"P2P_GO", (char *)"P2P_DEVICE"}; static struct mwifiex_debug_data items[41U] = { {{'i', 'n', 't', '_', 'c', 'o', 'u', 'n', 't', 'e', 'r', '\000'}, 4U, 0UL, 1}, {{'w', 'm', 'm', '_', 'a', 'c', '_', 'v', 'o', '\000'}, 4U, 16UL, 1}, {{'w', 'm', 'm', '_', 'a', 'c', '_', 'v', 'i', '\000'}, 4U, 12UL, 1}, {{'w', 'm', 'm', '_', 'a', 'c', '_', 'b', 'e', '\000'}, 4U, 8UL, 1}, {{'w', 'm', 'm', '_', 'a', 'c', '_', 'b', 'k', '\000'}, 4U, 4UL, 1}, {{'t', 'x', '_', 'b', 'u', 'f', '_', 's', 'i', 'z', 'e', '\000'}, 4U, 36UL, 1}, {{'c', 'u', 'r', 'r', '_', 't', 'x', '_', 'b', 'u', 'f', '_', 's', 'i', 'z', 'e', '\000'}, 4U, 40UL, 1}, {{'p', 's', '_', 'm', 'o', 'd', 'e', '\000'}, 2U, 4420UL, 1}, {{'p', 's', '_', 's', 't', 'a', 't', 'e', '\000'}, 4U, 4424UL, 1}, {{'i', 's', '_', 'd', 'e', 'e', 'p', '_', 's', 'l', 'e', 'e', 'p', '\000'}, 1U, 4428UL, 1}, {{'w', 'a', 'k', 'e', 'u', 'p', '_', 'd', 'e', 'v', '_', 'r', 'e', 'q', '\000'}, 1U, 4429UL, 1}, {{'w', 'a', 'k', 'e', 'u', 'p', '_', 't', 'r', 'i', 'e', 's', '\000'}, 4U, 4432UL, 1}, {{'h', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'e', 'd', '\000'}, 1U, 4436UL, 1}, {{'h', 's', '_', 'a', 'c', 't', 'i', 'v', 'a', 't', 'e', 'd', '\000'}, 1U, 4437UL, 1}, {{'n', 'u', 'm', '_', 't', 'x', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\000'}, 4U, 4476UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\000'}, 4U, 4480UL, 1}, {{'t', 'i', 'm', 'e', 'o', 'u', 't', '_', 'c', 'm', 'd', '_', 'i', 'd', '\000'}, 2U, 4484UL, 1}, {{'t', 'i', 'm', 'e', 'o', 'u', 't', '_', 'c', 'm', 'd', '_', 'a', 'c', 't', '\000'}, 2U, 4486UL, 1}, {{'l', 'a', 's', 't', '_', 'c', 'm', 'd', '_', 'i', 'd', '\000'}, 10U, 4488UL, 5}, {{'l', 'a', 's', 't', '_', 'c', 'm', 'd', '_', 'a', 'c', 't', '\000'}, 10U, 4498UL, 5}, {{'l', 'a', 's', 't', '_', 'c', 'm', 'd', '_', 'i', 'n', 'd', 'e', 'x', '\000'}, 2U, 4508UL, 1}, {{'l', 'a', 's', 't', '_', 'c', 'm', 'd', '_', 'r', 'e', 's', 'p', '_', 'i', 'd', '\000'}, 10U, 4510UL, 5}, {{'l', 'a', 's', 't', '_', 'c', 'm', 'd', '_', 'r', 'e', 's', 'p', '_', 'i', 'n', 'd', 'e', 'x', '\000'}, 2U, 4520UL, 1}, {{'l', 'a', 's', 't', '_', 'e', 'v', 'e', 'n', 't', '\000'}, 10U, 4522UL, 5}, {{'l', 'a', 's', 't', '_', 'e', 'v', 'e', 'n', 't', '_', 'i', 'n', 'd', 'e', 'x', '\000'}, 2U, 4532UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 'h', '2', 'c', '_', 'f', 'a', 'i', 'l', '\000'}, 4U, 4440UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 's', 'l', 'e', 'e', 'p', '_', 'c', 'f', 'm', '_', 'f', 'a', 'i', 'l', '\000'}, 4U, 4444UL, 1}, {{'n', 'u', 'm', '_', 't', 'x', '_', 'h', '2', 'c', '_', 'f', 'a', 'i', 'l', '\000'}, 4U, 4448UL, 1}, {{'n', 'u', 'm', '_', 'e', 'v', 't', '_', 'd', 'e', 'a', 'u', 't', 'h', '\000'}, 4U, 4452UL, 1}, {{'n', 'u', 'm', '_', 'e', 'v', 't', '_', 'd', 'i', 's', 'a', 's', 's', 'o', 'c', '\000'}, 4U, 4456UL, 1}, {{'n', 'u', 'm', '_', 'e', 'v', 't', '_', 'l', 'i', 'n', 'k', '_', 'l', 'o', 's', 't', '\000'}, 4U, 4460UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 'd', 'e', 'a', 'u', 't', 'h', '\000'}, 4U, 4464UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 'a', 's', 's', 'o', 'c', '_', 'o', 'k', '\000'}, 4U, 4468UL, 1}, {{'n', 'u', 'm', '_', 'c', 'm', 'd', '_', 'a', 's', 's', 'o', 'c', '_', 'f', 'a', 'i', 'l', '\000'}, 4U, 4472UL, 1}, {{'c', 'm', 'd', '_', 's', 'e', 'n', 't', '\000'}, 1U, 4535UL, 1}, {{'d', 'a', 't', 'a', '_', 's', 'e', 'n', 't', '\000'}, 1U, 4534UL, 1}, {{'c', 'm', 'd', '_', 'r', 'e', 's', 'p', '_', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd', '\000'}, 1U, 4536UL, 1}, {{'e', 'v', 'e', 'n', 't', '_', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd', '\000'}, 1U, 4537UL, 1}, {{'c', 'm', 'd', '_', 'p', 'e', 'n', 'd', 'i', 'n', 'g', '\000'}, 4U, 392UL, 1}, {{'t', 'x', '_', 'p', 'e', 'n', 'd', 'i', 'n', 'g', '\000'}, 4U, 388UL, 1}, {{'r', 'x', '_', 'p', 'e', 'n', 'd', 'i', 'n', 'g', '\000'}, 4U, 384UL, 1}}; static int num_of_items = 41; static ssize_t mwifiex_info_read(struct file *file , char *ubuf , size_t count , loff_t *ppos ) { struct mwifiex_private *priv ; struct net_device *netdev ; struct netdev_hw_addr *ha ; struct netdev_queue *txq ; unsigned long page ; unsigned long tmp ; char *p ; char fmt[64U] ; struct mwifiex_bss_info info___0 ; ssize_t ret ; int i ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; struct list_head const *__mptr ; int tmp___14 ; int tmp___15 ; struct list_head const *__mptr___0 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; bool tmp___24 ; int tmp___25 ; int tmp___26 ; bool tmp___27 ; int tmp___28 ; int tmp___29 ; { { priv = (struct mwifiex_private *)file->private_data; netdev = priv->netdev; tmp = get_zeroed_page(208U); page = tmp; p = (char *)page; i = 0; } if ((unsigned long )p == (unsigned long )((char *)0)) { return (-12L); } else { } { memset((void *)(& info___0), 0, 88UL); tmp___0 = mwifiex_get_bss_info(priv, & info___0); ret = (ssize_t )tmp___0; } if (ret != 0L) { goto free_and_exit; } else { } { mwifiex_drv_get_driver_version(priv->adapter, (char *)(& fmt), 63); } if ((int )((signed char )priv->version_str[0]) == 0) { { mwifiex_get_ver_ext(priv); } } else { } { tmp___1 = sprintf(p, "driver_name = \"mwifiex\"\n"); p = p + (unsigned long )tmp___1; tmp___2 = sprintf(p, "driver_version = %s", (char *)(& fmt)); p = p + (unsigned long )tmp___2; tmp___3 = sprintf(p, "\nverext = %s", (char *)(& priv->version_str)); p = p + (unsigned long )tmp___3; tmp___4 = sprintf(p, "\ninterface_name=\"%s\"\n", (char *)(& netdev->name)); p = p + (unsigned long )tmp___4; } if (info___0.bss_mode > 10U) { { tmp___5 = sprintf(p, "bss_mode=\"%d\"\n", info___0.bss_mode); p = p + (unsigned long )tmp___5; } } else { { tmp___6 = sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info___0.bss_mode]); p = p + (unsigned long )tmp___6; } } { tmp___7 = sprintf(p, "media_state=\"%s\"\n", (unsigned int )priv->media_connected == 0U ? (char *)"Disconnected" : (char *)"Connected"); p = p + (unsigned long )tmp___7; tmp___8 = sprintf(p, "mac_address=\"%pM\"\n", netdev->dev_addr); p = p + (unsigned long )tmp___8; } if (((unsigned long )priv->bss_role & 1UL) == 0UL) { { tmp___9 = sprintf(p, "multicast_count=\"%d\"\n", netdev->mc.count); p = p + (unsigned long )tmp___9; tmp___10 = sprintf(p, "essid=\"%s\"\n", (u8 *)(& info___0.ssid.ssid)); p = p + (unsigned long )tmp___10; tmp___11 = sprintf(p, "bssid=\"%pM\"\n", (u8 *)(& info___0.bssid)); p = p + (unsigned long )tmp___11; tmp___12 = sprintf(p, "channel=\"%d\"\n", (int )info___0.bss_chan); p = p + (unsigned long )tmp___12; tmp___13 = sprintf(p, "country_code = \"%s\"\n", (u8 *)(& info___0.country_code)); p = p + (unsigned long )tmp___13; __mptr = (struct list_head const *)netdev->mc.list.next; ha = (struct netdev_hw_addr *)__mptr; } goto ldv_54572; ldv_54571: { tmp___14 = i; i = i + 1; tmp___15 = sprintf(p, "multicast_address[%d]=\"%pM\"\n", tmp___14, (unsigned char *)(& ha->addr)); p = p + (unsigned long )tmp___15; __mptr___0 = (struct list_head const *)ha->list.next; ha = (struct netdev_hw_addr *)__mptr___0; } ldv_54572: ; if ((unsigned long )(& ha->list) != (unsigned long )(& netdev->mc.list)) { goto ldv_54571; } else { } } else { } { tmp___16 = sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); p = p + (unsigned long )tmp___16; tmp___17 = sprintf(p, "num_rx_bytes = %lu\n", priv->stats.rx_bytes); p = p + (unsigned long )tmp___17; tmp___18 = sprintf(p, "num_tx_pkts = %lu\n", priv->stats.tx_packets); p = p + (unsigned long )tmp___18; tmp___19 = sprintf(p, "num_rx_pkts = %lu\n", priv->stats.rx_packets); p = p + (unsigned long )tmp___19; tmp___20 = sprintf(p, "num_tx_pkts_dropped = %lu\n", priv->stats.tx_dropped); p = p + (unsigned long )tmp___20; tmp___21 = sprintf(p, "num_rx_pkts_dropped = %lu\n", priv->stats.rx_dropped); p = p + (unsigned long )tmp___21; tmp___22 = sprintf(p, "num_tx_pkts_err = %lu\n", priv->stats.tx_errors); p = p + (unsigned long )tmp___22; tmp___23 = sprintf(p, "num_rx_pkts_err = %lu\n", priv->stats.rx_errors); p = p + (unsigned long )tmp___23; tmp___24 = netif_carrier_ok((struct net_device const *)priv->netdev); tmp___25 = sprintf(p, "carrier %s\n", (int )tmp___24 ? (char *)"on" : (char *)"off"); p = p + (unsigned long )tmp___25; tmp___26 = sprintf(p, "tx queue"); p = p + (unsigned long )tmp___26; i = 0; } goto ldv_54575; ldv_54574: { txq = netdev_get_tx_queue((struct net_device const *)netdev, (unsigned int )i); tmp___27 = netif_tx_queue_stopped((struct netdev_queue const *)txq); tmp___28 = sprintf(p, " %d:%s", i, (int )tmp___27 ? (char *)"stopped" : (char *)"started"); p = p + (unsigned long )tmp___28; i = i + 1; } ldv_54575: ; if ((unsigned int )i < netdev->num_tx_queues) { goto ldv_54574; } else { } { tmp___29 = sprintf(p, "\n"); p = p + (unsigned long )tmp___29; ret = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)page, (unsigned long )p - page); } free_and_exit: { free_pages(page, 0U); } return (ret); } } static ssize_t mwifiex_getlog_read(struct file *file , char *ubuf , size_t count , loff_t *ppos ) { struct mwifiex_private *priv ; unsigned long page ; unsigned long tmp ; char *p ; ssize_t ret ; struct mwifiex_ds_get_stats stats ; int tmp___0 ; int tmp___1 ; { { priv = (struct mwifiex_private *)file->private_data; tmp = get_zeroed_page(208U); page = tmp; p = (char *)page; } if ((unsigned long )p == (unsigned long )((char *)0)) { return (-12L); } else { } { memset((void *)(& stats), 0, 64UL); tmp___0 = mwifiex_get_stats_info(priv, & stats); ret = (ssize_t )tmp___0; } if (ret != 0L) { goto free_and_exit; } else { } { tmp___1 = sprintf(p, "\nmcasttxframe %u\nfailed %u\nretry %u\nmultiretry %u\nframedup %u\nrtssuccess %u\nrtsfailure %u\nackfailure %u\nrxfrag %u\nmcastrxframe %u\nfcserror %u\ntxframe %u\nwepicverrcnt-1 %u\nwepicverrcnt-2 %u\nwepicverrcnt-3 %u\nwepicverrcnt-4 %u\n", stats.mcast_tx_frame, stats.failed, stats.retry, stats.multi_retry, stats.frame_dup, stats.rts_success, stats.rts_failure, stats.ack_failure, stats.rx_frag, stats.mcast_rx_frame, stats.fcs_error, stats.tx_frame, stats.wep_icv_error[0], stats.wep_icv_error[1], stats.wep_icv_error[2], stats.wep_icv_error[3]); p = p + (unsigned long )tmp___1; ret = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)page, (unsigned long )p - page); } free_and_exit: { free_pages(page, 0U); } return (ret); } } static struct mwifiex_debug_info info ; static ssize_t mwifiex_debug_read(struct file *file , char *ubuf , size_t count , loff_t *ppos ) { struct mwifiex_private *priv ; struct mwifiex_debug_data *d ; unsigned long page ; unsigned long tmp ; char *p ; ssize_t ret ; size_t size ; size_t addr ; long val ; int i ; int j ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; { { priv = (struct mwifiex_private *)file->private_data; d = (struct mwifiex_debug_data *)(& items); tmp = get_zeroed_page(208U); page = tmp; p = (char *)page; } if ((unsigned long )p == (unsigned long )((char *)0)) { return (-12L); } else { } { tmp___0 = mwifiex_get_debug_info(priv, & info); ret = (ssize_t )tmp___0; } if (ret != 0L) { goto free_and_exit; } else { } i = 0; goto ldv_54617; ldv_54616: { tmp___1 = sprintf(p, "%s=", (char *)(& (d + (unsigned long )i)->name)); p = p + (unsigned long )tmp___1; size = (size_t )((d + (unsigned long )i)->size / (u32 )(d + (unsigned long )i)->num); } if (i < num_of_items + -3) { addr = (d + (unsigned long )i)->addr + (unsigned long )(& info); } else { addr = (d + (unsigned long )i)->addr + (unsigned long )priv->adapter; } j = 0; goto ldv_54614; ldv_54613: ; { if (size == 1UL) { goto case_1; } else { } if (size == 2UL) { goto case_2; } else { } if (size == 4UL) { goto case_4; } else { } if (size == 8UL) { goto case_8; } else { } goto switch_default; case_1: /* CIL Label */ val = (long )*((u8 *)addr); goto ldv_54608; case_2: /* CIL Label */ val = (long )*((u16 *)addr); goto ldv_54608; case_4: /* CIL Label */ val = (long )*((u32 *)addr); goto ldv_54608; case_8: /* CIL Label */ val = (long )*((long long *)addr); goto ldv_54608; switch_default: /* CIL Label */ val = -1L; goto ldv_54608; switch_break: /* CIL Label */ ; } ldv_54608: { tmp___2 = sprintf(p, "%#lx ", val); p = p + (unsigned long )tmp___2; addr = addr + size; j = j + 1; } ldv_54614: ; if (j < (d + (unsigned long )i)->num) { goto ldv_54613; } else { } { tmp___3 = sprintf(p, "\n"); p = p + (unsigned long )tmp___3; i = i + 1; } ldv_54617: ; if (i < num_of_items) { goto ldv_54616; } else { } if (info.tx_tbl_num != 0U) { { tmp___4 = sprintf(p, "Tx BA stream table:\n"); p = p + (unsigned long )tmp___4; i = 0; } goto ldv_54620; ldv_54619: { tmp___5 = sprintf(p, "tid = %d, ra = %pM\n", (int )info.tx_tbl[i].tid, (u8 *)(& info.tx_tbl[i].ra)); p = p + (unsigned long )tmp___5; i = i + 1; } ldv_54620: ; if ((u32 )i < info.tx_tbl_num) { goto ldv_54619; } else { } } else { } if (info.rx_tbl_num != 0U) { { tmp___6 = sprintf(p, "Rx reorder table:\n"); p = p + (unsigned long )tmp___6; i = 0; } goto ldv_54626; ldv_54625: { tmp___7 = sprintf(p, "tid = %d, ta = %pM, start_win = %d, win_size = %d, buffer: ", (int )info.rx_tbl[i].tid, (u8 *)(& info.rx_tbl[i].ta), info.rx_tbl[i].start_win, info.rx_tbl[i].win_size); p = p + (unsigned long )tmp___7; j = 0; } goto ldv_54623; ldv_54622: { tmp___8 = sprintf(p, "%c ", info.rx_tbl[i].buffer[j] != 0U ? 49 : 48); p = p + (unsigned long )tmp___8; j = j + 1; } ldv_54623: ; if ((u32 )j < info.rx_tbl[i].win_size) { goto ldv_54622; } else { } { tmp___9 = sprintf(p, "\n"); p = p + (unsigned long )tmp___9; i = i + 1; } ldv_54626: ; if ((u32 )i < info.rx_tbl_num) { goto ldv_54625; } else { } } else { } { ret = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)page, (unsigned long )p - page); } free_and_exit: { free_pages(page, 0U); } return (ret); } } static u32 saved_reg_type ; static u32 saved_reg_offset ; static u32 saved_reg_value ; static ssize_t mwifiex_regrdwr_write(struct file *file , char const *ubuf , size_t count , loff_t *ppos ) { unsigned long addr ; unsigned long tmp ; char *buf ; size_t buf_size ; size_t _min1 ; unsigned long _min2 ; int ret ; u32 reg_type ; u32 reg_offset ; u32 reg_value ; unsigned long tmp___0 ; { { tmp = get_zeroed_page(208U); addr = tmp; buf = (char *)addr; _min1 = count; _min2 = 4095UL; buf_size = _min1 < _min2 ? _min1 : _min2; reg_type = 0U; reg_offset = 0U; reg_value = 4294967295U; } if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } { tmp___0 = copy_from_user((void *)buf, (void const *)ubuf, buf_size); } if (tmp___0 != 0UL) { ret = -14; goto done; } else { } { sscanf((char const *)buf, "%u %x %x", & reg_type, & reg_offset, & reg_value); } if (reg_type == 0U || reg_offset == 0U) { ret = -22; goto done; } else { saved_reg_type = reg_type; saved_reg_offset = reg_offset; saved_reg_value = reg_value; ret = (int )count; } done: { free_pages(addr, 0U); } return ((ssize_t )ret); } } static ssize_t mwifiex_regrdwr_read(struct file *file , char *ubuf , size_t count , loff_t *ppos ) { struct mwifiex_private *priv ; unsigned long addr ; unsigned long tmp ; char *buf ; int pos ; int ret ; u32 reg_value ; int tmp___0 ; int tmp___1 ; ssize_t tmp___2 ; int tmp___3 ; ssize_t tmp___4 ; { { priv = (struct mwifiex_private *)file->private_data; tmp = get_zeroed_page(208U); addr = tmp; buf = (char *)addr; pos = 0; ret = 0; } if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } if (saved_reg_type == 0U) { { tmp___0 = snprintf(buf, 4096UL, "0"); pos = pos + tmp___0; } goto done; } else { } if (saved_reg_value != 4294967295U) { { ret = mwifiex_reg_write(priv, saved_reg_type, saved_reg_offset, saved_reg_value); tmp___1 = snprintf(buf, 4096UL, "%u 0x%x 0x%x\n", saved_reg_type, saved_reg_offset, saved_reg_value); pos = pos + tmp___1; tmp___2 = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)buf, (size_t )pos); ret = (int )tmp___2; } goto done; } else { } { ret = mwifiex_reg_read(priv, saved_reg_type, saved_reg_offset, & reg_value); } if (ret != 0) { ret = -22; goto done; } else { } { tmp___3 = snprintf(buf, 4096UL, "%u 0x%x 0x%x\n", saved_reg_type, saved_reg_offset, reg_value); pos = pos + tmp___3; tmp___4 = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)buf, (size_t )pos); ret = (int )tmp___4; } done: { free_pages(addr, 0U); } return ((ssize_t )ret); } } static u32 saved_offset = 4294967295U; static u32 saved_bytes = 4294967295U; static ssize_t mwifiex_rdeeprom_write(struct file *file , char const *ubuf , size_t count , loff_t *ppos ) { unsigned long addr ; unsigned long tmp ; char *buf ; size_t buf_size ; size_t _min1 ; unsigned long _min2 ; int ret ; int offset ; int bytes ; unsigned long tmp___0 ; { { tmp = get_zeroed_page(208U); addr = tmp; buf = (char *)addr; _min1 = count; _min2 = 4095UL; buf_size = _min1 < _min2 ? _min1 : _min2; ret = 0; offset = -1; bytes = -1; } if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } { tmp___0 = copy_from_user((void *)buf, (void const *)ubuf, buf_size); } if (tmp___0 != 0UL) { ret = -14; goto done; } else { } { sscanf((char const *)buf, "%d %d", & offset, & bytes); } if (offset == -1 || bytes == -1) { ret = -22; goto done; } else { saved_offset = (u32 )offset; saved_bytes = (u32 )bytes; ret = (int )count; } done: { free_pages(addr, 0U); } return ((ssize_t )ret); } } static ssize_t mwifiex_rdeeprom_read(struct file *file , char *ubuf , size_t count , loff_t *ppos ) { struct mwifiex_private *priv ; unsigned long addr ; unsigned long tmp ; char *buf ; int pos ; int ret ; int i ; u8 value[256U] ; int tmp___0 ; int tmp___1 ; size_t tmp___2 ; int tmp___3 ; ssize_t tmp___4 ; { { priv = (struct mwifiex_private *)file->private_data; tmp = get_zeroed_page(208U); addr = tmp; buf = (char *)addr; pos = 0; ret = 0; } if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } if (saved_offset == 4294967295U) { { tmp___0 = snprintf(buf, 4096UL, "0"); pos = pos + tmp___0; } goto done; } else { } { ret = mwifiex_eeprom_read(priv, (int )((unsigned short )saved_offset), (int )((unsigned short )saved_bytes), (u8 *)(& value)); } if (ret != 0) { ret = -22; goto done; } else { } { tmp___1 = snprintf(buf, 4096UL, "%d %d ", saved_offset, saved_bytes); pos = pos + tmp___1; i = 0; } goto ldv_54694; ldv_54693: { tmp___2 = strlen((char const *)buf); tmp___3 = snprintf(buf + tmp___2, 4096UL, "%d ", (int )value[i]); pos = pos + tmp___3; i = i + 1; } ldv_54694: ; if ((u32 )i < saved_bytes) { goto ldv_54693; } else { } { tmp___4 = simple_read_from_buffer((void *)ubuf, count, ppos, (void const *)buf, (size_t )pos); ret = (int )tmp___4; } done: { free_pages(addr, 0U); } return ((ssize_t )ret); } } static struct file_operations const mwifiex_dfs_info_fops = {0, 0, & mwifiex_info_read, 0, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static struct file_operations const mwifiex_dfs_debug_fops = {0, 0, & mwifiex_debug_read, 0, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static struct file_operations const mwifiex_dfs_getlog_fops = {0, 0, & mwifiex_getlog_read, 0, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static struct file_operations const mwifiex_dfs_regrdwr_fops = {0, 0, & mwifiex_regrdwr_read, & mwifiex_regrdwr_write, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static struct file_operations const mwifiex_dfs_rdeeprom_fops = {0, 0, & mwifiex_rdeeprom_read, & mwifiex_rdeeprom_write, 0, 0, 0, 0, 0, 0, 0, & simple_open, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void mwifiex_dev_debugfs_init(struct mwifiex_private *priv ) { struct dentry *tmp ; struct dentry *tmp___0 ; struct dentry *tmp___1 ; struct dentry *tmp___2 ; struct dentry *tmp___3 ; { if ((unsigned long )mwifiex_dfs_dir == (unsigned long )((struct dentry *)0) || (unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { return; } else { } { priv->dfs_dev_dir = debugfs_create_dir((char const *)(& (priv->netdev)->name), mwifiex_dfs_dir); } if ((unsigned long )priv->dfs_dev_dir == (unsigned long )((struct dentry *)0)) { return; } else { } { tmp = debugfs_create_file("info", 420, priv->dfs_dev_dir, (void *)priv, & mwifiex_dfs_info_fops); } if ((unsigned long )tmp == (unsigned long )((struct dentry *)0)) { return; } else { } { tmp___0 = debugfs_create_file("debug", 420, priv->dfs_dev_dir, (void *)priv, & mwifiex_dfs_debug_fops); } if ((unsigned long )tmp___0 == (unsigned long )((struct dentry *)0)) { return; } else { } { tmp___1 = debugfs_create_file("getlog", 420, priv->dfs_dev_dir, (void *)priv, & mwifiex_dfs_getlog_fops); } if ((unsigned long )tmp___1 == (unsigned long )((struct dentry *)0)) { return; } else { } { tmp___2 = debugfs_create_file("regrdwr", 420, priv->dfs_dev_dir, (void *)priv, & mwifiex_dfs_regrdwr_fops); } if ((unsigned long )tmp___2 == (unsigned long )((struct dentry *)0)) { return; } else { } { tmp___3 = debugfs_create_file("rdeeprom", 420, priv->dfs_dev_dir, (void *)priv, & mwifiex_dfs_rdeeprom_fops); } if ((unsigned long )tmp___3 == (unsigned long )((struct dentry *)0)) { return; } else { } return; } } void mwifiex_dev_debugfs_remove(struct mwifiex_private *priv ) { { if ((unsigned long )priv == (unsigned long )((struct mwifiex_private *)0)) { return; } else { } { debugfs_remove_recursive(priv->dfs_dev_dir); } return; } } void mwifiex_debugfs_init(void) { { if ((unsigned long )mwifiex_dfs_dir == (unsigned long )((struct dentry *)0)) { { mwifiex_dfs_dir = debugfs_create_dir("mwifiex", (struct dentry *)0); } } else { } return; } } void mwifiex_debugfs_remove(void) { { if ((unsigned long )mwifiex_dfs_dir != (unsigned long )((struct dentry *)0)) { { debugfs_remove(mwifiex_dfs_dir); } } else { } return; } } void ldv_file_operations_instance_callback_0_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_callback_1_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_callback_2_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_callback_3_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_callback_4_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; int ldv_file_operations_instance_probe_0_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) ; int ldv_file_operations_instance_probe_1_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) ; int ldv_file_operations_instance_probe_2_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) ; int ldv_file_operations_instance_probe_3_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) ; int ldv_file_operations_instance_probe_4_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) ; void ldv_file_operations_instance_write_3_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; void ldv_file_operations_instance_write_4_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) ; struct ldv_thread ldv_thread_0 ; struct ldv_thread ldv_thread_1 ; struct ldv_thread ldv_thread_2 ; struct ldv_thread ldv_thread_3 ; struct ldv_thread ldv_thread_4 ; void ldv_file_operations_file_operations_instance_0(void *arg0 ) { long (*ldv_0_callback_read)(struct file * , char * , unsigned long , long long * ) ; struct file_operations *ldv_0_container_file_operations ; char *ldv_0_ldv_param_4_1_default ; long long *ldv_0_ldv_param_4_3_default ; char *ldv_0_ldv_param_5_1_default ; long long *ldv_0_ldv_param_5_3_default ; struct file *ldv_0_resource_file ; struct inode *ldv_0_resource_inode ; int ldv_0_ret_default ; unsigned long ldv_0_size_cnt_write_size ; void *tmp ; void *tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; { { ldv_0_ret_default = 1; tmp = ldv_xmalloc(520UL); ldv_0_resource_file = (struct file *)tmp; tmp___0 = ldv_xmalloc(1032UL); ldv_0_resource_inode = (struct inode *)tmp___0; tmp___1 = ldv_undef_int(); ldv_0_size_cnt_write_size = (unsigned long )tmp___1; } goto ldv_main_0; return; ldv_main_0: { tmp___3 = ldv_undef_int(); } if (tmp___3 != 0) { { ldv_0_ret_default = ldv_file_operations_instance_probe_0_12(ldv_0_container_file_operations->open, ldv_0_resource_inode, ldv_0_resource_file); ldv_0_ret_default = ldv_filter_err_code(ldv_0_ret_default); tmp___2 = ldv_undef_int(); } if (tmp___2 != 0) { { ldv_assume(ldv_0_ret_default == 0); } goto ldv_call_0; } else { { ldv_assume(ldv_0_ret_default != 0); } goto ldv_main_0; } } else { { ldv_free((void *)ldv_0_resource_file); ldv_free((void *)ldv_0_resource_inode); } return; } return; ldv_call_0: { tmp___4 = ldv_undef_int(); } { if (tmp___4 == 1) { goto case_1; } else { } if (tmp___4 == 2) { goto case_2; } else { } if (tmp___4 == 3) { goto case_3; } else { } goto switch_default; case_1: /* CIL Label */ { tmp___5 = ldv_xmalloc(1UL); ldv_0_ldv_param_5_1_default = (char *)tmp___5; tmp___6 = ldv_xmalloc(8UL); ldv_0_ldv_param_5_3_default = (long long *)tmp___6; ldv_file_operations_instance_callback_0_5(ldv_0_callback_read, ldv_0_resource_file, ldv_0_ldv_param_5_1_default, ldv_0_size_cnt_write_size, ldv_0_ldv_param_5_3_default); ldv_free((void *)ldv_0_ldv_param_5_1_default); ldv_free((void *)ldv_0_ldv_param_5_3_default); } goto ldv_call_0; case_2: /* CIL Label */ { tmp___7 = ldv_xmalloc(1UL); ldv_0_ldv_param_4_1_default = (char *)tmp___7; tmp___8 = ldv_xmalloc(8UL); ldv_0_ldv_param_4_3_default = (long long *)tmp___8; ldv_assume(ldv_0_size_cnt_write_size <= 2147479552UL); } if ((unsigned long )ldv_0_container_file_operations->write != (unsigned long )((ssize_t (*)(struct file * , char const * , size_t , loff_t * ))0)) { { ldv_file_operations_instance_write_0_4((long (*)(struct file * , char * , unsigned long , long long * ))ldv_0_container_file_operations->write, ldv_0_resource_file, ldv_0_ldv_param_4_1_default, ldv_0_size_cnt_write_size, ldv_0_ldv_param_4_3_default); } } else { } { ldv_free((void *)ldv_0_ldv_param_4_1_default); ldv_free((void *)ldv_0_ldv_param_4_3_default); } goto ldv_call_0; goto ldv_call_0; case_3: /* CIL Label */ ; goto ldv_main_0; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_file_operations_file_operations_instance_1(void *arg0 ) { long (*ldv_1_callback_read)(struct file * , char * , unsigned long , long long * ) ; struct file_operations *ldv_1_container_file_operations ; char *ldv_1_ldv_param_4_1_default ; long long *ldv_1_ldv_param_4_3_default ; char *ldv_1_ldv_param_5_1_default ; long long *ldv_1_ldv_param_5_3_default ; struct file *ldv_1_resource_file ; struct inode *ldv_1_resource_inode ; int ldv_1_ret_default ; unsigned long ldv_1_size_cnt_write_size ; void *tmp ; void *tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; { { ldv_1_ret_default = 1; tmp = ldv_xmalloc(520UL); ldv_1_resource_file = (struct file *)tmp; tmp___0 = ldv_xmalloc(1032UL); ldv_1_resource_inode = (struct inode *)tmp___0; tmp___1 = ldv_undef_int(); ldv_1_size_cnt_write_size = (unsigned long )tmp___1; } goto ldv_main_1; return; ldv_main_1: { tmp___3 = ldv_undef_int(); } if (tmp___3 != 0) { { ldv_1_ret_default = ldv_file_operations_instance_probe_1_12(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file); ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default); tmp___2 = ldv_undef_int(); } if (tmp___2 != 0) { { ldv_assume(ldv_1_ret_default == 0); } goto ldv_call_1; } else { { ldv_assume(ldv_1_ret_default != 0); } goto ldv_main_1; } } else { { ldv_free((void *)ldv_1_resource_file); ldv_free((void *)ldv_1_resource_inode); } return; } return; ldv_call_1: { tmp___4 = ldv_undef_int(); } { if (tmp___4 == 1) { goto case_1; } else { } if (tmp___4 == 2) { goto case_2; } else { } if (tmp___4 == 3) { goto case_3; } else { } goto switch_default; case_1: /* CIL Label */ { tmp___5 = ldv_xmalloc(1UL); ldv_1_ldv_param_5_1_default = (char *)tmp___5; tmp___6 = ldv_xmalloc(8UL); ldv_1_ldv_param_5_3_default = (long long *)tmp___6; ldv_file_operations_instance_callback_1_5(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_5_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_5_3_default); ldv_free((void *)ldv_1_ldv_param_5_1_default); ldv_free((void *)ldv_1_ldv_param_5_3_default); } goto ldv_call_1; case_2: /* CIL Label */ { tmp___7 = ldv_xmalloc(1UL); ldv_1_ldv_param_4_1_default = (char *)tmp___7; tmp___8 = ldv_xmalloc(8UL); ldv_1_ldv_param_4_3_default = (long long *)tmp___8; ldv_assume(ldv_1_size_cnt_write_size <= 2147479552UL); } if ((unsigned long )ldv_1_container_file_operations->write != (unsigned long )((ssize_t (*)(struct file * , char const * , size_t , loff_t * ))0)) { { ldv_file_operations_instance_write_1_4((long (*)(struct file * , char * , unsigned long , long long * ))ldv_1_container_file_operations->write, ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default); } } else { } { ldv_free((void *)ldv_1_ldv_param_4_1_default); ldv_free((void *)ldv_1_ldv_param_4_3_default); } goto ldv_call_1; goto ldv_call_1; case_3: /* CIL Label */ ; goto ldv_main_1; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_file_operations_file_operations_instance_2(void *arg0 ) { long (*ldv_2_callback_read)(struct file * , char * , unsigned long , long long * ) ; struct file_operations *ldv_2_container_file_operations ; char *ldv_2_ldv_param_4_1_default ; long long *ldv_2_ldv_param_4_3_default ; char *ldv_2_ldv_param_5_1_default ; long long *ldv_2_ldv_param_5_3_default ; struct file *ldv_2_resource_file ; struct inode *ldv_2_resource_inode ; int ldv_2_ret_default ; unsigned long ldv_2_size_cnt_write_size ; void *tmp ; void *tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; { { ldv_2_ret_default = 1; tmp = ldv_xmalloc(520UL); ldv_2_resource_file = (struct file *)tmp; tmp___0 = ldv_xmalloc(1032UL); ldv_2_resource_inode = (struct inode *)tmp___0; tmp___1 = ldv_undef_int(); ldv_2_size_cnt_write_size = (unsigned long )tmp___1; } goto ldv_main_2; return; ldv_main_2: { tmp___3 = ldv_undef_int(); } if (tmp___3 != 0) { { ldv_2_ret_default = ldv_file_operations_instance_probe_2_12(ldv_2_container_file_operations->open, ldv_2_resource_inode, ldv_2_resource_file); ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default); tmp___2 = ldv_undef_int(); } if (tmp___2 != 0) { { ldv_assume(ldv_2_ret_default == 0); } goto ldv_call_2; } else { { ldv_assume(ldv_2_ret_default != 0); } goto ldv_main_2; } } else { { ldv_free((void *)ldv_2_resource_file); ldv_free((void *)ldv_2_resource_inode); } return; } return; ldv_call_2: { tmp___4 = ldv_undef_int(); } { if (tmp___4 == 1) { goto case_1; } else { } if (tmp___4 == 2) { goto case_2; } else { } if (tmp___4 == 3) { goto case_3; } else { } goto switch_default; case_1: /* CIL Label */ { tmp___5 = ldv_xmalloc(1UL); ldv_2_ldv_param_5_1_default = (char *)tmp___5; tmp___6 = ldv_xmalloc(8UL); ldv_2_ldv_param_5_3_default = (long long *)tmp___6; ldv_file_operations_instance_callback_2_5(ldv_2_callback_read, ldv_2_resource_file, ldv_2_ldv_param_5_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_5_3_default); ldv_free((void *)ldv_2_ldv_param_5_1_default); ldv_free((void *)ldv_2_ldv_param_5_3_default); } goto ldv_call_2; case_2: /* CIL Label */ { tmp___7 = ldv_xmalloc(1UL); ldv_2_ldv_param_4_1_default = (char *)tmp___7; tmp___8 = ldv_xmalloc(8UL); ldv_2_ldv_param_4_3_default = (long long *)tmp___8; ldv_assume(ldv_2_size_cnt_write_size <= 2147479552UL); } if ((unsigned long )ldv_2_container_file_operations->write != (unsigned long )((ssize_t (*)(struct file * , char const * , size_t , loff_t * ))0)) { { ldv_file_operations_instance_write_2_4((long (*)(struct file * , char * , unsigned long , long long * ))ldv_2_container_file_operations->write, ldv_2_resource_file, ldv_2_ldv_param_4_1_default, ldv_2_size_cnt_write_size, ldv_2_ldv_param_4_3_default); } } else { } { ldv_free((void *)ldv_2_ldv_param_4_1_default); ldv_free((void *)ldv_2_ldv_param_4_3_default); } goto ldv_call_2; goto ldv_call_2; case_3: /* CIL Label */ ; goto ldv_main_2; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_file_operations_file_operations_instance_3(void *arg0 ) { long (*ldv_3_callback_read)(struct file * , char * , unsigned long , long long * ) ; struct file_operations *ldv_3_container_file_operations ; char *ldv_3_ldv_param_4_1_default ; long long *ldv_3_ldv_param_4_3_default ; char *ldv_3_ldv_param_5_1_default ; long long *ldv_3_ldv_param_5_3_default ; struct file *ldv_3_resource_file ; struct inode *ldv_3_resource_inode ; int ldv_3_ret_default ; unsigned long ldv_3_size_cnt_write_size ; void *tmp ; void *tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; { { ldv_3_ret_default = 1; tmp = ldv_xmalloc(520UL); ldv_3_resource_file = (struct file *)tmp; tmp___0 = ldv_xmalloc(1032UL); ldv_3_resource_inode = (struct inode *)tmp___0; tmp___1 = ldv_undef_int(); ldv_3_size_cnt_write_size = (unsigned long )tmp___1; } goto ldv_main_3; return; ldv_main_3: { tmp___3 = ldv_undef_int(); } if (tmp___3 != 0) { { ldv_3_ret_default = ldv_file_operations_instance_probe_3_12(ldv_3_container_file_operations->open, ldv_3_resource_inode, ldv_3_resource_file); ldv_3_ret_default = ldv_filter_err_code(ldv_3_ret_default); tmp___2 = ldv_undef_int(); } if (tmp___2 != 0) { { ldv_assume(ldv_3_ret_default == 0); } goto ldv_call_3; } else { { ldv_assume(ldv_3_ret_default != 0); } goto ldv_main_3; } } else { { ldv_free((void *)ldv_3_resource_file); ldv_free((void *)ldv_3_resource_inode); } return; } return; ldv_call_3: { tmp___4 = ldv_undef_int(); } { if (tmp___4 == 1) { goto case_1; } else { } if (tmp___4 == 2) { goto case_2; } else { } if (tmp___4 == 3) { goto case_3; } else { } goto switch_default; case_1: /* CIL Label */ { tmp___5 = ldv_xmalloc(1UL); ldv_3_ldv_param_5_1_default = (char *)tmp___5; tmp___6 = ldv_xmalloc(8UL); ldv_3_ldv_param_5_3_default = (long long *)tmp___6; ldv_file_operations_instance_callback_3_5(ldv_3_callback_read, ldv_3_resource_file, ldv_3_ldv_param_5_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_5_3_default); ldv_free((void *)ldv_3_ldv_param_5_1_default); ldv_free((void *)ldv_3_ldv_param_5_3_default); } goto ldv_call_3; case_2: /* CIL Label */ { tmp___7 = ldv_xmalloc(1UL); ldv_3_ldv_param_4_1_default = (char *)tmp___7; tmp___8 = ldv_xmalloc(8UL); ldv_3_ldv_param_4_3_default = (long long *)tmp___8; ldv_assume(ldv_3_size_cnt_write_size <= 2147479552UL); ldv_file_operations_instance_write_3_4((long (*)(struct file * , char * , unsigned long , long long * ))ldv_3_container_file_operations->write, ldv_3_resource_file, ldv_3_ldv_param_4_1_default, ldv_3_size_cnt_write_size, ldv_3_ldv_param_4_3_default); ldv_free((void *)ldv_3_ldv_param_4_1_default); ldv_free((void *)ldv_3_ldv_param_4_3_default); } goto ldv_call_3; goto ldv_call_3; case_3: /* CIL Label */ ; goto ldv_main_3; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_file_operations_file_operations_instance_4(void *arg0 ) { long (*ldv_4_callback_read)(struct file * , char * , unsigned long , long long * ) ; struct file_operations *ldv_4_container_file_operations ; char *ldv_4_ldv_param_4_1_default ; long long *ldv_4_ldv_param_4_3_default ; char *ldv_4_ldv_param_5_1_default ; long long *ldv_4_ldv_param_5_3_default ; struct file *ldv_4_resource_file ; struct inode *ldv_4_resource_inode ; int ldv_4_ret_default ; unsigned long ldv_4_size_cnt_write_size ; void *tmp ; void *tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; void *tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; { { ldv_4_ret_default = 1; tmp = ldv_xmalloc(520UL); ldv_4_resource_file = (struct file *)tmp; tmp___0 = ldv_xmalloc(1032UL); ldv_4_resource_inode = (struct inode *)tmp___0; tmp___1 = ldv_undef_int(); ldv_4_size_cnt_write_size = (unsigned long )tmp___1; } goto ldv_main_4; return; ldv_main_4: { tmp___3 = ldv_undef_int(); } if (tmp___3 != 0) { { ldv_4_ret_default = ldv_file_operations_instance_probe_4_12(ldv_4_container_file_operations->open, ldv_4_resource_inode, ldv_4_resource_file); ldv_4_ret_default = ldv_filter_err_code(ldv_4_ret_default); tmp___2 = ldv_undef_int(); } if (tmp___2 != 0) { { ldv_assume(ldv_4_ret_default == 0); } goto ldv_call_4; } else { { ldv_assume(ldv_4_ret_default != 0); } goto ldv_main_4; } } else { { ldv_free((void *)ldv_4_resource_file); ldv_free((void *)ldv_4_resource_inode); } return; } return; ldv_call_4: { tmp___4 = ldv_undef_int(); } { if (tmp___4 == 1) { goto case_1; } else { } if (tmp___4 == 2) { goto case_2; } else { } if (tmp___4 == 3) { goto case_3; } else { } goto switch_default; case_1: /* CIL Label */ { tmp___5 = ldv_xmalloc(1UL); ldv_4_ldv_param_5_1_default = (char *)tmp___5; tmp___6 = ldv_xmalloc(8UL); ldv_4_ldv_param_5_3_default = (long long *)tmp___6; ldv_file_operations_instance_callback_4_5(ldv_4_callback_read, ldv_4_resource_file, ldv_4_ldv_param_5_1_default, ldv_4_size_cnt_write_size, ldv_4_ldv_param_5_3_default); ldv_free((void *)ldv_4_ldv_param_5_1_default); ldv_free((void *)ldv_4_ldv_param_5_3_default); } goto ldv_call_4; case_2: /* CIL Label */ { tmp___7 = ldv_xmalloc(1UL); ldv_4_ldv_param_4_1_default = (char *)tmp___7; tmp___8 = ldv_xmalloc(8UL); ldv_4_ldv_param_4_3_default = (long long *)tmp___8; ldv_assume(ldv_4_size_cnt_write_size <= 2147479552UL); ldv_file_operations_instance_write_4_4((long (*)(struct file * , char * , unsigned long , long long * ))ldv_4_container_file_operations->write, ldv_4_resource_file, ldv_4_ldv_param_4_1_default, ldv_4_size_cnt_write_size, ldv_4_ldv_param_4_3_default); ldv_free((void *)ldv_4_ldv_param_4_1_default); ldv_free((void *)ldv_4_ldv_param_4_3_default); } goto ldv_call_4; goto ldv_call_4; case_3: /* CIL Label */ ; goto ldv_main_4; switch_default: /* CIL Label */ { ldv_stop(); } switch_break: /* CIL Label */ ; } return; } } void ldv_file_operations_instance_callback_0_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_debug_read(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_callback_1_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_getlog_read(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_callback_2_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_info_read(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_callback_3_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_rdeeprom_read(arg1, arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_callback_4_5(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_regrdwr_read(arg1, arg2, arg3, arg4); } return; } } int ldv_file_operations_instance_probe_0_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) { int tmp ; { { tmp = simple_open(arg1, arg2); } return (tmp); } } int ldv_file_operations_instance_probe_1_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) { int tmp ; { { tmp = simple_open(arg1, arg2); } return (tmp); } } int ldv_file_operations_instance_probe_2_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) { int tmp ; { { tmp = simple_open(arg1, arg2); } return (tmp); } } int ldv_file_operations_instance_probe_3_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) { int tmp ; { { tmp = simple_open(arg1, arg2); } return (tmp); } } int ldv_file_operations_instance_probe_4_12(int (*arg0)(struct inode * , struct file * ) , struct inode *arg1 , struct file *arg2 ) { int tmp ; { { tmp = simple_open(arg1, arg2); } return (tmp); } } void ldv_file_operations_instance_write_3_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_rdeeprom_write(arg1, (char const *)arg2, arg3, arg4); } return; } } void ldv_file_operations_instance_write_4_4(long (*arg0)(struct file * , char * , unsigned long , long long * ) , struct file *arg1 , char *arg2 , unsigned long arg3 , long long *arg4 ) { { { mwifiex_regrdwr_write(arg1, (char const *)arg2, arg3, arg4); } return; } } void ldv_atomic_add(int i , atomic_t *v ) { { v->counter = v->counter + i; return; } } void ldv_atomic_sub(int i , atomic_t *v ) { { v->counter = v->counter - i; return; } } int ldv_atomic_sub_and_test(int i , atomic_t *v ) { { v->counter = v->counter - i; if (v->counter != 0) { return (0); } else { } return (1); } } void ldv_atomic_inc(atomic_t *v ) { { v->counter = v->counter + 1; return; } } void ldv_atomic_dec(atomic_t *v ) { { v->counter = v->counter - 1; return; } } int ldv_atomic_dec_and_test(atomic_t *v ) { { v->counter = v->counter - 1; if (v->counter != 0) { return (0); } else { } return (1); } } int ldv_atomic_inc_and_test(atomic_t *v ) { { v->counter = v->counter + 1; if (v->counter != 0) { return (0); } else { } return (1); } } int ldv_atomic_add_return(int i , atomic_t *v ) { { v->counter = v->counter + i; return (v->counter); } } int ldv_atomic_add_negative(int i , atomic_t *v ) { { v->counter = v->counter + i; return (v->counter < 0); } } int ldv_atomic_inc_short(short *v ) { { *v = (short )((unsigned int )((unsigned short )*v) + 1U); return ((int )*v); } } void *ldv_xzalloc(size_t size ) ; void *ldv_dev_get_drvdata(struct device const *dev ) { { if ((unsigned long )dev != (unsigned long )((struct device const *)0) && (unsigned long )dev->p != (unsigned long )((struct device_private */* const */)0)) { return ((dev->p)->driver_data); } else { } return ((void *)0); } } int ldv_dev_set_drvdata(struct device *dev , void *data ) { void *tmp ; { { tmp = ldv_xzalloc(8UL); dev->p = (struct device_private *)tmp; (dev->p)->driver_data = data; } return (0); } } void *ldv_zalloc(size_t size ) ; struct spi_master *ldv_spi_alloc_master(struct device *host , unsigned int size ) { struct spi_master *master ; void *tmp ; { { tmp = ldv_zalloc((unsigned long )size + 2200UL); master = (struct spi_master *)tmp; } if ((unsigned long )master == (unsigned long )((struct spi_master *)0)) { return ((struct spi_master *)0); } else { } { ldv_dev_set_drvdata(& master->dev, (void *)master + 1U); } return (master); } } long ldv_is_err(void const *ptr ) { { return ((unsigned long )ptr > 4294967295UL); } } void *ldv_err_ptr(long error ) { { return ((void *)(4294967295L - error)); } } long ldv_ptr_err(void const *ptr ) { { return ((long )(4294967295UL - (unsigned long )ptr)); } } long ldv_is_err_or_null(void const *ptr ) { long tmp ; int tmp___0 ; { if ((unsigned long )ptr == (unsigned long )((void const *)0)) { tmp___0 = 1; } else { { tmp = ldv_is_err(ptr); } if (tmp != 0L) { tmp___0 = 1; } else { tmp___0 = 0; } } return ((long )tmp___0); } } int ldv_post_probe(int probe_ret_val ) ; static int ldv_filter_positive_int(int val ) { { { ldv_assume(val <= 0); } return (val); } } int ldv_post_init(int init_ret_val ) { int tmp ; { { tmp = ldv_filter_positive_int(init_ret_val); } return (tmp); } } int ldv_post_probe(int probe_ret_val ) { int tmp ; { { tmp = ldv_filter_positive_int(probe_ret_val); } return (tmp); } } int ldv_filter_err_code(int ret_val ) { int tmp ; { { tmp = ldv_filter_positive_int(ret_val); } return (tmp); } } extern void ldv_check_alloc_flags(gfp_t ) ; extern void ldv_after_alloc(void * ) ; void *ldv_kzalloc(size_t size , gfp_t flags ) { void *res ; { { ldv_check_alloc_flags(flags); res = ldv_zalloc(size); ldv_after_alloc(res); } return (res); } } void ldv_assert_linux_usb_dev__less_initial_decrement(int expr ) ; void ldv_assert_linux_usb_dev__more_initial_at_exit(int expr ) ; void ldv_assert_linux_usb_dev__probe_failed(int expr ) ; void ldv_assert_linux_usb_dev__unincremented_counter_decrement(int expr ) ; ldv_map LDV_USB_DEV_REF_COUNTS ; struct usb_device *ldv_usb_get_dev(struct usb_device *dev ) { { if ((unsigned long )dev != (unsigned long )((struct usb_device *)0)) { LDV_USB_DEV_REF_COUNTS = LDV_USB_DEV_REF_COUNTS != 0 ? LDV_USB_DEV_REF_COUNTS + 1 : 1; } else { } return (dev); } } void ldv_usb_put_dev(struct usb_device *dev ) { { if ((unsigned long )dev != (unsigned long )((struct usb_device *)0)) { { ldv_assert_linux_usb_dev__unincremented_counter_decrement(LDV_USB_DEV_REF_COUNTS != 0); ldv_assert_linux_usb_dev__less_initial_decrement(LDV_USB_DEV_REF_COUNTS > 0); } if (LDV_USB_DEV_REF_COUNTS > 1) { LDV_USB_DEV_REF_COUNTS = LDV_USB_DEV_REF_COUNTS + -1; } else { LDV_USB_DEV_REF_COUNTS = 0; } } else { } return; } } void ldv_check_return_value_probe(int retval ) { { if (retval != 0) { { ldv_assert_linux_usb_dev__probe_failed(LDV_USB_DEV_REF_COUNTS == 0); } } else { } return; } } void ldv_initialize(void) { { LDV_USB_DEV_REF_COUNTS = 0; return; } } void ldv_check_final_state(void) { { { ldv_assert_linux_usb_dev__more_initial_at_exit(LDV_USB_DEV_REF_COUNTS == 0); } return; } } extern void ldv_assert(char const * , int ) ; void ldv__builtin_trap(void) ; void ldv_assume(int expression ) { { if (expression == 0) { ldv_assume_label: ; goto ldv_assume_label; } else { } return; } } void ldv_stop(void) { { ldv_stop_label: ; goto ldv_stop_label; } } long ldv__builtin_expect(long exp , long c ) { { return (exp); } } void ldv__builtin_trap(void) { { { ldv_assert("", 0); } return; } } void *ldv_malloc(size_t size ) ; void *ldv_calloc(size_t nmemb , size_t size ) ; extern void *external_allocated_data(void) ; void *ldv_malloc_unknown_size(void) ; void *ldv_calloc_unknown_size(void) ; void *ldv_zalloc_unknown_size(void) ; void *ldv_xmalloc_unknown_size(size_t size ) ; extern void *malloc(size_t ) ; extern void *calloc(size_t , size_t ) ; extern void free(void * ) ; void *ldv_malloc(size_t size ) { void *res ; void *tmp ; long tmp___0 ; int tmp___1 ; { { tmp___1 = ldv_undef_int(); } if (tmp___1 != 0) { { tmp = malloc(size); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } else { return ((void *)0); } } } void *ldv_calloc(size_t nmemb , size_t size ) { void *res ; void *tmp ; long tmp___0 ; int tmp___1 ; { { tmp___1 = ldv_undef_int(); } if (tmp___1 != 0) { { tmp = calloc(nmemb, size); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } else { return ((void *)0); } } } void *ldv_zalloc(size_t size ) { void *tmp ; { { tmp = ldv_calloc(1UL, size); } return (tmp); } } void ldv_free(void *s ) { { { free(s); } return; } } void *ldv_xmalloc(size_t size ) { void *res ; void *tmp ; long tmp___0 ; { { tmp = malloc(size); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } } void *ldv_xzalloc(size_t size ) { void *res ; void *tmp ; long tmp___0 ; { { tmp = calloc(1UL, size); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } } void *ldv_malloc_unknown_size(void) { void *res ; void *tmp ; long tmp___0 ; int tmp___1 ; { { tmp___1 = ldv_undef_int(); } if (tmp___1 != 0) { { tmp = external_allocated_data(); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } else { return ((void *)0); } } } void *ldv_calloc_unknown_size(void) { void *res ; void *tmp ; long tmp___0 ; int tmp___1 ; { { tmp___1 = ldv_undef_int(); } if (tmp___1 != 0) { { tmp = external_allocated_data(); res = tmp; memset(res, 0, 8UL); ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } else { return ((void *)0); } } } void *ldv_zalloc_unknown_size(void) { void *tmp ; { { tmp = ldv_calloc_unknown_size(); } return (tmp); } } void *ldv_xmalloc_unknown_size(size_t size ) { void *res ; void *tmp ; long tmp___0 ; { { tmp = external_allocated_data(); res = tmp; ldv_assume((unsigned long )res != (unsigned long )((void *)0)); tmp___0 = ldv_is_err((void const *)res); ldv_assume(tmp___0 == 0L); } return (res); } } void *ldv_undef_ptr(void) ; unsigned long ldv_undef_ulong(void) ; int ldv_undef_int_negative(void) ; int ldv_undef_int_nonpositive(void) ; extern int __VERIFIER_nondet_int(void) ; extern unsigned long __VERIFIER_nondet_ulong(void) ; extern void *__VERIFIER_nondet_pointer(void) ; int ldv_undef_int(void) { int tmp ; { { tmp = __VERIFIER_nondet_int(); } return (tmp); } } void *ldv_undef_ptr(void) { void *tmp ; { { tmp = __VERIFIER_nondet_pointer(); } return (tmp); } } unsigned long ldv_undef_ulong(void) { unsigned long tmp ; { { tmp = __VERIFIER_nondet_ulong(); } return (tmp); } } int ldv_undef_int_negative(void) { int ret ; int tmp ; { { tmp = ldv_undef_int(); ret = tmp; ldv_assume(ret < 0); } return (ret); } } int ldv_undef_int_nonpositive(void) { int ret ; int tmp ; { { tmp = ldv_undef_int(); ret = tmp; ldv_assume(ret <= 0); } return (ret); } } int ldv_thread_create(struct ldv_thread *ldv_thread , void (*function)(void * ) , void *data ) ; int ldv_thread_create_N(struct ldv_thread_set *ldv_thread_set , void (*function)(void * ) , void *data ) ; int ldv_thread_join(struct ldv_thread *ldv_thread , void (*function)(void * ) ) ; int ldv_thread_join_N(struct ldv_thread_set *ldv_thread_set , void (*function)(void * ) ) ; int ldv_thread_create(struct ldv_thread *ldv_thread , void (*function)(void * ) , void *data ) { { if ((unsigned long )function != (unsigned long )((void (*)(void * ))0)) { { (*function)(data); } } else { } return (0); } } int ldv_thread_create_N(struct ldv_thread_set *ldv_thread_set , void (*function)(void * ) , void *data ) { int i ; { if ((unsigned long )function != (unsigned long )((void (*)(void * ))0)) { i = 0; goto ldv_1179; ldv_1178: { (*function)(data); i = i + 1; } ldv_1179: ; if (i < ldv_thread_set->number) { goto ldv_1178; } else { } } else { } return (0); } } int ldv_thread_join(struct ldv_thread *ldv_thread , void (*function)(void * ) ) { { return (0); } } int ldv_thread_join_N(struct ldv_thread_set *ldv_thread_set , void (*function)(void * ) ) { { return (0); } } extern void __VERIFIER_error(void) ; void ldv_assert_linux_usb_dev__less_initial_decrement(int expr ) { { if (! expr) { { __VERIFIER_error(); } } else { } return; } } void ldv_assert_linux_usb_dev__more_initial_at_exit(int expr ) { { if (! expr) { { __VERIFIER_error(); } } else { } return; } } void ldv_assert_linux_usb_dev__probe_failed(int expr ) { { if (! expr) { { __VERIFIER_error(); } } else { } return; } } void ldv_assert_linux_usb_dev__unincremented_counter_decrement(int expr ) { { if (! expr) { { __VERIFIER_error(); } } else { } return; } }