Tully-Fisher relation from halo-stellar mass function