Huawei Technologies Co. has won an early skirmish in its smartphone patent war with Samsung Electronics Co.

U.S. District Judge William Orrick of San Francisco on Monday rejected Samsung’s attempt to invalidate two of the 11 patents asserted by Huawei for claiming ineligible subject matter.