[PATCH 23/30] net: hns3: sync some code from linux mainline