smb2_server: add and use a function that calculated the remaining channels