--- zzzz-none-000/linux-4.1.52/net/socket.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/socket.c 2022-03-02 11:37:14.000000000 +0000 @@ -892,6 +892,9 @@ void __user *argp = (void __user *)arg; int pid, err; struct net *net; +#ifdef CONFIG_AVM_SK_TC_INDEX + unsigned long tc_index; +#endif sock = file->private_data; sk = sock->sk; @@ -953,6 +956,21 @@ err = dlci_ioctl_hook(cmd, argp); mutex_unlock(&dlci_ioctl_mutex); break; + +#ifdef CONFIG_AVM_SK_TC_INDEX + case SIOCSET_TC_INDEX: + err = -EFAULT; + if (get_user(tc_index, (unsigned long __user *)argp)) + break; + sock->sk->sk_tc_index = tc_index; + err = 0; + break; + + case SIOCGET_TC_INDEX: + err = put_user(sock->sk->sk_tc_index, (unsigned long __user *)argp); + break; +#endif + default: err = sock_do_ioctl(net, sock, cmd, arg); break; @@ -2904,6 +2922,10 @@ case SIOCGIFTXQLEN: case SIOCGMIIPHY: case SIOCGMIIREG: +#if defined(CONFIG_BCM_KF_WANDEV) + case SIOCGIFTRANSSTART: + case SIOCDEVISWANDEV: +#endif if (copy_in_user(uifr32, uifr, sizeof(*uifr32))) err = -EFAULT; break; @@ -3141,6 +3163,13 @@ case SIOCGMIIPHY: case SIOCGMIIREG: case SIOCSMIIREG: +#if defined(CONFIG_BCM_KF_MISC_IOCTLS) + case SIOCGIFTRANSSTART: + case SIOCCIFSTATS: +#endif +#if defined(CONFIG_BCM_KF_WANDEV) + case SIOCDEVISWANDEV: +#endif return dev_ifsioc(net, sock, cmd, argp); case SIOCSARP: